[R] Recodifying a factor due to results in lm

From: agent dunham <crosspide_at_hotmail.com>
Date: Thu, 03 Mar 2011 08:07:29 -0800 (PST)


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.

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Thu 03 Mar 2011 - 17:08:33 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 03 Mar 2011 - 17:40:18 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive