Hi, folks, Happy work in weekends >_<
My question is how to plot the dependent variable against one of the predictors with other predictors as constant. Not for the original data, but after prediction. It means y is the predicted value of the dependent variables. The constane value of the other predictors may be the average or some fixed value. ####### y=1:10 x=10:1 z=2:11 lin_model=lm(z~x+y) x_new=11:2 ####### How to plot predicted value of z from the regression model with x takes x_new and y as a constant (let's say y=1) I am thinking about using 'predict' command to generate the prediction of z with the new data.frame but there should be a better way. Thanks all. Yi [[alternative HTML version deleted]] ______________________________________________ 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.