# Cursos Anteriores

IBUSP

Outras Insitutições

# Linques

05_curso_antigo:r2010:alunos:trabalho_final:marcel.vaz:help

## Página de Ajuda

data.gen {AMC}                                                                  R Documentation

Imaginary data generator

Description:

Generates a two-factor randomized blocks factorial design data frame.

Usage:

data.gen(nb,int,varb,vare,efA,efB,efAB)

Arguments:

nb     Number of blocks.
int    intercept (theoretic control mean).
varb,  sets the diferences between blocks means and the error term, respectively.
vare
efA,   sets the effect of factors A and B and the interaction effects from combination of both
efB,   factors.
efAB

Details:

Data frame is constructed based on a linear model as follows: y ~ a + b*x + c*z + d*xz + block + e ,
where x is the factor A, z is the factor B, xz is the interaction between them, block is the block
effect, and e is the error term.
Block effect is treated as a random factor whereas A and B are fixed ones.

Value:

The factors created are in the form of dummy variables, considering two possible levels to each
factor: presence (1) or absence (0) of a treatment.
The response variable is called "resp" and is rounded two decimal places.

Warning:

The distribution used to generate data are the Gaussian one and the variances among groups are
homogeneous.
Block effect is not allowed to interact with the other two factors, once there are no replication
within each block.

Author(s):

Original version by Marcel Vaz
marcel.vaz@usp.br

References:

Gotelli, N. J. and Ellison, A. M. (2004) A primer of ecological statistics. Sinauer Associates.

anova.power to test ANOVA power against different number of blocks, variance values etc.

Examples:

data=data.gen(10,50,8,3,12,15,5)
mod=aov(resp ~ A*B + Error(bloco/(A*B)),data=data)
summary(mod)

05_curso_antigo/r2010/alunos/trabalho_final/marcel.vaz/help.txt · Última modificação: 2020/08/12 06:04 (edição externa)

### Ferramentas da página 