Estimating panel model in R
For linear regression you want to use R's lm() function, like this:

my.model &lt;- lm(response.variable ~ predictor1 + predictor2, data = my.data)


Look at the model using:

summary(my.model)


You can apply this model to a "test" dataset (your 20% split) by using predict(), like this:

predict(my.model, test.data)