\documentclass[a4paper, oneside, 10pt]{article}
\usepackage[unicode]{hyperref}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{listings}
\usepackage{longtable}
\date{\today}
\title{}
\author{}
\begin{document}

\begin{longtable}{|l|}
\hline
 \\ 
\hline
 
\end{longtable}



\subsection{\texorpdfstring{Página de Ajuda}{Pagina de Ajuda}}
\label{sec:pagina_de_ajuda}
\lstset{frame=single}
\begin{lstlisting}

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.

See also:

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)

\end{lstlisting}



\end{document}
