[Solved] Regression model to predict student’s grade in R


What you’re looking for is a linear regression model.
In R, it’s invoked with lm(). You can read more here.
You’d want to fit a model predicting the grade, and then run the model on the data with the Age incremented by one, since presumably, that is the only attribute that will be changing next year.

Assuming your data is in a dataframe called data, it would look something like this:

model <- lm(Age~., data=data)

nextYear <- data
nextYear$Age <- nextYear$Age + 1
results <- predict(model, newdata=nextYear, type="response")

Make sure that all non-numeric columns are factors.

5

solved Regression model to predict student’s grade in R