crd: One factor Completely Randomized Design

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/crd.R

Description

Analyses balanced experiments in Completely Randomized Design under one single factor, considering a fixed model.

Usage

1
2
crd(treat, resp, quali = TRUE, mcomp = "tukey", nl = FALSE, hvar='bartlett', 
sigT = 0.05, sigF = 0.05)

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%.

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).

Note

The graphics can be used to construct regression plots and plotres for residuals plots

Author(s)

Denismar Alves Nogueira

Eric Batista Ferreira

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

For more examples, see: fat2.crd, fat3.crd, split2.crd, fat2.ad.crd and fat3.ad.crd.

Examples

1
2
3
data(ex1)
attach(ex1)
crd(trat, ig, quali = FALSE, sigF = 0.05)

Example output

------------------------------------------------------------------------
Analysis of Variance Table
------------------------------------------------------------------------
           DF     SS     MS     Fc     Pr>Fc
Treatament  3 214.88 71.626 6.5212 0.0029622
Residuals  20 219.67 10.984                 
Total      23 434.55                        
------------------------------------------------------------------------
CV = 3.41 %

------------------------------------------------------------------------
Shapiro-Wilk normality test
p-value:  0.91697 
According to Shapiro-Wilk normality test at 5% of significance, residuals can be considered normal.
------------------------------------------------------------------------

Adjustment of polynomial models of regression
------------------------------------------------------------------------
$`Linear Model\n------------------------------------------------------------------------`
   Estimate Standard.Error       tc p.value
b0 100.2878        1.13200 88.59383 0.00000
b1  -0.4136        0.12102 -3.41775 0.00273

$`R2 of linear model`
[1] 0.5970766

$`Analysis of Variance of linear model`
              DF        SS        MS    Fc p.value
Linear Effect  1 128.29872 128.29872 11.68 0.00273
Lack of fit    2  86.57943  43.28972  3.94 0.03605
Residuals     20 219.67103  10.98355              

------------------------------------------------------------------------
$`Quadratic Model\n------------------------------------------------------------------------`
   Estimate Standard.Error       tc p.value
b0 101.5728        1.31874 77.02292 0.00000
b1  -1.1846        0.42355 -2.79681 0.01114
b2   0.0514        0.02706  1.89949 0.07202

$`R2 of quadratic model`
[1] 0.7815039

$`Analysis of Variance of quadratic model`
                 DF        SS        MS    Fc p.value
Linear Effect     1 128.29872 128.29872 11.68 0.00273
Quadratic Effect  1  39.62940  39.62940  3.61 0.07202
Lack of fit       1  46.95003  46.95003  4.27 0.05187
Residuals        20 219.67103  10.98355              

------------------------------------------------------------------------
$`Cubic Model\n------------------------------------------------------------------------`
    Estimate Standard.Error       tc p.value
b0 102.19833        1.35299 75.53497 0.00000
b1  -3.14450        1.03828 -3.02858 0.00663
b2   0.42670        0.18353  2.32497 0.03071
b3  -0.01668        0.00807 -2.06750 0.05187

$`R2 of cubic model`
[1] 1

$`Analysis of Variance of cubic model`
                 DF        SS        MS    Fc p.value
Linear Effect     1 128.29872 128.29872 11.68 0.00273
Quadratic Effect  1  39.62940  39.62940  3.61 0.07202
Cubic Effect      1  46.95003  46.95003  4.27 0.05187
Lack of fit       0   0.00000   0.00000     0       1
Residuals        20 219.67103  10.98355              

------------------------------------------------------------------------
    Levels    Observed Means
1        0         102.19833
2       10          96.74333
3       15          94.74333
4        5          95.05833
------------------------------------------------------------------------

ExpDes documentation built on May 18, 2018, 1:03 a.m.