I believe this needs to be posted on general statistical help list
as you appear to have some confusion about how linear regression
works, especially with categorical variables.
might help you with R's way of dealing with the issues that I believe
you're asking about, but it may not make much sense if I'm correct
about your underlying misunderstanding. If I'm wrong, that and perhaps
?C will probably do it for you.
On Thu, Dec 15, 2011 at 1:44 PM, Abraham Mathew <[hidden email]> wrote:
> I'm running a linear model in R using the car package.
> I have a variable education, which i have recoded and regrouped to my
> However, R seems to place each element of that variable in alphabetical
> When I am running the model, don't I need the model order from lowest to
> highest to make an inference that
> a one unit change in one variable produced a one unit change in another.
> educ2 = NA
> educ2[educ %in% levels(educ)[c(4,7)]] <- "HS or Some College"
> educ2[educ %in% levels(educ)[1:2]] <- "College Degree"
> educ2[educ %in% levels(educ)[c(3,5)]] <- "Advanced Degree"
> educ2[educ %in% levels(educ)[c(6,8)]] <- "Other"
> educ2 = factor(educ2)
> The above code is how I regrouped the variable. How can I regroup it so
> that it's levels
> are from lowest to highest. What if they're numeric values"
> *Abraham Mathew
> Statistical Analyst
> This or That Media, Inc.
> [hidden email] > 720-648-0108
> [[alternative HTML version deleted]]
> [hidden email] 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.