Type: | Package |
Title: | Experimental Designs Package |
Version: | 1.2.2 |
Date: | 2021-10-04 |
Author: | Eric Batista Ferreira, Portya Piscitelli Cavalcanti, Denismar Alves Nogueira |
Maintainer: | Eric Batista Ferreira <eric.ferreira@unifal-mg.edu.br> |
Description: | Package for analysis of simple experimental designs (CRD, RBD and LSD), experiments in double factorial schemes (in CRD and RBD), experiments in a split plot in time schemes (in CRD and RBD), experiments in double factorial schemes with an additional treatment (in CRD and RBD), experiments in triple factorial scheme (in CRD and RBD) and experiments in triple factorial schemes with an additional treatment (in CRD and RBD), performing the analysis of variance and means comparison by fitting regression models until the third power (quantitative treatments) or by a multiple comparison test, Tukey test, test of Student-Newman-Keuls (SNK), Scott-Knott, Duncan test, t test (LSD) and Bonferroni t test (protected LSD) - for qualitative treatments; residual analysis (Ferreira, Cavalcanti and Nogueira, 2014) <doi:10.4236/am.2014.519280>. |
Encoding: | UTF-8 |
LazyData: | true |
RoxygenNote: | 7.1.2 |
Imports: | stargazer |
Depends: | R (≥ 4.0) |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
NeedsCompilation: | no |
Packaged: | 2021-10-05 00:59:22 UTC; ericb |
Repository: | CRAN |
Date/Publication: | 2021-10-05 04:30:02 UTC |
Test for homogeneity of variances of Anscombe and Tukey
Description
anscombetukey
Performs the test for homogeneity of
variances of Anscombe and Tukey (1963).
Usage
anscombetukey(
resp,
Trat,
Bloco,
glres,
msres,
sstrat,
ssbloco,
residuals,
fitted.values
)
Arguments
resp |
Numeric or complex vector containing the response variable. |
Trat |
Numeric or complex vector containing the treatments. |
Bloco |
Numeric or complex vector containing the blocks. |
glres |
Residual degrees of freedom. |
msres |
Residual Mean Square. |
sstrat |
Residual Sum of Squares. |
ssbloco |
Sum of Squares for blocks. |
residuals |
Numeric or complex vector containing the residuals. |
fitted.values |
Numeric or complex vector containing the fitted values. |
Value
Returns the p-value of Anscombe and Tukey's test of homogeneity of variances and its practical interpretation for 5% of significance.
Author(s)
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br
Denismar Alves Nogueira
Marcos Costa de Paula
Mateus Pimenta Siqueira Lima
References
ANSCOMBE, F. J.; TUKEY, J. W. The examination and analysis of residuals. Technometrics, 5:141-160, 1963.
RIBEIRO, R. Proposta e comparacao do desempenho de testes para homogeneidade de variancia de modelos de classificacao one-way e two-way. Iniciacao Cientifica. (Iniciacao Cientifica) - Universidade Federal de Alfenas. 2012.
See Also
Examples
data(ex2)
attach(ex2)
rbd(trat, provador, aparencia, quali = TRUE, mcomp = "tukey",
hvar='anscombetukey', sigT = 0.05, sigF = 0.05)
Test for Homogeneity of Variances: Bartlett
Description
bartlett
Performs the test for homogeneity of
variances of Bartlett (1937).
Usage
bartlett(trat, resp, t, r)
Arguments
trat |
Numeric or complex vector containing the treatments. |
resp |
Numeric or complex vector containing the response variable. |
t |
Number of treatments. |
r |
Numeric or complex vector containing the number of replications of each treatment. |
Value
Returns the p-value of Bartlett's test of homogeneity of variances and its practical interpretation for 5% of significance.
Author(s)
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br
Denismar Alves Nogueira
Marcos Costa de Paula
Mateus Pimenta Siqueira Lima
References
BARTLETT, M. S. Properties of sufficiency and statistical tests. Proceedings of the Royal Statistical Society - Serie A, 60:268-282, 1937.
NOGUEIRA, D, P.; PEREIRA, G, M. Desempenho de testes para homogeneidade de vari?ncias em delineamentos inteiramente casualizados. Sigmae, Alfenas, v.2, n.1, p. 7-22. 2013.
See Also
levene
,
oneillmathews
, samiuddin
Examples
data(ex1)
attach(ex1)
crd(trat, ig, quali = FALSE, hvar='bartlett', sigF = 0.05)
Multiple comparison: Calinski and Corsten
Description
ccF
Performs the Calinski and Corsten test based on
the F distribution.
Usage
ccF(y, trt, DFerror, SSerror, alpha = 0.05, group = TRUE, main = NULL)
Arguments
y |
Numeric or complex vector containing the response varible. |
trt |
Numeric or complex vector containing the treatments. |
DFerror |
Error degrees of freedom. |
SSerror |
Error sum of squares. |
alpha |
Significance of the test. |
group |
TRUE or FALSE. |
main |
Title. |
Value
Multiple means comparison for the Calinski and Corsten test.
Author(s)
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br
Patricia de Siqueira Ramos
Daniel Furtado Ferreira
References
CALI\'NSKI, T.; CORSTEN, L. C. A. Clustering means in ANOVA by Simultaneous Testing. Biometrics. v. 41, p. 39-48, 1985.
Examples
data(ex2)
attach(ex2)
rbd(trat, provador, aparencia, quali = TRUE, mcomp='ccf',
sigT = 0.05, sigF = 0.05)
Multiple comparison: Bootstrap
Description
ccboot
Performs the Ramos and Ferreira (2009)
multiple comparison bootstrap test.
Usage
ccboot(
y,
trt,
DFerror,
SSerror,
alpha = 0.05,
group = TRUE,
main = NULL,
B = 1000
)
Arguments
y |
Numeric or complex vector containing the response varible. |
trt |
Numeric or complex vector containing the treatments. |
DFerror |
Error degrees of freedom. |
SSerror |
Error sum of squares. |
alpha |
Significance of the test. |
group |
TRUE or FALSE |
main |
Title |
B |
Number of bootstrap resamples. |
Value
Multiple means comparison for the bootstrap test.
Author(s)
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br
Patricia de Siqueira Ramos
Daniel Furtado Ferreira
References
RAMOS, P. S., FERREIRA, D. F. Agrupamento de medias via bootstrap de populacoes normais e nao-normais, Revista Ceres, v.56, p.140-149, 2009.
Examples
data(ex1)
attach(ex1)
crd(trat, ig, quali = TRUE, mcomp='ccboot', sigF = 0.05)
One factor Completely Randomized Design
Description
crd
Analyses balanced experiments in Completely
Randomized Design under one single factor, considering a
fixed model.
Usage
crd(
treat,
resp,
quali = TRUE,
mcomp = "tukey",
nl = FALSE,
hvar = "bartlett",
sigT = 0.05,
sigF = 0.05,
unfold = NULL
)
Arguments
treat |
Numeric or complex vector containing the treatments. |
resp |
Numeric or complex vector containing the response variable. |
quali |
Logic. If TRUE (default), the treatments are assumed qualitative, if FALSE, quantitatives. |
mcomp |
Allows choosing the multiple comparison test; the default is the test of Tukey, however, the options are: the LSD test ('lsd'), the LSD test with Bonferroni protection ('lsdb'), the test of Duncan ('duncan'), the test of Student-Newman-Keuls ('snk'), the test of Scott-Knot ('sk'), the Calinski and Corsten test ('ccF') and bootstrap multiple comparison's test ('ccboot'). |
nl |
Logic. If FALSE (default) linear regression models are adjusted. IF TRUE, non-linear regression models are adjusted. |
hvar |
Allows choosing the test for homogeneity of variances; the default is the test of Bartlett, however there are other options: test of Levene ('levene'), test of Samiuddin ('samiuddin'), test of ONeill and Mathews ('oneillmathews') and the Layard test ('layard'). |
sigT |
The signficance to be used for the multiple comparison test; the default is 5%. |
sigF |
The signficance to be used for the F test of ANOVA; the default is 5%. |
unfold |
Says what must be done after the ANOVA. If NULL (default), recommended tests are performed; if '0', just ANOVA is performed; if '1', the simple effects are tested. |
Details
The arguments sigT and mcomp will be used only when the treatment are qualitative.
Value
The output contains the ANOVA of the CRD, the Shapiro-Wilk normality test for the residuals of the model, the fitted regression models (when the treatments are quantitative) and/or the multiple comparison tests (when the treatments are qualitative).
Author(s)
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br
Denismar Alves Nogueira
Portya Piscitelli Cavalcanti
References
BANZATTO, D. A.; KRONKA, S. N. Experimentacao Agricola. 4 ed. Jaboticabal: Funep. 2006. 237 p.
FERREIRA, E. B.; CAVALCANTI, P. P. Funcao em codigo R para analisar experimentos em DIC simples, em uma so rodada. In: REUNIAO ANUAL DA REGIAO BRASILEIRA DA SOCIEDADE INTERNACIONAL DE BIOMETRIA, 54./SIMPOSIO DE ESTATISTICA APLICADA A EXPERIMENTACAO AGRONOMICA, 13., 2009, Sao Carlos. Programas e resumos... Sao Carlos, SP: UFSCar, 2009. p. 1-5.
See Also
fat2.crd
, fat3.crd
,
split2.crd
, fat2.ad.crd
and
fat3.ad.crd
.
Examples
data(ex1)
attach(ex1)
crd(trat, ig, quali = FALSE, sigF = 0.05, unfold=NULL)
Multiple comparison: Duncan test
Description
duncan
Performs the test of Duncan for multiple
comparison of means.
Usage
duncan(y, trt, DFerror, SSerror, alpha = 0.05, group = TRUE, main = NULL)
Arguments
y |
Numeric or complex vector containing the response variable. |
trt |
Numeric or complex vector containing the treatments. |
DFerror |
Error degrees of freedom. |
SSerror |
Error sum of squares. |
alpha |
Significance level. |
group |
TRUE or FALSE. |
main |
Title. |
Value
Returns the multiple comparison of means according to the test of Duncan.
Author(s)
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br
Denismar Alves Nogueira
Portya Piscitelli Cavalcanti
Stink bugs in corn: additional treatment.
Description
Additional treatment response variable (height of corn plants) of the experiment on stink bugs.
Usage
data(est21Ad)
Format
Numeric vector.
Author(s)
Eric Batista Ferreira, eric.ferreira@unifal-mg.edu.br
Vines: Split-Plot in Randomized Blocks Design
Description
Experiment about vines (not published) where one studied the effects of different fertilizers and harvest dates on the pH of grapes.
Usage
data(ex)
Format
A data frame with 24 observations on the following 4 variables.
trat
a factor with levels
A
B
dose
a numeric vector
rep
a numeric vector
resp
a numeric vector
Author(s)
Eric Batista Ferreira, eric.ferreira@unifal-mg.edu.br
Yacon: CRD
Description
Experiment aiming to evaluate the influence of the yacon flour consumption on the glicemic index.
Usage
data(ex1)
Format
A data frame with 24 observations on the following 2 variables.
trat
a numeric vector
ig
a numeric vector
Author(s)
Eric Batista Ferreira, eric.ferreira@unifal-mg.edu.br
References
RIBEIRO, J. de A. Estudos Quimicos e bioquimicos do Yacon (Samallanthus sonchifolius) in natura e Processado e Influencia do seu Consumo sobre Niveis Glicemicos e Lipideos Fecais de Ratos. 2008. 166p. Dissertation (Master in Food Science) - Universidade Federal de Lavras, UFLA, Lavras, 2008.
Food bars: RBD
Description
Sensory evaluation of food bars where panelists (blocks) evaluated their appearance.
Usage
data(ex2)
Format
A data frame with 350 observations on the following 3 variables.
provador
a numeric vector
trat
a factor with levels
A
B
C
D
E
aparencia
a numeric vector
Author(s)
Eric Batista Ferreira, eric.ferreira@unifal-mg.edu.br
References
PAIVA, A. P. de. Estudos Tecnologicos, Quimico, Fisico-quimico e Sensorial de Barras Alimenticias Elaboradas com Subprodutos e Residuos Agoindustriais. 2008. 131p. Dissertation (Master in Food Science) - Universidade Federal de Lavras, UFLA, Lavras, 2008.
Forage: LSD
Description
Data from an experiment aiming to select forage for minimizing the intake problem of feeding cattle in the sub-region of Paiaguas.
Usage
data(ex3)
Format
A data frame with 49 observations on the following 4 variables.
trat
a factor with levels
A
B
C
D
E
F
G
linha
a numeric vector
coluna
a numeric vector
resp
a numeric vector
Author(s)
Eric Batista Ferreira, eric.ferreira@unifal-mg.edu.br
References
COMASTRI FILHO, J. A. Avaliacao de especies de forrageiras nativas e exoticas na sub-regiao dos paiaguas no pantanal mato-grossense. Pesq. Agropec. Bras., Brasilia, v.29, n.6, p. 971-978, jun. 1994.
Composting: Doble Factorial scheme in CRD
Description
Field experiment to test the composting of coffee husk with or without cattle manure at different revolving intervals.
Usage
data(ex4)
Format
A data frame with 24 observations on the following 11 variables.
revol
a numeric vector
esterco
a factor with levels
c
s
rep
a numeric vector
c
a numeric vector
n
a numeric vector
k
a numeric vector
p
a numeric vector
zn
a numeric vector
b
a numeric vector
ca
a numeric vector
cn
a numeric vector
Author(s)
Eric Batista Ferreira, eric.ferreira@unifal-mg.edu.br
References
REZENDE, F. A. de. Aproveitamento da Casca de Cafe e Borra da Purificacao de Gorduras e Oleos Residuarios em Compostagem. 2010. 74p. Thesis (Doctorate in Agronomy/Fitotecny) - Universidade Federal de Lavras, UFLA, Lavras, 2010.
Food bars: Double Factorial scheme in RBD
Description
Data adapted from a sensorial experiment where panelists of different genders evaluated the taste of food bars.
Usage
data(ex5)
Format
A data frame with 160 observations on the following 4 variables.
trat
a factor with levels
10g
15g
15t
20t
genero
a factor with levels
F
M
bloco
a numeric vector
sabor
a numeric vector
Author(s)
Eric Batista Ferreira, eric.ferreira@unifal-mg.edu.br
References
MOREIRA, D. K. T. Extrudados Expandidos de Arroz, Soja e Gergelim para Uso em Barras Alimenticias. 2010. 166p. Dissertation (Master in Food Science) - Universidade Federal de Lavras, UFLA, Lavras, 2010.
Fictional data 1
Description
Data simulated from a standard normal distribution for an experiment in triple factorial scheme.
Usage
data(ex6)
Format
A data frame with 24 observations on the following 5 variables.
fatorA
a numeric vector
fatorB
a numeric vector
fatorC
a numeric vector
rep
a numeric vector
resp
a numeric vector
Author(s)
Eric Batista Ferreira, eric.ferreira@unifal-mg.edu.br
Height of corn plants 21 days after emergence.
Description
We evaluated the height of corn plants 21 days after emergence under infestation of stink bugs (Dichelops) at different times of coexistence (period) and infestation levels (level). Additional treatment is period zero and level zero.
Usage
data(ex7)
Format
Data frame with 80 observations on the following 4 variables.
periodo
a factor with levels
0-7DAE
0-14DAE
0-21DAE
7-14DAE
7-21DAE
nivel
a numeric vector
bloco
a numeric vector
est21
a numeric vector
@references RODRIGUES, R. B. Danos do percevejo-barriga-verde Dichelops melacanthus (Dallas, 1851) (Hemiptera: Pentatomidae) na cultura do milho. 2011. 105f. Dissertacao (Mestrado em Agronomia - Universidade Federal de Santa Maria, Santa Maria, 2011.
Author(s)
Eric Batista Ferreira, eric.ferreira@unifal-mg.edu.br
Composting: double factorial scheme plus one additional treatment in CRD.
Description
Experiment in greenhouses to observe the performance of the obtained composting for fertilizing sorghum.
Usage
data(ex8)
Format
A data frame with 24 observations on the following 5 variables.
inoculante
a factor with levels
esterco
mamona
biodiesel
a numeric vector
vaso
a numeric vector
fresca
a numeric vector
seca
a numeric vector
Author(s)
Eric Batista Ferreira, eric.ferreira@unifal-mg.edu.br
References
REZENDE, F. A. de. Aproveitamento da Casca de Cafe e Borra da Purificacao de Gorduras e Oleos Residuarios em Compostagem. 2010. 74p. Thesis (Doctorate in Agronomy/Fitotecny) - Universidade Federal de Lavras, UFLA, Lavras, 2010.
Vegetated: Split-plot in CRD
Description
Subset of data from an experiment that studied the effect on soil pH of cover crops subjected to trampling by cattle predominantly under continuous grazing system, analyzed at different depths.
Usage
data(ex9)
Format
A data frame with 48 observations on the following 4 variables.
cobertura
a factor with levels
T1
T2
T3
T4
T5
T6
prof
a numeric vector
rep
a numeric vector
pH
a numeric vector
Author(s)
Eric Batista Ferreira, eric.ferreira@unifal-mg.edu.br
References
GUERRA, A. R. Atributos de Solo sob Coberturas Vegetais em Sistema Silvipastoril em Lavras - MG. 2010. 141p. Dissertation (Master in Forest Engineering) - Universidade Federal de Lavras, UFLA, Lavras, 2010.
Example of fictitious data set
Description
Example of fictitious data mass for non-linear regression model fit
Usage
data(exnl)
Format
A data frame with 30 observations of the following 3 variables.
trat
a numeric vector
rep
a numeric vector
resp
a numeric vector
Author(s)
Eric Batista Ferreira, eric.ferreira@unifal-mg.edu.br
Double factorial scheme plus one additional treatment in CRD
Description
fat2.ad.crd
Analyses experiments in balanced
Completely Randomized Design in double factorial scheme
with an additional treatment, considering a fixed model.
Usage
fat2.ad.crd(
factor1,
factor2,
repet,
resp,
respAd,
quali = c(TRUE, TRUE),
mcomp = "tukey",
fac.names = c("F1", "F2"),
sigT = 0.05,
sigF = 0.05,
unfold = NULL
)
Arguments
factor1 |
Numeric or complex vector containing the factor 1 levels. |
factor2 |
Numeric or complex vector containing the factor 2 levels. |
repet |
Numeric or complex vector containing the replications. |
resp |
Numeric or complex vector containing the response variable. |
respAd |
Numeric or complex vector containing the additional treatment. |
quali |
Logic. If TRUE (default), the treatments are assumed qualitative, if FALSE, quantitatives. |
mcomp |
Allows choosing the multiple comparison test; the default is the test of Tukey, however, the options are: the LSD test ('lsd'), the LSD test with Bonferroni protection ('lsdb'), the test of Duncan ('duncan'), the test of Student-Newman-Keuls ('snk'), the test of Scott-Knott ('sk'), the Calinski and Corsten test ('ccF') and bootstrap multiple comparison's test ('ccboot'). |
fac.names |
Allows labeling the factors 1 and 2. |
sigT |
The signficance to be used for the multiple comparison test; the default is 5%. |
sigF |
The signficance to be used for the F test of ANOVA; the default is 5%. |
unfold |
Says what must be done after the ANOVA. If NULL (default), recommended tests are performed; if '0', just ANOVA is performed; if '1', the simple effects are tested; if '2', the double interaction is unfolded. |
Details
The arguments sigT and mcomp will be used only when the treatment are qualitative.
Value
The output contains the ANOVA of the referred CRD, the Shapiro-Wilk normality test for the residuals of the model, the fitted regression models (when the treatments are quantitative) and/or the multiple comparison tests (when the treatments are qualitative).
Note
The graphics
can be used to construct
regression plots and plotres
for residuals
plots.
Author(s)
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br
Denismar Alves Nogueira
Portya Piscitelli Cavalcanti
References
HEALY, M. J. R. The analysis of a factorial experiment with additional treatments. Journal of Agricultural Science, Cambridge, v. 47, p. 205-206. 1956.
FERREIRA, E. B.; CAVALCANTI, P. P.; NOGUEIRA D. A. Funcao para analisar experimentos em fatorial duplo com um tratamento adicional, em uma so rodada.In: CONGRESSO DE POS-GRADUACAO DA UNIVERSIDADE FEDERAL DE LAVRAS, 19., 2010, Lavras. Resumos... Lavras: UFLA, 2010.
See Also
fat2.crd
, fat2.rbd
,
fat3.crd
, fat3.rbd
,
fat2.ad.rbd
,
fat3.ad.crd
and fat3.ad.rbd
.
Examples
data(ex8)
attach(ex8)
data(secaAd)
fat2.ad.crd(inoculante, biodiesel, vaso, seca, secaAd,
quali = c(TRUE,FALSE), mcomp = "tukey", fac.names =
c("Inoculant", "Biodiesel"), sigT = 0.05, sigF = 0.05,
unfold=NULL)
Double factorial scheme plus one additional treatment in RBD
Description
fat2.ad.rbd
Analyses experiments in balanced
Randomized Blocks Designs in double factorial scheme
with an additional treatment, considering a fixed model.
Usage
fat2.ad.rbd(
factor1,
factor2,
block,
resp,
respAd,
quali = c(TRUE, TRUE),
mcomp = "tukey",
fac.names = c("F1", "F2"),
sigT = 0.05,
sigF = 0.05,
unfold = NULL
)
Arguments
factor1 |
Numeric or complex vector containing the factor 1 levels. |
factor2 |
Numeric or complex vector containing the factor 2 levels. |
block |
Numeric or complex vector containing the blocks. |
resp |
Numeric or complex vector containing the response variable. |
respAd |
Numeric or complex vector containing the additional treatment. |
quali |
Logic. If TRUE (default), the treatments are assumed qualitative, if FALSE, quantitatives. |
mcomp |
Allows choosing the multiple comparison test; the default is the test of Tukey, however, the options are: the LSD test ('lsd'), the LSD test with Bonferroni protection ('lsdb'), the test of Duncan ('duncan'), the test of Student-Newman-Keuls ('snk'), the test of Scott-Knott ('sk'), the Calinski and Corsten test ('ccF') and bootstrap multiple comparison's test ('ccboot'). |
fac.names |
Allows labeling the factors 1 and 2. |
sigT |
The signficance to be used for the multiple comparison test; the default is 5%. |
sigF |
The signficance to be used for the F test of ANOVA; the default is 5%. |
unfold |
Says what must be done after the ANOVA. If NULL (default), recommended tests are performed; if '0', just ANOVA is performed; if '1', the simple effects are tested; if '2', the double interaction is unfolded. |
Details
The arguments sigT and mcomp will be used only when the treatment are qualitative.
Value
The output contains the ANOVA of the referred RBD, the Shapiro-Wilk normality test for the residuals of the model, the fitted regression models (when the treatments are quantitative) and/or the multiple comparison tests (when the treatments are qualitative).
Note
The graphics
can be used to
construct regression plots and plotres
for residuals plots.
Author(s)
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br
Denismar Alves Nogueira
Portya Piscitelli Cavalcanti
References
HEALY, M. J. R. The analysis of a factorial experiment with additional treatments. Journal of Agricultural Science, Cambridge, v. 47, p. 205-206. 1956.
See Also
fat2.crd
, fat2.rbd
,
fat3.crd
, fat3.rbd
,
fat2.ad.crd
,
fat3.ad.crd
and fat3.ad.rbd
.
Examples
data(ex7)
attach(ex7)
data(est21Ad)
fat2.ad.rbd(periodo, nivel, bloco, est21, est21Ad,
quali=c(TRUE, FALSE), mcomp = "tukey", fac.names =
c("Period", "Level"), sigT = 0.05, sigF = 0.05,
unfold=NULL)
Double factorial scheme plus two additional treatments in CRD
Description
fat2.ad2.crd
Analyses experiments in balanced
Completely Randomized Design in double factorial scheme
with two additional treatments, considering a fixed model.
Usage
fat2.ad2.crd(
factor1,
factor2,
repet,
resp,
respAd1,
respAd2,
quali = c(TRUE, TRUE),
mcomp = "tukey",
fac.names = c("F1", "F2"),
sigT = 0.05,
sigF = 0.05,
unfold = NULL
)
Arguments
factor1 |
Numeric or complex vector containing the factor 1 levels. |
factor2 |
Numeric or complex vector containing the factor 2 levels. |
repet |
Numeric or complex vector containing the replications. |
resp |
Numeric or complex vector containing the response variable. |
respAd1 |
Numeric or complex vector containing the additional treatment 1. |
respAd2 |
Numeric or complex vector containing the additional treatment 2. |
quali |
Logic. If TRUE (default), the treatments are assumed qualitative, if FALSE, quantitatives. |
mcomp |
Allows choosing the multiple comparison test; the default is the test of Tukey, however, the options are: the LSD test ('lsd'), the LSD test with Bonferroni protection ('lsdb'), the test of Duncan ('duncan'), the test of Student-Newman-Keuls ('snk'), the test of Scott-Knott ('sk'), the Calinski and Corsten test ('ccF') and bootstrap multiple comparison's test ('ccboot'). |
fac.names |
Allows labeling the factors 1 and 2. |
sigT |
The signficance to be used for the multiple comparison test; the default is 5%. |
sigF |
The signficance to be used for the F test of ANOVA; the default is 5%. |
unfold |
Says what must be done after the ANOVA. If NULL (default), recommended tests are performed; if '0', just ANOVA is performed; if '1', the simple effects are tested; if '2', the double interaction is unfolded. |
Details
The arguments sigT and mcomp will be used only when the treatment are qualitative.
Value
The output contains the ANOVA of the referred CRD, the Shapiro-Wilk normality test for the residuals of the model, the fitted regression models (when the treatments are quantitative) and/or the multiple comparison tests (when the treatments are qualitative).
Note
The graphics
can be used to construct
regression plots and plotres
for residuals
plots.
Author(s)
Portya Piscitelli Cavalcanti
Sônia Maria De Stefano Piedade
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br
References
???
See Also
fat2.crd
, fat2.rbd
,
fat3.crd
, fat3.rbd
,
fat2.ad.crd
, fat2.ad.rbd
,
fat3.ad.crd
and fat3.ad.rbd
.
Examples
factor1<-c(rep(1,6),rep(2,6))
factor2<-c(rep(1,3),rep(2,3),rep(1,3),rep(2,3))
repet<-rep(1:3,4)
resp<-c(10.0,10.8,9.8,10.3,11.3,10.3,9.7,10.1,10.2,9.4,11.6,9.1)
respAd1<-c(10.6,10.6,10.4)
respAd2<-c(5.7,6,7.4)
data.frame(factor1,factor2,repet,resp)
fat2.ad2.crd(factor1, factor2, repet, resp, respAd1, respAd2,
quali=c(TRUE, FALSE), mcomp = "tukey", fac.names =
c("XXXX", "YYYY"), sigT = 0.05, sigF = 0.05, unfold=NULL)
Double factorial scheme plus two additional treatments in RBD
Description
fat2.ad2.rbd
Analyses experiments in balanced
Randomized Blocks Design in double factorial scheme
with two additional treatments, considering a fixed model.
Usage
fat2.ad2.rbd(
factor1,
factor2,
block,
resp,
respAd1,
respAd2,
quali = c(TRUE, TRUE),
mcomp = "tukey",
fac.names = c("F1", "F2"),
sigT = 0.05,
sigF = 0.05,
unfold = NULL
)
Arguments
factor1 |
Numeric or complex vector containing the factor 1 levels. |
factor2 |
Numeric or complex vector containing the factor 2 levels. |
block |
Numeric or complex vector containing the blocks. |
resp |
Numeric or complex vector containing the response variable. |
respAd1 |
Numeric or complex vector containing the additional treatment 1. |
respAd2 |
Numeric or complex vector containing the additional treatment 2. |
quali |
Logic. If TRUE (default), the treatments are assumed qualitative, if FALSE, quantitatives. |
mcomp |
Allows choosing the multiple comparison test; the default is the test of Tukey, however, the options are: the LSD test ('lsd'), the LSD test with Bonferroni protection ('lsdb'), the test of Duncan ('duncan'), the test of Student-Newman-Keuls ('snk'), the test of Scott-Knott ('sk'), the Calinski and Corsten test ('ccF') and bootstrap multiple comparison's test ('ccboot'). |
fac.names |
Allows labeling the factors 1 and 2. |
sigT |
The signficance to be used for the multiple comparison test; the default is 5%. |
sigF |
The signficance to be used for the F test of ANOVA; the default is 5%. |
unfold |
Says what must be done after the ANOVA. If NULL (default), recommended tests are performed; if '0', just ANOVA is performed; if '1', the simple effects are tested; if '2', the double interaction is unfolded. |
Details
The arguments sigT and mcomp will be used only when the treatment are qualitative.
Value
The output contains the ANOVA of the referred CRD, the Shapiro-Wilk normality test for the residuals of the model, the fitted regression models (when the treatments are quantitative) and/or the multiple comparison tests (when the treatments are qualitative).
Note
The graphics
can be used to construct
regression plots and plotres
for residuals
plots.
Author(s)
Portya Piscitelli Cavalcanti
Sônia Maria De Stefano Piedade
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br
References
???
See Also
fat2.crd
, fat2.rbd
,
fat3.crd
, fat3.rbd
,
fat2.ad.crd
, fat2.ad.rbd
,
fat3.ad.crd
and fat3.ad.rbd
.
Examples
factor1<-c(rep(1,6),rep(2,6))
factor2<-c(rep(1,3),rep(2,3),rep(1,3),rep(2,3))
block<-rep(1:3,4)
resp<-c(10.0,10.8,9.8,10.3,11.3,10.3,9.7,10.1,10.2,9.4,11.6,9.1)
respAd1<-c(10.6,10.6,10.4)
respAd2<-c(5.7,6,7.4)
data.frame(factor1,factor2,block,resp)
fat2.ad2.rbd(factor1, factor2, block, resp, respAd1, respAd2,
quali=c(TRUE, FALSE), mcomp = "tukey", fac.names =
c("XXXX", "YYYY"), sigT = 0.05, sigF = 0.05, unfold=NULL)
Double factorial scheme in CRD
Description
fat2.crd
Analyses experiments in balanced
Completely Randomized Design in double factorial
scheme, considering a fixed model.
Usage
fat2.crd(
factor1,
factor2,
resp,
quali = c(TRUE, TRUE),
mcomp = "tukey",
fac.names = c("F1", "F2"),
sigT = 0.05,
sigF = 0.05,
unfold = NULL
)
Arguments
factor1 |
Numeric or complex vector containing the factor 1 levels. |
factor2 |
Numeric or complex vector containing the factor 2 levels. |
resp |
Numeric or complex vector containing the response variable. |
quali |
Logic. If TRUE (default), the treatments are assumed qualitative, if FALSE, quantitatives. |
mcomp |
Allows choosing the multiple comparison test; the default is the test of Tukey, however, the options are: the LSD test ('lsd'), the LSD test with Bonferroni protection ('lsdb'), the test of Duncan ('duncan'), the test of Student-Newman-Keuls ('snk'), the test of Scott-Knott ('sk'), the Calinski and Corsten test ('ccF') and bootstrap multiple comparison's test ('ccboot'). |
fac.names |
Allows labeling the factors 1 and 2. |
sigT |
The signficance to be used for the multiple comparison test; the default is 5%. |
sigF |
The signficance to be used for the F test of ANOVA; the default is 5%. |
unfold |
Says what must be done after the ANOVA. If NULL (default), recommended tests are performed; if '0', just ANOVA is performed; if '1', the simple effects are tested; if '2', the double interaction is unfolded. |
Details
The arguments sigT and mcomp will be used only when the treatment are qualitative.
Value
The output contains the ANOVA of the referred CRD, the Shapiro-Wilk normality test for the residuals of the model, the fitted regression models (when the treatments are quantitative) and/or the multiple comparison tests (when the treatments are qualitative).
Note
The graphics
can be used to
construct regression plots and plotres
for residuals plots.
Author(s)
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br
Denismar Alves Nogueira
Portya Piscitelli Cavalcanti
References
BANZATTO, D. A.; KRONKA, S. N. Experimentacao Agricola. 4 ed. Jaboticabal: Funep. 2006. 237 p.
See Also
crd
, fat3.crd
,
split2.crd
, fat2.ad.crd
and
fat3.ad.crd
.
Examples
data(ex4)
attach(ex4)
fat2.crd(revol, esterco, zn, quali = c(FALSE,TRUE),
mcomp = "tukey", fac.names = c("Revolving","Manure"),
sigT = 0.05, sigF = 0.05, unfold=NULL)
Double factorial scheme in RBD
Description
fat2.rbd
Analyses experiments in balanced
Randomized Blocks Designs in double factorial scheme,
considering a fixed model.
Usage
fat2.rbd(
factor1,
factor2,
block,
resp,
quali = c(TRUE, TRUE),
mcomp = "tukey",
fac.names = c("F1", "F2"),
sigT = 0.05,
sigF = 0.05,
unfold = NULL
)
Arguments
factor1 |
Numeric or complex vector containing the factor 1 levels. |
factor2 |
Numeric or complex vector containing the factor 2 levels. |
block |
Numeric or complex vector containing the blocks. |
resp |
Numeric or complex vector containing the response variable. |
quali |
Logic. If TRUE (default), the treatments are assumed qualitative, if FALSE, quantitatives. |
mcomp |
Allows choosing the multiple comparison test; the default is the test of Tukey, however, the options are: the LSD test ('lsd'), the LSD test with Bonferroni protection ('lsdb'), the test of Duncan ('duncan'), the test of Student-Newman-Keuls ('snk'), the test of Scott-Knott ('sk'), the Calinski and Corsten test ('ccF') and bootstrap multiple comparison's test ('ccboot'). |
fac.names |
Allows labeling the factors 1 and 2. |
sigT |
The signficance to be used for the multiple comparison test; the default is 5%. |
sigF |
The signficance to be used for the F test of ANOVA; the default is 5%. |
unfold |
Says what must be done after the ANOVA. If NULL (default), recommended tests are performed; if '0', just ANOVA is performed; if '1', the simple effects are tested; if '2', the double interaction is unfolded. |
Details
The arguments sigT and mcomp will be used only when the treatment are qualitative.
Value
The output contains the ANOVA of the referred RBD, the Shapiro-Wilk normality test for the residuals of the model, the fitted regression models (when the treatments are quantitative) and/or the multiple comparison tests (when the treatments are qualitative).
Note
The graphics
can be used to
construct regression plots and plotres
for residuals plots.
Author(s)
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br
Denismar Alves Nogueira
Portya Piscitelli Cavalcanti
References
BANZATTO, D. A.; KRONKA, S. N. Experimentacao Agricola. 4 ed. Jaboticabal: Funep. 2006. 237 p.
See Also
fat3.rbd
,
split2.rbd
, strip
,
fat2.ad.rbd
and fat3.ad.rbd
.
Examples
data(ex5)
attach(ex5)
fat2.rbd(trat, genero, bloco, sabor ,quali =
c(TRUE,TRUE), mcomp = "lsd", fac.names = c("Samples",
"Gender"), sigT = 0.05, sigF = 0.05, unfold=NULL)
Triple factorial scheme plus an additional treatment in CRD
Description
fat3.ad.crd
Analyses experiments in balanced
Completely Randomized Design in triple factorial
scheme with an additional treatment, considering a
fixed model.
Usage
fat3.ad.crd(
factor1,
factor2,
factor3,
repet,
resp,
respAd,
quali = c(TRUE, TRUE, TRUE),
mcomp = "tukey",
fac.names = c("F1", "F2", "F3"),
sigT = 0.05,
sigF = 0.05,
unfold = NULL
)
Arguments
factor1 |
Numeric or complex vector containing the factor 1 levels. |
factor2 |
Numeric or complex vector containing the factor 2 levels. |
factor3 |
Numeric or complex vector containing the factor 3 levels. |
repet |
Numeric or complex vector containing the replications. |
resp |
Numeric or complex vector containing the response variable. |
respAd |
Numeric or complex vector containing the additional treatment. |
quali |
Logic. If TRUE (default), the treatments are assumed qualitative, if FALSE, quantitatives. |
mcomp |
Allows choosing the multiple comparison test; the default is the test of Tukey, however, the options are: the LSD test ('lsd'), the LSD test with Bonferroni protection ('lsdb'), the test of Duncan ('duncan'), the test of Student-Newman-Keuls ('snk'), the test of Scott-Knott ('sk'), the Calinski and Corsten test ('ccF') and bootstrap multiple comparison's test ('ccboot'). |
fac.names |
Allows labeling the factors 1, 2 and 3. |
sigT |
The signficance to be used for the multiple comparison test; the default is 5%. |
sigF |
The signficance to be used for the F test of ANOVA; the default is 5%. |
unfold |
Says what must be done after the ANOVA. If NULL (default), recommended tests are performed; if '0', just ANOVA is performed; if '1', the simple effects are tested; if '2.1', '2.2' or '2.3', the double interactions are unfolded; if '3', the triple interaction is unfolded. |
Details
The arguments sigT and mcomp will be used only when the treatment are qualitative.
Value
The output contains the ANOVA of the referred CRD, the Shapiro-Wilk normality test for the residuals of the model, the fitted regression models (when the treatments are quantitative) and/or the multiple comparison tests (when the treatments are qualitative).
Note
The graphics
can be used to
construct regression plots and plotres
for residuals plots.
Author(s)
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br
Denismar Alves Nogueira
Portya Piscitelli Cavalcanti
References
HEALY, M. J. R. The analysis of a factorial experiment with additional treatments. Journal of Agricultural Science, Cambridge, v. 47, p. 205-206. 1956.
See Also
fat2.crd
,
fat2.rbd
, fat3.crd
,
fat3.rbd
, fat2.ad.crd
,
fat2.ad.rbd
, fat3.ad.crd
and fat3.ad.rbd
.
Examples
data(ex6)
attach(ex6)
data(respAd)
fat3.ad.crd(fatorA, fatorB, fatorC, rep, resp, respAd,
quali = c(TRUE, TRUE, TRUE), mcomp = "duncan",
fac.names = c("Factor A", "Factor B", "Factor C"),
sigT = 0.05, sigF = 0.05, unfold=NULL)
Triple factorial scheme plus an additional treatment in RBD
Description
fat3.ad.rbd
Analyses experiments in balanced
Randomized Blocks Designs in triple factorial scheme with
an additional treatment, considering a fixed model.
Usage
fat3.ad.rbd(
factor1,
factor2,
factor3,
block,
resp,
respAd,
quali = c(TRUE, TRUE, TRUE),
mcomp = "tukey",
fac.names = c("F1", "F2", "F3"),
sigT = 0.05,
sigF = 0.05,
unfold = NULL
)
Arguments
factor1 |
Numeric or complex vector containing the factor 1 levels. |
factor2 |
Numeric or complex vector containing the factor 2 levels. |
factor3 |
Numeric or complex vector containing the factor 3 levels. |
block |
Numeric or complex vector containing the blocks. |
resp |
Numeric or complex vector containing the response variable. |
respAd |
Numeric or complex vector containing the additional treatment. |
quali |
Logic. If TRUE (default), the treatments are assumed qualitative, if FALSE, quantitatives. |
mcomp |
Allows choosing the multiple comparison test; the default is the test of Tukey, however, the options are: the LSD test ('lsd'), the LSD test with Bonferroni protection ('lsdb'), the test of Duncan ('duncan'), the test of Student-Newman-Keuls ('snk'), the test of Scott-Knott ('sk'), the Calinski and Corsten test ('ccF') and bootstrap multiple comparison's test ('ccboot'). |
fac.names |
Allows labeling the factors 1, 2 and 3. |
sigT |
The signficance to be used for the multiple comparison test; the default is 5%. |
sigF |
The signficance to be used for the F test of ANOVA; the default is 5%. |
unfold |
Says what must be done after the ANOVA. If NULL (default), recommended tests are performed; if '0', just ANOVA is performed; if '1', the simple effects are tested; if '2.1', '2.2' or '2.3', the double interactions are unfolded; if '3', the triple interaction is unfolded. |
Details
The arguments sigT and mcomp will be used only when the treatment are qualitative.
Value
The output contains the ANOVA of the referred CRD, the Shapiro-Wilk normality test for the residuals of the model, the fitted regression models (when the treatments are quantitative) and/or the multiple comparison tests (when the treatments are qualitative).
Note
The graphics
can be used to
construct regression plots and plotres
for residuals plots.
Author(s)
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br
Denismar Alves Nogueira
Portya Piscitelli Cavalcanti
References
HEALY, M. J. R. The analysis of a factorial experiment with additional treatments. Journal of Agricultural Science, Cambridge, v. 47, p. 205-206. 1956.
See Also
fat2.crd
,
fat2.rbd
, fat3.crd
,
fat3.rbd
, fat2.ad.crd
,
fat2.ad.rbd
, fat3.ad.crd
and fat3.ad.crd
.
Examples
data(ex6)
attach(ex6)
data(respAd)
fat3.ad.rbd(fatorA, fatorB, fatorC, rep, resp, respAd,
quali = c(TRUE, TRUE, TRUE), mcomp = "snk", fac.names =
c("Factor A", "Factor B", "Factor C"), sigT = 0.05,
sigF = 0.05, unfold=NULL)
Triple factorial scheme in CRD
Description
fat3.crd
Analyses experiments in balanced Completely
Randomized Design in triple factorial scheme, considering
a fixed model.
Usage
fat3.crd(
factor1,
factor2,
factor3,
resp,
quali = c(TRUE, TRUE, TRUE),
mcomp = "tukey",
fac.names = c("F1", "F2", "F3"),
sigT = 0.05,
sigF = 0.05,
unfold = NULL
)
Arguments
factor1 |
Numeric or complex vector containing the factor 1 levels. |
factor2 |
Numeric or complex vector containing the factor 2 levels. |
factor3 |
Numeric or complex vector containing the factor 3 levels. |
resp |
Numeric or complex vector containing the response variable. |
quali |
Logic. If TRUE (default), the treatments are assumed qualitative, if FALSE, quantitatives. |
mcomp |
Allows choosing the multiple comparison test; the default is the test of Tukey, however, the options are: the LSD test ('lsd'), the LSD test with Bonferroni protection ('lsdb'), the test of Duncan ('duncan'), the test of Student-Newman-Keuls ('snk'), the test of Scott-Knott ('sk'), the Calinski and Corsten test ('ccF') and bootstrap multiple comparison's test ('ccboot'). |
fac.names |
Allows labeling the factors 1, 2 and 3. |
sigT |
The signficance to be used for the multiple comparison test; the default is 5%. |
sigF |
The signficance to be used for the F test of ANOVA; the default is 5%. |
unfold |
Says what must be done after the ANOVA. If NULL (default), recommended tests are performed; if '0', just ANOVA is performed; if '1', the simple effects are tested; if '2.1', '2.2' or '2.3', the double interactions are unfolded; if '3', the triple interaction is unfolded. |
Details
The arguments sigT and mcomp will be used only when the treatment are qualitative.
Value
The output contains the ANOVA of the referred CRD, the Shapiro-Wilk normality test for the residuals of the model, the fitted regression models (when the treatments are quantitative) and/or the multiple comparison tests (when the treatments are qualitative).
Note
The graphics
can be used to
construct regression plots and plotres
for residuals plots.
Author(s)
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br
Denismar Alves Nogueira
Portya Piscitelli Cavalcanti
References
BANZATTO, D. A.; KRONKA, S. N. Experimentacao Agricola. 4 ed. Jaboticabal: Funep. 2006. 237 p.
See Also
fat2.crd
,
fat2.rbd
, fat3.rbd
,
fat2.ad.crd
, fat2.ad.rbd
,
fat3.ad.crd
and fat3.ad.rbd
.
Examples
data(ex6)
attach(ex6)
fat3.crd(fatorA, fatorB, fatorC, resp, quali = c(TRUE,
TRUE, TRUE), mcomp = "lsdb", fac.names = c("Factor A",
"Factor B", "Factor C"), sigT = 0.05, sigF = 0.05)
Triple factorial scheme in RBD
Description
fat3.rbd
Analyses experiments in balanced Randomized
Blocks Designs in triple factorial scheme, considering a
fixed model.
Usage
fat3.rbd(
factor1,
factor2,
factor3,
block,
resp,
quali = c(TRUE, TRUE, TRUE),
mcomp = "tukey",
fac.names = c("F1", "F2", "F3"),
sigT = 0.05,
sigF = 0.05,
unfold = NULL
)
Arguments
factor1 |
Numeric or complex vector containing the factor 1 levels. |
factor2 |
Numeric or complex vector containing the factor 2 levels. |
factor3 |
Numeric or complex vector containing the factor 3 levels. |
block |
Numeric or complex vector containing the blocks. |
resp |
Numeric or complex vector containing the response variable. |
quali |
Logic. If TRUE (default), the treatments are assumed qualitative, if FALSE, quantitatives. |
mcomp |
Allows choosing the multiple comparison test; the default is the test of Tukey, however, the options are: the LSD test ('lsd'), the LSD test with Bonferroni protection ('lsdb'), the test of Duncan ('duncan'), the test of Student-Newman-Keuls ('snk'), the test of Scott-Knott ('sk'), the Calinski and Corsten test ('ccF') and bootstrap multiple comparison's test ('ccboot'). |
fac.names |
Allows labeling the factors 1, 2 and 3. |
sigT |
The signficance to be used for the multiple comparison test; the default is 5%. |
sigF |
The signficance to be used for the F test of ANOVA; the default is 5%. |
unfold |
Says what must be done after the ANOVA. If NULL (default), recommended tests are performed; if '0', just ANOVA is performed; if '1', the simple effects are tested; if '2.1', '2.2' or '2.3', the double interactions are unfolded; if '3', the triple interaction is unfolded. |
Details
The arguments sigT and mcomp will be used only when the treatment are qualitative.
Value
The output contains the ANOVA of the referred CRD, the Shapiro-Wilk normality test for the residuals of the model, the fitted regression models (when the treatments are quantitative) and/or the multiple comparison tests (when the treatments are qualitative).
Note
The graphics
can be used to
construct regression plots and plotres
for residuals plots.
Author(s)
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br
Denismar Alves Nogueira
Portya Piscitelli Cavalcanti
References
BANZATTO, D. A.; KRONKA, S. N. Experimentacao Agricola. 4 ed. Jaboticabal: Funep. 2006. 237 p.
See Also
fat2.crd
,
fat2.rbd
, fat3.crd
,
fat2.ad.crd
, fat2.ad.rbd
,
fat3.ad.crd
and fat3.ad.crd
.
Examples
data(ex6)
attach(ex6)
fat3.rbd(fatorA, fatorB, fatorC, rep, resp, quali = c(TRUE,
TRUE, TRUE), mcomp = "tukey", fac.names = c("Factor A",
"Factor B", "Factor C"), sigT = 0.05, sigF = 0.05,
unfold=NULL)
Generalized inverse
Description
ginv
Computes the Moore-Penrose generalized inverse
of a matrix X.
Usage
ginv(X, tol = sqrt(.Machine$double.eps))
Arguments
X |
Matrix for which the Moore-Penrose inverse is required. |
tol |
A relative tolerance to detect zero singular values. |
Value
A MP generalized inverse matrix for X.
References
Venables, W. N. and Ripley, B. D. (1999) Modern Applied Statistics with S-PLUS. Third Edition. Springer. p.100.
See Also
Regression model plots
Description
graphics
Plots from regression models fitted in ANOVA.
Usage
graphics(
a,
degree = 1,
mod = TRUE,
main = " ",
sub = " ",
xlab = "Levels (X)",
ylab = "Response var (Y)",
pch = 19,
xlim = NULL,
ylim = NULL,
bty = "o"
)
Arguments
a |
Output from anova (performed in ExpDes). |
degree |
For polynomial models, 1 (linear model) is the default, 2 (quadratic model), 3 (cubic model), "pot" (Power model), "log" (Logistic model), "gom" (Gompertz model) and "exp" (Exponential model). |
mod |
Logic. Print the model expression and its R2 on the top of the graphic. The default is TRUE. |
main |
Title of the plot. Empty is the default. |
sub |
Subtitle of the plot. Empty is the default. |
xlab |
Name for axis X. |
ylab |
Name for axis Y. |
pch |
Caracter type to be used on the observed values. |
xlim |
Limits for axis X. |
ylim |
Limits for axis Y. |
bty |
Type of box the plot is fitted in. |
Author(s)
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br
References
STEEL, R. G. D.; TORRIE, J. H. Principles and procedures in Statistics: a biometrical approach. McGraw-Hill, New York, NY. 1980.
See Also
Examples
data(ex1)
attach(ex1)
a<-crd(trat, ig, quali=FALSE, nl=FALSE)
graphics(a, degree=1)
graphics(a, degree=2)
graphics(a, degree=3)
Test for homogeneity of variances of Han
Description
han
Performs the test for homogeneity of variances of
Han (1969).
Usage
han(resp, trat, block)
Arguments
resp |
Numeric or complex vector containing the response variable. |
trat |
Numeric or complex vector containing the treatments. |
block |
Numeric or complex vector containing the blocks. |
Value
Returns the p-value of Han's test of homogeneity of variances and its practical interpretation for 5% of significance.
Author(s)
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br @author Denismar Alves Nogueira @author Marcos Costa de Paula @author Mateus Pimenta Siqueira Lima
References
HAN, C. P. Testing the homogeneity of variances in a two-way classification. Biometrics, 25:153-158, Mar. 1969.
RIBEIRO, R. Proposta e comparacao do desempenho de testes para homogeneidade de variancia de modelos de classicacao one-way e two-way. Iniciacao Cientifica. (Iniciacao Cientifica) - Universidade Federal de Alfenas. 2012.
See Also
Examples
data(ex2)
attach(ex2)
rbd(trat, provador, aparencia, hvar = "han")
Setting the last character of a chain
Description
lastC
A special function for the group of treatments
in the multiple comparison tests. Use order.group.
Usage
lastC(x)
Arguments
x |
letters |
Value
x character.
Author(s)
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br @author Denismar Alves Nogueira @author Portya Piscitelli Cavalcanti (Adapted from Felipe de Mendiburu - GPL)
See Also
Examples
x<-c("a","ab","b","c","cd")
lastC(x)
# "a" "b" "b" "c" "d"
Latin Square Design
Description
lastd
Analyses experiments in balanced Latin Square
Design, considering a fixed model.
Usage
latsd(
treat,
row,
column,
resp,
quali = TRUE,
mcomp = "tukey",
sigT = 0.05,
sigF = 0.05,
unfold = NULL
)
Arguments
treat |
Numeric or complex vector containing the treatments. |
row |
Numeric or complex vector containing the rows. |
column |
Numeric or complex vector containing the columns. |
resp |
Numeric or complex vector containing the response variable. |
quali |
Logic. If TRUE (default), the treatments are assumed qualitative, if FALSE, quantitatives. |
mcomp |
Allows choosing the multiple comparison test; the default is the test of Tukey, however, the options are: the LSD test ('lsd'), the LSD test with Bonferroni protection ('lsdb'), the test of Duncan ('duncan'), the test of Student-Newman-Keuls ('snk'), the test of Scott-Knott ('sk'), the Calinski and Corsten test ('ccF') and bootstrap multiple comparison's test ('ccboot'). |
sigT |
The signficance to be used for the multiple comparison test; the default is 5%. |
sigF |
The signficance to be used for the F test of ANOVA; the default is 5%. |
unfold |
Says what must be done after the ANOVA. If NULL (default), recommended tests are performed; if '0', just ANOVA is performed; if '1', the simple effects are tested. |
Details
The arguments sigT and mcomp will be used only when the treatment are qualitative.
Value
The output contains the ANOVA of the LSD, the Shapiro-Wilk normality test for the residuals of the model, the fitted regression models (when the treatments are quantitative) and/or the multiple comparison tests (when the treatments are qualitative).
Author(s)
Eric B Ferreira,
eric.ferreira@unifal-mg.edu.br
@author Denismar Alves Nogueira
@author Portya Piscitelli Cavalcanti
@note The graphics
can be used to construct
regression plots and plotres
for residuals
plots.
References
GOMES, F. P. Curso de Estatistica Experimental. 10a ed. Piracicaba: ESALQ/USP. 1982. 430.
FERREIRA, E. B.; CAVALCANTI, P. P.; NOGUEIRA D. A. Funcao em codigo R para analisar experimentos em DQL simples, em uma so rodada. In: CONGRESSO DE POS-GRADUACAO DA UNIVERSIDADE FEDERAL DE LAVRAS, 18., 2009, Lavras. Annals... Lavras: UFLA, 2009.
See Also
Examples
data(ex3)
attach(ex3)
latsd(trat, linha, coluna, resp, quali = TRUE, mcomp = "snk",
sigT = 0.05, sigF = 0.05, unfold=NULL)
Test for homogeneity of variances of Layard
Description
layard
Performs the test for homogeneity of variances
of Layard for Jackknife (1973).
Usage
layard(trat, resp, t, r)
Arguments
trat |
Numeric or complex vector containing treatments. |
resp |
Numeric or complex vector containing the response variable. |
t |
Number of treatments. |
r |
Numeric or complex vector containing the number of replications of each treatment. |
Value
Returns the p-value of the Layard test of homogeneity of variances and its practical interpretation for the significance level of 5%.
Author(s)
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br @author Denismar Alves Nogueira @author Marcos Costa de Paula @author Mateus Pimenta Siqueira Lima
References
LAYARD, M. N. J. Robust large-sample tests for homogeneity of variances. Journal of the American Statistical Association, v.68, n.341, p.195-198, 1973.
NOGUEIRA, D, P.; PEREIRA, G, M. Desempenho de testes para homogeneidade de variancias em delineamentos inteiramente casualizados. Sigmae, Alfenas, v.2, n.1, p. 7-22. 2013.
See Also
bartlett
, samiuddin
,
levene
, oneillmathews
.
Examples
data(ex1)
attach(ex1)
crd(trat, ig, quali = FALSE, hvar = "layard")
Test for homogeneity of variances of Levene
Description
levene
Performs the test for homogeneity of variances
of Levene (1960).
Usage
levene(trat, resp, t, r)
Arguments
trat |
Numeric or complex vector containing treatments. |
resp |
Numeric or complex vector containing the response variable. |
t |
Number of treatments. |
r |
Numeric or complex vector containing the number of replications of each treatment. |
Value
Returns the p-value of Levene's test of homogeneity of variances and its practical interpretation for significance level of 5%.
Author(s)
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br @author Denismar Alves Nogueira @author Marcos Costa de Paula @author Mateus Pimenta Siqueira Lima
References
LEVENE, H. Robust tests for equality of variances. In: Olkin, I.; Ghurye, S.G.; Hoeffding, W.; Madow, W.G.; Mann, H.B. (eds.). Contribution to Probability and Statistics. Stanford, CA: Stanford University Press, pages 278-292, 1960.
NOGUEIRA, D, P.; PEREIRA, G, M. Desempenho de testes para homogeneidade de variancias em delineamentos inteiramente casualizados. Sigmae, Alfenas, v.2, n.1, p. 7-22. 2013.
See Also
bartlett
, samiuddin
,
layard
, oneillmathews
.
Examples
data(ex1)
attach(ex1)
crd(trat, ig, quali = FALSE, hvar = "levene")
Multiple comparison: Least Significant Difference test
Description
lsd
Performs the t test (LSD) for multiple comparison
of means.
Usage
lsd(y, trt, DFerror, SSerror, alpha = 0.05, group = TRUE, main = NULL)
Arguments
y |
Numeric or complex vector containing the response variable. |
trt |
Numeric or complex vector containing the treatments. |
DFerror |
Error degrees of freedom. |
SSerror |
Error sum of squares. |
alpha |
Significance level. |
group |
TRUE or FALSE. |
main |
Title. |
Value
Returns the multiple comparison of means according to the LSD test.
Author(s)
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br
Denismar Alves Nogueira
Portya Piscitelli Cavalcanti
See Also
snk
, duncan
,
ccboot
, lsdb
,
scottknott
, tukey
,
ccF
.
Examples
data(ex1)
attach(ex1)
crd(trat, ig, quali = TRUE, mcomp = "lsd", sigT = 0.05)
Multiple comparison: Bonferroni's Least Significant Difference test
Description
lsdb
Performs the t test (LSD) with Bonferroni's
protection, for multiple comparison of means.
Usage
lsdb(y, trt, DFerror, SSerror, alpha = 0.05, group = TRUE, main = NULL)
Arguments
y |
Numeric or complex vector containing the response variable. |
trt |
Numeric or complex vector containing the treatments. |
DFerror |
Error degrees of freedom. |
SSerror |
Error sum of squares. |
alpha |
Significance level. |
group |
TRUE or FALSE. |
main |
Title. |
Value
Returns the multiple comparison of means according to the LSDB test.
Author(s)
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br
Denismar Alves Nogueira
Portya Piscitelli Cavalcanti
See Also
snk
, duncan
,
ccboot
, lsd
,
scottknott
, tukey
,
ccF
.
Examples
data(ex1)
attach(ex1)
crd(trat, ig, quali = TRUE, mcomp = "lsdb", sigT = 0.05)
Test for homogeneity of variances of ONeill and Mathews (RBD)
Description
oneilldbc
Performs the test for homogeneity of
variances of ONeill and Mathews (2002).
Usage
oneilldbc(resp, trat, block)
Arguments
resp |
Numeric or complex vector containing the response variable. |
trat |
Numeric or complex vector containing treatments. |
block |
Numeric or complex vector containing blocks. |
Value
Returns the p-value of ONeill and Mathews' test of homogeneity of variances and its practical interpretation for significance level of 5%.
Author(s)
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br @author Denismar Alves Nogueira @author Marcos Costa de Paula @author Mateus Pimenta Siqueira Lima
References
O'NEILL, M. E.; MATHEWS, K. L. Levene tests of homogeneity of variance for general block and treatment designs. Biometrics, 58:216-224, Mar. 2002.
RIBEIRO, R. Proposta e comparacao do desempenho de testes para homogeneidade de variancia de modelos de classificacao one-way e two-way. Iniciacao Cientifica. (Iniciacao Cientifica) - Universidade Federal de Alfenas. 2012.
See Also
Examples
data(ex2)
attach(ex2)
rbd(trat, provador, aparencia, hvar = "oneillmathews")
Test for homogeneity of variances of ONeill and Mathews (CRD)
Description
oneillmathews
Performs the test for homogeneity of
variances of ONeill and Mathews (2000).
Usage
oneillmathews(trat, resp, t, r)
Arguments
trat |
Numeric or complex vector containing treatments. |
resp |
Numeric or complex vector containing the response variable. |
t |
Number of treatments. |
r |
Numeric or complex vector containing the number of replications of each treatment. |
Value
Returns the p-value of ONeill and Mathews' test of homogeneity of variances and its practical interpretation for significance level of 5%.
Author(s)
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br @author Denismar Alves Nogueira @author Marcos Costa de Paula @author Mateus Pimenta Siqueira Lima
References
O'NEILL, M. E.; MATHEWS, K. L. A weighted least squares approach to levene test of homogeneity of variance. Australian e New Zealand Journal Statistical, 42(1):81-100, 2000.
NOGUEIRA, D, P.; PEREIRA, G, M. Desempenho de testes para homogeneidade de variancias em delineamentos inteiramente casualizados. Sigmae, Alfenas, v.2, n.1, p. 7-22. 2013.
See Also
bartlett
, layard
,
levene
, samiuddin
.
Examples
data(ex1)
attach(ex1)
crd(trat, ig, quali = FALSE, hvar = "oneillmathews",
sigF = 0.05)
Ordering the treatments according to the multiple comparison
Description
order.group
It orders the groups of means.
Usage
order.group(trt, means, N, MSerror, Tprob, std.err, parameter = 1)
Arguments
trt |
Treatments. |
means |
Means of treatment. |
N |
Replications. |
MSerror |
Mean square error. |
Tprob |
Minimum value for the comparison. |
std.err |
Standard error. |
parameter |
Constante 1 (Sd), 0.5 (Sx). |
Value
trt Factor
means Numeric
N Numeric
MSerror Numeric
Tprob value between 0 and 1
std.err Numeric
parameter Constant
Author(s)
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br @author Denismar Alves Nogueira @author Portya Piscitelli Cavalcanti (Adapted from Felipe de Mendiburu - GPL)
See Also
Grouping the treatments averages in a comparison with a minimum value
Description
order.stat.SNK
Orders the groups of means according
to the test of SNK.
Usage
order.stat.SNK(treatment, means, minimum)
Arguments
treatment |
Treatment. |
means |
Means of treatment. |
minimum |
Minimum value for the comparison. |
Value
trt Factor
means Numeric
minimum Numeric
Author(s)
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br @author Denismar Alves Nogueira @author Portya Piscitelli Cavalcanti (Adapted from Felipe de Mendiburu - GPL)
See Also
Residual plots
Description
plotres
Residual plots for a output model. Four sets
of plots are produced: (1) Histogram, (2) normal probability
plot for the residual, (3) Standardized Residuals versus
Fitted Values, and (4) box-plot (Standardized Residuals).
Usage
plotres(x)
Arguments
x |
Output from anova (performed in ExpDes). |
Author(s)
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br @author Denismar Alves Nogueira @note The default produces four plots regarding the ANOVA assumptions.
References
STEEL, R. G. D.; TORRIE, J. H. Principles and procedures in Statistics: a biometrical approach. McGraw-Hill, New York, NY. 1980.
See Also
Examples
data(ex1)
attach(ex1)
a<-crd(trat, ig)
plotres(a)
Randomized Blocks Design
Description
rbd
Analyses experiments in balanced Randomized
Blocks Designs under one single factor, considering a fixed
model.
Usage
rbd(
treat,
block,
resp,
quali = TRUE,
mcomp = "tukey",
nl = FALSE,
hvar = "oneillmathews",
sigT = 0.05,
sigF = 0.05,
unfold = NULL
)
Arguments
treat |
Numeric or complex vector containing the treatments. |
block |
Numeric or complex vector containing the blocks. |
resp |
Numeric or complex vector containing the response variable. |
quali |
Logic. If TRUE (default), the treatments are assumed qualitative, if FALSE, quantitatives. |
mcomp |
Allows choosing the multiple comparison test; the default is the test of Tukey, however, the options are: the LSD test ('lsd'), the LSD test with Bonferroni protection ('lsdb'), the test of Duncan ('duncan'), the test of Student-Newman-Keuls ('snk'), the test of Scott-Knot ('sk'), the Calinski and Corsten test ('ccF') and bootstrap multiple comparison's test ('ccboot'). |
nl |
Logic. If FALSE (default) linear regression models are adjusted. IF TRUE, non-linear regression models are adjusted. |
hvar |
Allows choosing the test for homogeneity of variances; the default is the test of ONeill and Mathews ('oneillmathews'), however there are other options: test of Han ('han'), and the test of Anscombe and Tukey ('anscombetukey'). |
sigT |
The signficance to be used for the multiple comparison test; the default is 5%. |
sigF |
The signficance to be used for the F test of ANOVA; the default is 5%. |
unfold |
Says what must be done after the ANOVA. If NULL (default), recommended tests are performed; if '0', just ANOVA is performed; if '1', the simple effects are tested. |
Details
The arguments sigT and mcomp will be used only when the treatment are qualitative.
Value
The output contains the ANOVA of the RBD, the Shapiro-Wilk normality test for the residuals of the model, the fitted regression models (when the treatments are quantitative) and/or the multiple comparison tests (when the treatments are qualitative).
Note
The graphics
can be used to construct
regression plots and plotres
for residuals
plots.
Author(s)
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br
Denismar Alves Nogueira
Portya Piscitelli Cavalcanti
References
BANZATTO, D. A.; KRONKA, S. N. Experimentacao Agricola. 4 ed. Jaboticabal: Funep. 2006. 237 p.
FERREIRA, E. B.; CAVALCANTI, P. P.; NOGUEIRA D. A. Funcao em codigo R para analisar experimentos em DBC simples, em uma so rodada. In: JORNADA CIENTIFICA DA UNIVERSIDADE FEDERAL DE ALFENAS-MG, 2., 2009, Alfenas. Annals... ALfenas: Unifal-MG, 2009.
See Also
fat2.rbd
, fat3.rbd
,
split2.rbd
, strip
,
fat2.ad.rbd
and fat3.ad.rbd
.
Examples
data(ex2)
attach(ex2)
rbd(trat, provador, aparencia, quali = TRUE, mcomp = "lsd",
hvar = "oneillmathews", sigT = 0.05, sigF = 0.05,
unfold=NULL)
Non-linear Regression
Description
reg.nl
Adjusts non-linear regression models in Anova
(Models: Power, Exponential, Logistic, Gompertz).
Usage
reg.nl(resp, treat)
Arguments
resp |
Numeric or complex vector containing the response variable. |
treat |
Numeric or complex vector containing the treatments. |
Value
Returns coefficients, significance and ANOVA of the fitted regression models.
Author(s)
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br
Luiz Alberto Beijo
References
DRAPER, N.R.; SMITH, H. Apllied regression analysis. 3ed. New York : John Wiley, 1998. 706p.
See Also
Examples
data(exnl)
attach(exnl)
x<-crd(trat, resp, quali = FALSE, nl = TRUE)
graphics(x, degree = "log")
Polinomial Regression
Description
reg.poly
Fits sequential regression models until the
third power.
Usage
reg.poly(resp, treat, DFerror, SSerror, DFtreat, SStreat)
Arguments
resp |
Numeric or complex vector containing the response variable. |
treat |
Numeric or complex vector containing the treatments. |
DFerror |
Error degrees of freedom. |
SSerror |
Error sum of squares. |
DFtreat |
Treatments' dregrees of freedom. |
SStreat |
Treatments' sum of squares. |
Value
Returns coefficients, significance and ANOVA of the fitted regression models.
Author(s)
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br
Denismar Alves Nogueira
Portya Piscitelli Cavalcanti
References
GOMES, F. P. Curso de Estatistica Experimental. 10a ed. Piracicaba: ESALQ/USP. 1982. 430.
See Also
Fictional data: additional treatment
Description
Response variable form the additional treatment.
Usage
data(respAd)
Format
Numeric vector.
Author(s)
Eric Batista Ferreira, eric.ferreira@unifal-mg.edu.br
Test for homogeneity of variances of Samiuddin
Description
samiuddin
Performs the test for homogeneity of
variances of Samiuddin (1976).
Usage
samiuddin(trat, resp, t, r)
Arguments
trat |
Numeric or complex vector containing treatments. |
resp |
Numeric or complex vector containing the response variable. |
t |
Number of treatments. |
r |
Numeric or complex vector containing the number of replications of each treatment. |
Value
Returns the p-value of Samiuddin's test of homogeneity of variances and its practical interpretation for significance level of 5%.
Author(s)
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br @author Denismar Alves Nogueira @author Marcos Costa de Paula @author Mateus Pimenta Siqueira Lima
References
SAMIUDDIN, M. Bayesian test of homogeneity of variance. Journal of the American Statistical Association, 71(354):515-517, Jun. 1976.
NOGUEIRA, D, P.; PEREIRA, G, M. Desempenho de testes para homogeneidade de variancias em delineamentos inteiramente casualizados. Sigmae, Alfenas, v.2, n.1, p. 7-22. 2013.
See Also
bartlett
, layard
,
levene
, oneillmathews
.
Examples
data(ex1)
attach(ex1)
crd(trat, ig, quali = FALSE, hvar = "samiuddin", sigF = 0.05)
Multiple comparison: Scott-Knott test
Description
scottknott
Performs the test of Scott-Knott, for
multiple comparison of means.
Usage
scottknott(y, trt, DFerror, SSerror, alpha = 0.05, group = TRUE, main = NULL)
Arguments
y |
Numeric or complex vector containing the response variable. |
trt |
Numeric or complex vector containing the treatments. |
DFerror |
Error degrees of freedom. |
SSerror |
Error sum of squares. |
alpha |
Significance level. |
group |
TRUE or FALSE. |
main |
Title. |
Value
Returns the multiple comparison of means according to the test of Scott-Knott.
Author(s)
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br
Denismar Alves Nogueira
Portya Piscitelli Cavalcanti (Adapted from Laercio Junio da Silva - GPL(>=2))
References
RAMALHO, M. A. P.; FERREIRA, D. F.; OLIVEIRA, A. C. de. Experimentacao em Genetica e Melhoramento de Plantas. 2a ed. Lavras: UFLA. 2005. 300p.
See Also
snk
, duncan
,
lsd
, lsdb
, ccboot
,
tukey
, ccF
.
Examples
data(ex1)
attach(ex1)
crd(trat, ig, quali = TRUE, mcomp = "sk", sigT = 0.05)
Composting: additional treatment
Description
Response variable (dry biomass) of the additional treatment of the experiment about composting.
Usage
data(secaAd)
Format
Numeric vector.
Author(s)
Eric Batista Ferreira, eric.ferreira@unifal-mg.edu.br
Multiple comparison: Student-Newman-Keuls test
Description
snk
Performs the test of SNK, for multiple
comparison of means.
Usage
snk(y, trt, DFerror, SSerror, alpha = 0.05, group = TRUE, main = NULL)
Arguments
y |
Numeric or complex vector containing the response variable. |
trt |
Numeric or complex vector containing the treatments. |
DFerror |
Error degrees of freedom. |
SSerror |
Error sum of squares. |
alpha |
Significance level. |
group |
TRUE or FALSE. |
main |
Title. |
Value
Returns the multiple comparison of means according to the test of SNK.
Author(s)
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br
Denismar Alves Nogueira
Portya Piscitelli Cavalcanti
See Also
scottknott
, duncan
,
lsd
, lsdb
, ccboot
,
tukey
, ccF
.
Examples
data(ex1)
attach(ex1)
crd(trat, ig, quali = TRUE, mcomp = "snk", sigT = 0.05)
Split-plots in CRD
Description
split2.crd
Analyses experiments in Split-plot scheme
in balanced Completely Randomized Design, considering a
fixed model.
Usage
split2.crd(
factor1,
factor2,
repet,
resp,
quali = c(TRUE, TRUE),
mcomp = "tukey",
fac.names = c("F1", "F2"),
sigT = 0.05,
sigF = 0.05,
unfold = NULL
)
Arguments
factor1 |
Numeric or complex vector containing the factor 1 levels. |
factor2 |
Numeric or complex vector containing the factor 2 levels. |
repet |
Numeric or complex vector containing the replications. |
resp |
Numeric or complex vector containing the response variable. |
quali |
Logic. If TRUE (default), the treatments are assumed qualitative, if FALSE, quantitatives. |
mcomp |
Allows choosing the multiple comparison test; the default is the test of Tukey, however, the options are: the LSD test ('lsd'), the LSD test with Bonferroni protection ('lsdb'), the test of Duncan ('duncan'), the test of Student-Newman-Keuls ('snk'), the test of Scott-Knott ('sk'), the Calinski and Corsten test ('ccF') and bootstrap multiple comparison's test ('ccboot'). |
fac.names |
Allows labeling the factors 1 and 2. |
sigT |
The signficance to be used for the multiple comparison test; the default is 5%. |
sigF |
The signficance to be used for the F test of ANOVA; the default is 5%. |
unfold |
Says what must be done after the ANOVA. If NULL (default), recommended tests are performed; if '0', just ANOVA is performed; if '1', the simple effects are tested; if '2', the double interaction is unfolded. |
Details
The arguments sigT and mcomp will be used only when the treatment are qualitative.
Value
The output contains the ANOVA of the referred CRD, the Shapiro-Wilk normality test for the residuals of the model, the fitted regression models (when the treatments are quantitative) and/or the multiple comparison tests (when the treatments are qualitative).
Note
The graphics
can be used to
construct regression plots and plotres
for residuals plots.
Author(s)
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br
Denismar Alves Nogueira
Portya Piscitelli Cavalcanti
References
BANZATTO, D. A.; KRONKA, S. N. Experimentacao Agricola. 4 ed. Jaboticabal: Funep. 2006. 237 p.
See Also
split2.rbd
and strip
.
Examples
data(ex9)
attach(ex9)
split2.crd(cobertura, prof, rep, pH, quali = c(TRUE, TRUE),
mcomp = "lsd", fac.names = c("Cover", "Depth"), sigT = 0.05,
sigF = 0.05, unfold=NULL)
Split-plots in RBD
Description
split2.rbd
Analyses experiments in Split-plot scheme
in balanced Randomized Blocks Design, considering a
fixed model.
Usage
split2.rbd(
factor1,
factor2,
block,
resp,
quali = c(TRUE, TRUE),
mcomp = "tukey",
fac.names = c("F1", "F2"),
sigT = 0.05,
sigF = 0.05,
unfold = NULL
)
Arguments
factor1 |
Numeric or complex vector containing the factor 1 levels. |
factor2 |
Numeric or complex vector containing the factor 2 levels. |
block |
Numeric or complex vector containing the blocks. |
resp |
Numeric or complex vector containing the response variable. |
quali |
Logic. If TRUE (default), the treatments are assumed qualitative, if FALSE, quantitatives. |
mcomp |
Allows choosing the multiple comparison test; the default is the test of Tukey, however, the options are: the LSD test ('lsd'), the LSD test with Bonferroni protection ('lsdb'), the test of Duncan ('duncan'), the test of Student-Newman-Keuls ('snk'), the test of Scott-Knott ('sk'), the Calinski and Corsten test ('ccF') and bootstrap multiple comparison's test ('ccboot'). |
fac.names |
Allows labeling the factors 1 and 2. |
sigT |
The signficance to be used for the multiple comparison test; the default is 5%. |
sigF |
The signficance to be used for the F test of ANOVA; the default is 5%. |
unfold |
Says what must be done after the ANOVA. If NULL (default), recommended tests are performed; if '0', just ANOVA is performed; if '1', the simple effects are tested; if '2', the double interaction is unfolded. |
Details
The arguments sigT and mcomp will be used only when the treatment are qualitative.
Value
The output contains the ANOVA of the referred RBD, the Shapiro-Wilk normality test for the residuals of the model, the fitted regression models (when the treatments are quantitative) and/or the multiple comparison tests (when the treatments are qualitative).
Note
The graphics
can be used to
construct regression plots and plotres
for residuals plots.
Author(s)
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br
Denismar Alves Nogueira
Portya Piscitelli Cavalcanti
References
BANZATTO, D. A.; KRONKA, S. N. Experimentacao Agricola. 4 ed. Jaboticabal: Funep. 2006. 237 p.
See Also
split2.crd
and strip
.
Examples
data(ex)
attach(ex)
split2.rbd(trat, dose, rep, resp, quali = c(TRUE, FALSE),
mcomp = "tukey", fac.names = c("Treatament", "Dose"),
sigT = 0.05, sigF = 0.05, unfold=NULL)
Strip-plot experiments
Description
strip
Analysis Strip-plot experiments.
Usage
strip(
factor1,
factor2,
block,
resp,
quali = c(TRUE, TRUE),
mcomp = "tukey",
fac.names = c("F1", "F2"),
sigT = 0.05,
sigF = 0.05,
unfold = NULL
)
Arguments
factor1 |
Numeric or complex vector containing the factor 1 levels. |
factor2 |
Numeric or complex vector containing the factor 2 levels. |
block |
Numeric or complex vector containing the blocks. |
resp |
Numeric or complex vector containing the response variable. |
quali |
Logic. If TRUE (default), the treatments are assumed qualitative, if FALSE, quantitatives. |
mcomp |
Allows choosing the multiple comparison test; the default is the test of Tukey, however, the options are: the LSD test ('lsd'), the LSD test with Bonferroni protection ('lsdb'), the test of Duncan ('duncan'), the test of Student-Newman-Keuls ('snk'), the test of Scott-Knott ('sk'), the Calinski and Corsten test ('ccF') and bootstrap multiple comparison's test ('ccboot'). |
fac.names |
Allows labeling the factors 1 and 2. |
sigT |
The signficance to be used for the multiple comparison test; the default is 5%. |
sigF |
The signficance to be used for the F test of ANOVA; the default is 5%. |
unfold |
Says what must be done after the ANOVA. If NULL (default), recommended tests are performed; if '0', just ANOVA is performed; if '1', the simple effects are tested; if '2', the double interaction is unfolded. |
Details
The arguments sigT and mcomp will be used only when the treatment are qualitative.
Value
The output contains the ANOVA of the referred RBD, the Shapiro-Wilk normality test for the residuals of the model, the fitted regression models (when the treatments are quantitative) and/or the multiple comparison tests (when the treatments are qualitative).
Note
The graphics
can be used to
construct regression plots and plotres
for residuals plots.
Author(s)
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br
Laís Brambilla Storti Ferreira
See Also
split2.rbd
and rbd
.
Examples
data(ex5)
attach(ex5)
strip(trat, genero, bloco, sabor, quali = c(TRUE,TRUE),
mcomp = "tukey", fac.names = c("Amostras","Genero"),
sigT = 0.05, sigF = 0.05, unfold=NULL)
Statistics of data grouped by factors
Description
tapply.stat
This process lies in finding statistics
which consist of more than one variable, grouped or crossed
by factors. The table must be organized by columns between
variables and factors.
Usage
tapply.stat(y, x, stat = "mean")
Arguments
y |
Data.frame variables. |
x |
Data.frame factors. |
stat |
Method. |
Value
y Numeric x Numeric stat method = "mean", ...
Author(s)
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br
Denismar Alves Nogueira
Portya Piscitelli Cavalcanti (Adapted from Felipe de Mendiburu - GPL)
Multiple comparison: Tukey's test
Description
tukey
Performs the test of Tukey, for multiple
comparison of means.
Usage
tukey(y, trt, DFerror, SSerror, alpha = 0.05, group = TRUE, main = NULL)
Arguments
y |
Numeric or complex vector containing the response variable. |
trt |
Numeric or complex vector containing the treatments. |
DFerror |
Error degrees of freedom. |
SSerror |
Error sum of squares. |
alpha |
Significance level. |
group |
TRUE or FALSE. |
main |
Title. |
Details
It is necessary first makes a analysis of variance.
Value
y Numeric trt factor DFerror Numeric MSerror Numeric alpha Numeric group Logic main Text
Author(s)
Eric B Ferreira, eric.ferreira@unifal-mg.edu.br
Denismar Alves Nogueira
Portya Piscitelli Cavalcanti (Adapted from Felipe de Mendiburu - GPL)
References
Principles and procedures of statistics a biometrical approach Steel and Torry and Dickey. Third Edition 1997
See Also
scottknott
, duncan
,
lsd
, lsdb
, ccboot
,
snk
, ccF
.
Examples
data(ex1)
attach(ex1)
crd(trat, ig, quali = TRUE, mcomp = "tukey", sigT = 0.05)