I'd like to retrieve the values of a second order polynomial regression line based on a list of values for a parameter.
Here is the model:
fit <- lm(y ~ poly(age, 2) + height + age*height)
I would like to use a list of values for age and retrieve the value on the regression line, as well as the standard deviation and standard errors. 'age' is a continuous variable, but I want to create an array of discrete values and return the predicted values from the regression line.
Example:
age <- c(10, 11, 12, 13, 14)
ageandheight. In order to get predictions, you need to provide both anageand aheight- NM_