Skip to content

lsfit result - how to compute t-values for coefficients

1 message · Liaw, Andy

#
You can try something like:

fit <- lsfit(X, array(Y, dim = c(t.length, prod(d.dim[2:4])))) 
rsq <- sapply(ls.print(fit, print.it=FALSE)$coef.table,
              function(x) x[-1,c(1, 3)])
dim(rsq) <- c(ncol(X), 2, dim(rsq)[2])
dimnames(rsq) <- list(NULL, c("Estimate", "t-value"), prod(d.dim[2:4]))

HTH,
Andy