Displaying 1 result from an estimated 1 matches for "avg_pred".
Did you mean:
augpred
2008 Apr 23
2
Can I get rid of this for loop using apply?
Hey all,
The code below creates a partial dependence plot for the variable x1 in the
linear model y ~ x1 + x1^2 + x2.
I have noticed that the for loop in the code takes a long time to run if the
size of the data is increased. Is there a way to change the for loop into
an apply statement? The tricky part is that I need to change the values of
x1 in each step of the loop to give me the