layard: Test for homogeneity of variances of Layard

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

View source: R/layard.R

Description

layard Performs the test for homogeneity of variances of Layard for Jackknife (1973).

Usage

1
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

1
2
3
data(ex1)
attach(ex1)
crd(trat, ig, quali = FALSE, hvar = "layard")

Example output

Attaching package:ExpDesThe following object is masked frompackage:stats:

    ccf

------------------------------------------------------------------------
Analysis of Variance Table
------------------------------------------------------------------------
           DF     SS MS     Fc     Pr>Fc
Treatament  3 214.88  3 6.5212 0.0029622
Residuals  20 219.67  2                 
Total      23 434.55  1                 
------------------------------------------------------------------------
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.
------------------------------------------------------------------------

------------------------------------------------------------------------
Homogeneity of variances test
p-value:  0.5906373 
According to the test of layard at 5% of significance, residuals can be considered homocedastic.
------------------------------------------------------------------------

Adjustment of polynomial models of regression
------------------------------------------------------------------------

Linear Model
==========================================
   Estimate Standard.Error   tc    p.value
------------------------------------------
b0 100.2878     1.1320     88.5938    0   
b1 -0.4136      0.1210     -3.4177 0.0027 
------------------------------------------

R2 of linear model
--------
0.597077
--------

Analysis of Variance of linear model
================================================
              DF    SS       MS     Fc   p.value
------------------------------------------------
Linear Effect 1  128.2987 128.2987 11.68 0.00273
Lack of fit   2  86.5794  43.2897  3.94  0.03605
Residuals     20 219.6710 10.9836               
------------------------------------------------
------------------------------------------------------------------------

Quadratic Model
==========================================
   Estimate Standard.Error   tc    p.value
------------------------------------------
b0 101.5728     1.3187     77.0229    0   
b1 -1.1846      0.4236     -2.7968 0.0111 
b2  0.0514      0.0271     1.8995  0.0720 
------------------------------------------

R2 of quadratic model
--------
0.781504
--------

Analysis of Variance of quadratic model
===================================================
                 DF    SS       MS     Fc   p.value
---------------------------------------------------
Linear Effect    1  128.2987 128.2987 11.68 0.00273
Quadratic Effect 1  39.6294  39.6294  3.61  0.07202
Lack of fit      1  46.9500  46.9500  4.27  0.05187
Residuals        20 219.6710 10.9836               
---------------------------------------------------
------------------------------------------------------------------------

Cubic Model
==========================================
   Estimate Standard.Error   tc    p.value
------------------------------------------
b0 102.1983     1.3530     75.5350    0   
b1 -3.1445      1.0383     -3.0286 0.0066 
b2  0.4267      0.1835     2.3250  0.0307 
b3 -0.0167      0.0081     -2.0675 0.0519 
------------------------------------------

R2 of cubic model
-
1
-

Analysis of Variance of cubic model
===================================================
                 DF    SS       MS     Fc   p.value
---------------------------------------------------
Linear Effect    1  128.2987 128.2987 11.68 0.00273
Quadratic Effect 1  39.6294  39.6294  3.61  0.07202
Cubic Effect     1  46.9500  46.9500  4.27  0.05187
Lack of fit      0     0        0       0      1   
Residuals        20 219.6710 10.9836               
---------------------------------------------------
------------------------------------------------------------------------

ExpDes documentation built on Oct. 5, 2021, 9:09 a.m.

Related to layard in ExpDes...