"Angelo Passalacqua" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]:
> I entered the following: > > formula<-nst~age+soc+inc+reg+imp > > pnstlm<-lm(formula,nst) > > summary(pnstlm) > > imp and soc are ordered categorical variables but the summary does > not give an output of the overall p-values, just individual > comparisons. I can't find help for this in the manual. Is there a > command or option change in the summary to find out the overall > p-value? Simpson's suggestion is far simpler than my solution, and probably answers your question more accurately, but here is another way of looking at regression with ordered independent variables: If the levels of the factor are ordered as you expect them (and even if the factor is not of class "ordered factor"), rather than some default alpha ordering, then you could try: pnstlm2 <- lm(nst ~ age + as.numeric(soc) + inc + reg + as.numeric(imp), data=nst) They won't be centered, but in this simple model, that will only change the intercept. The coefficients will be the change in nst$nst per single factor increase in "soc" or "imp". The difference in deviance between your first model and the one you have now will be a test of joint linearity of "imp" and "soc" in relation to "nst". (You probably want to construct them individually.) (Personally, I think it is a bad practice to create a variable with the same name as a dataframe.) -- David Winsemius ______________________________________________ R-help@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.