Displaying 2 results from an estimated 2 matches for "lmresult".
Did you mean:
ldresult
2006 Mar 10
4
How to get the intercept from lm?
Hi
I am using R 2.2.0 under SuSE 10
I want to use lm() to get the slope and intercept for several daatasets
and store them in a database. So far so good - but how do I extract the
slope and the intercept from the result from lm()?
my code looks like this:
lmNNDens <- lm(log(DensNN$MeanNN) ~ log(DensNN$MeanDensity))
anovaLM <- anova(lmNNDens)
Results$slope[No] <- ???lmNNDens???
2009 Feb 25
0
RE : multiple regressions on columns
Hi David: If your variables are in a dataframe called DF and the
dependent variable is in the first column , you can do below but you
probably are well aware of this anyway.
lmresults<-lapply(names(DF[,-1],function(.name) {
lm(DF[,1] ~ DF[,.name], data=DF)
})
This will run through each of the variables in the dataframe and regress
the first column on each variable individually.
On Wed, Feb 25, 2009 at 3:56 AM, GOUACHE David wrote:
> Hello and thanks for your re...