Displaying 1 result from an estimated 1 matches for "xtrend".
Did you mean:
trend
2008 Jan 28
2
How to get out the t-test value matrix for a linear regression ?
Hi, all
I've written some R script to calculate the linear regression of a matrix.
Here below is my script:
>x<-matrix(scan("h:/data/xxx.dat",0),nrow=46,ncol=561,byrow=TRUE)
>year <- NULL
>year <- cbind(year,as.matrix(x[,1]))
>lm.sol<-lm(x~year)
>xtrend<-coef(lm.sol)[2,] # get the matrix of regression coefficient
>t.test<- ? # also want to get a similar matrix of t-test value for the regression coefficient
>class(summary(lm.sol))
> "listof"
>class(summary(lm.s...