Hi Fred, Maybe this helps My.lm<-summary(lm(y~x)) My.lm$coefficients It gives you the parameters estimates with t and p-values. Have a look at names(my.lmmodel) and names(summary(my.lmmodel) If you only need to calculate the p-value having t then p <- 2*(1-pt(abs(t),df=your.df))) -----Original Message----- From: Fred JEAN [mailto:frederic.jean at univ-brest.fr] Sent: Freitag, 22. November 2002 22:09 To: r-help at stat.math.ethz.ch Subject: [R] simple test on slope of lm() Hello I want to compare the slope (let's say 'b') of a linear model obtained with lm() to a theoretical value (let's say 'th'). To do so, I think I should compute a 't value' using something like : (b - 'th')/standard.deviation(b) and then look at the p-value of this computed t. I don't understand how to do this in a simple way, just using lm() outputs for example. I'm sorry of such a naive/newbie question, and thank you so much for taking time to answer. Fred -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. -.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._. _._._._ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
simple test on slope of lm()
1 message · Gregor Gawron