Split residual sum of squares from normal linear regression

rssSplit(fit, df0 = max(1, floor(fit$df/10)), seed = -71407)

Arguments

fit

lm object

df0

degrees of freedom for the smaller of the two residual sums of squares

seed

random seed for constructing the basis vectors of the split

Value

a two-dimensional vector of independent sums of squares

Author

Peter Hoff

Examples

n<-30 ; p<-6 ; sigma2<-1.5 X<-matrix(rnorm(n*p),n,p) y<-X%*%rnorm(6) + sqrt(sigma2)*rnorm(n) ss<-rssSplit(lm(y~ -1+X)) df<-as.numeric( substring(names(ss),first=3)) ss/df
#> df2 df22 #> 1.732368 1.335956