[R] Recodifying a factor due to results in lm

agent dunham crosspide at hotmail.com
Thu Mar 3 17:07:29 CET 2011


Dear community, 

I'm doing a lm. In the independent variables I've got a categorical one.
Here is its histogram: 
http://r.789695.n4.nabble.com/file/n3333638/altitude.png 

I did this regression:

lmeo2.52f <- lm(dat82$IncAltuDom ~ dat82$hdom2+log(dat82$CV)+ dat82$CA+
dat82$FCC+ factor(dat82$IdAltitud))

I obtain: 


Coefficients:
                         Estimate Std. Error t value Pr(>|t|)    
(Intercept)               8.78222    0.94619   9.282 3.72e-15 ***
dat82$hdom2              -0.30859    0.03875  -7.963 2.73e-12 ***
log(dat82$CV)            -0.42943    0.24568  -1.748   0.0835 .  
dat82$CA                 -2.98157    2.29904  -1.297   0.1977    
dat82$FCC                 0.02300    0.01067   2.156   0.0335 *  
factor(dat82$IdAltitud)1 -0.12142    0.40361  -0.301   0.7642    
factor(dat82$IdAltitud)2  0.24341    0.43451   0.560   0.5766    
factor(dat82$IdAltitud)3 -0.64904    0.47114  -1.378   0.1714    
factor(dat82$IdAltitud)4 -1.14334    0.67509  -1.694   0.0935 .  
factor(dat82$IdAltitud)5 -2.13251    0.82463  -2.586   0.0112 *  


I thought I need to recodify my factor, 

q1 How can I do it?

q2 Apologies I'm pretty newbie with this, ... I don't know how to interpret
the regression when factors ... The factors created by  default, compare the
1st factor with the other 5?  ... but what does it mean??? is it good in my
case ??

Thanks in advance, user at host.com


--
View this message in context: http://r.789695.n4.nabble.com/Recodifying-a-factor-due-to-results-in-lm-tp3333638p3333638.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list