I would like to investigate the relationship between high school grades for different subjects and university credits earned in the first year. I plan to use multiple linear regression (OLS). I have data on the average grades of students in several subjects (that is, the average grade per subject, per student) and the credits earned by those students in their first year of university.
The problem however is that by far most students do not follow all subjects. For example, some follow history, some don't, some follow math 1, some follow math 2, some follow both. This means I can't construct a matrix $X$ that contains all average grades per subject per student, to perform the regression with, because I would have 'missing' values in almost all rows.
How should I deal with this?
Deleting all students that don't follow all subjects would leave me with very few data points and is probably not very representative of the general population of students.
Googling has led me to data imputation, would that be a good idea here? If so, how can I do this and what method should I apply?