Dear list,

r <- raster(nrow=10, ncol=10)
s1 <- s2<- list()
for (i in 1:12) {
    s1[i] <- setValues(r, rnorm(ncell(r), i, 3) )
    s2[i] <- setValues(r, rnorm(ncell(r), i, 3) )
}
s1 <- stack(s1)
s2 <- stack(s2)

stest <- stack(s1, s2)
fun <- function(x) { lm(x ~ time)$coefficients }
x <- calc(stest, fun)

>From the raster document, x contains the intercept and slope of the model.

Anybody could help me in producing other details of the model e.g standard
error, r-squared, p-value etc?

Thanks in advance.

	[[alternative HTML version deleted]]

