Dear list,

I have a 4-dimensional array Y of dimension 330 x 67 x 35 x 51. I have a design 
matrix X of dimension 330 x 4. I want to fit a linear regression of each

lm( Y[, i, j, k] ~ X). for each i, j, k.

Can I do it in one shot without a loop?

Actually, I am also interested in getting the p-values of some of the 
coefficients -- lets say the coefficient corresponding to the second column of 
the design matrix. Can the same be done using array-based operations?

I would be happy to clarify if anything is unclear.

Many thanks and best wishes,
Ranjan

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to