[R] Significance of trend

Muhammad Rahiz muhammad.rahiz at ouce.ox.ac.uk
Mon Oct 31 19:51:36 CET 2011


Hi everyone,

I'm trying to determine the significance of a trendline. From my internet
search months ago, I came across the following post. I modified tim and
dat for simiplicity.

tim <- 1:10
dat <- c(0.17, 1.09 ,0.11, 0.82, 0.23, 0.38 ,2.47 ,0.41 ,0.75, 1.44)

fstat <- summary(lm(dat~tim))$fstatistic
p.val <- 1-pf(fstat["value"],fstat["numdf"],fstat["dendf"])

The resultant p.value is 0.261. But I want to know if this
value is significant and at what significance level. How do I check for
it?

Thanks

-- 
Muhammad



More information about the R-help mailing list