[R] How to get predicted values of y for different x values?

halptekin halptekin at gmail.com
Tue Jul 19 19:03:53 CEST 2011


Here is my model with interaction terms and control variables (I changed
variables names for easy read): 

reg1 <- lm(y ~ x1*x2*x3 +control1 + control2 + control3) 

x1 ranges from 0 to 6; x2 from 0 to 5; and x3 from 0 to 4. All three are
discrete ordinal variables; but I will treat them as continuous variables. 

(a) How can I see the predicted values of y for each of these scenarios (210
scenarios I guess)? 
(b) How can I see the predicted value of y for the minimum and maximum
values of x1, x2, and x3 (8 scenarios)? 
(c) How can I see the predicted value of y for x1=6; x2=5; and x3=4 (1
scenario)? 

--
View this message in context: http://r.789695.n4.nabble.com/How-to-get-predicted-values-of-y-for-different-x-values-tp3678662p3678662.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list