Code:
areg pass i.low_income std_prior_test_score std_prior_test_score_sq std_prior_test_score_cubed other_covs, absorb(fixedeffect)
I want to plot the predicted probability of passing against std_prior_test_score at the means of the other covariates. I have played around with the lpoly and margins commands, but have run into issues. Here's what I've done with margins:
Code:
margins i.lowinc_max, at(std_prior_test_score_sq(-2.5(.1)1.5)) atmeans marginsplot
Array
Of course, I'm hoping to obtain the nonlinear relationship with the x-axis variable. Am I able to obtain this nonlinear predictions using the margins command? Or perhaps using a combination of predict and lpoly?
Eventually, I would like to plot the predictions from the following model as well:
Code:
areg pass i.low_income i.low_income#c.std_prior_test_score i.low_income#c.std_prior_test_score_sq i.low_income#c.std_prior_test_score_cubed other_covs, absorb(fixedeffect)
0 Response to Plotting nonlinear predicted probabilities from multivariate model against a continous variable
Post a Comment