search for: lin_model

Displaying 1 result from an estimated 1 matches for "lin_model".

2010 Aug 07
3
plot the dependent variable against one of the predictors with other predictors as constant
...t 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. Thank...