GQtest: GQtest

Description Usage Arguments Details Value Author(s) Examples

Description

Tests for homoscedasticity

Usage

1
GQtest(residuals, subsample, nep)

Arguments

residuals

residuals for group i

subsample

the vector of c(s1i, s2i), where s1i=Ti/2 and s2i=s1i+1 (if Ti is EVEN) or where s1i=Ti/2-0.5 and s2i=s1i+1 (if Ti is UNEVEN)

nep

the number of estimated parameters for group i

Details

Calculates F statistic with a prob

Value

F statistic with a prob

Author(s)

Lech Kujawski, Piotr Zientara

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# creating artificial variables
x1=rnorm(30,0,1)
x2=rnorm(30,0,1)
e=rnorm(30,0,0.2)
y=1+2*x1+3*x2+e
# any model
model=lm(y~x1+x2)
#BGtest
ExpGQtest=GQtest(residuals=resid(model), subsample=c(15,16), nep=3)
ExpGQtest

PooledMeanGroup documentation built on May 2, 2019, 12:40 p.m.