0
$\begingroup$

I am running a regression model to predict dropout from an online program. People have to take 5 classes but some people dropped before taking the 5 courses. So I am using a dummy variables that is 1 if the person took that course or 0 if didn't take it. So the model looks like this:

Call: glm(formula = dropped ~ gender + region + level_of_education + 
    SC0x_taken *enroll_time_SC0x + SC1x_taken * enroll_time_SC1x + 
    SC2x_taken * enroll_time_SC2x + SC3x_taken * enroll_time_SC3x + 
    SC4x_taken * enroll_time_SC4x + SC0x_taken * verify_time_SC0x + 
    SC1x_taken * verify_time_SC1x + SC2x_taken * verify_time_SC2x + 
    SC3x_taken * verify_time_SC3x + SC4x_taken * verify_time_SC4x + 
    SC0x_taken * tot_video_hours_SC0x + 
    SC1x_taken * tot_video_hours_SC1x + 
     SC2x_taken * tot_video_hours_SC2x + 
    SC3x_taken * tot_video_hours_SC3x + SC4x_taken * 
    tot_video_hours_SC4x + SC0x_taken * tot_pp_hours_SC0x + 
    SC1x_taken * tot_pp_hours_SC1x + SC2x_taken * 
    tot_pp_hours_SC2x + SC3x_taken * tot_pp_hours_SC3x + 
    SC4x_taken * tot_pp_hours_SC4x + 
    SC0x_taken * Grade_SC0x + SC1x_taken * Grade_SC1x + 
    SC2x_taken * Grade_SC2x + SC3x_taken * Grade_SC3x + 
    SC4x_taken * Grade_SC4x  + 
    SC0x_taken * missed_assignments_SC0x + 
    SC1x_taken * missed_assignments_SC1x + 
    SC2x_taken * missed_assignments_SC2x + 
    SC3x_taken * missed_assignments_SC3x + 
    SC4x_taken * missed_assignments_SC4x + 
    Order, family = "binomial", data = train)

I used the dummy variables so if the person has not taken the course, that value becomes zero and thus does not affect the model. But in the result, I have too many NAs and it says "not defined because of singularities"

$\endgroup$
  • 3
    $\begingroup$ How many samples do you have? You probably can't estimate all of these specified effects because your sample size is too small. Besides, if you're trying to predict dropout of a course, why not go with a survival model (time until event)? In that case, dropout would be 'censored' for those who completed the course. It might not be the best way to model this problem, but it would require far less parameters than the model you proposed here. $\endgroup$ – Frans Rodenburg Apr 20 at 0:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.