By default, mcp wants to plot the predicted values for EVERY value of the continuous variable; but it also has a limit of 70 unique values. So, the default works fine for something like years of education, but doesn't work for things like Joe's age variable. And, of course, sometimes continuous variables have literally thousands of unique values in a data set.
When you can't plot a prediction for every value, you have to go to plan B. Something like Joe's going in 2 year intervals is usually fine. Dividing a variable into 20 equally sized intervals may also be fine. But it may not work well if you have extreme outliers, e.g. if income ranges between $0 and $1 billion you probably don't want your plotting values to be $50 million, $100 million, $150 million, etc.
This is not unique to mcp -- you'd have the same issues with picking and plotting points in margins and marginsplot. But, you mostly need to think about what points you want to plot values for if you can't afford the luxury of plotting points for every observed value. You could use some sort of formula (e.g. divide up into 20 intervals, or do it for every other year or every 5 years) but you could also just specify values yourself.
Under most conditions, I would think 20 points would be plenty. But, if you have a bunch of spline functions, where the slope keeps on changing, maybe you need more points than that. If you weren't careful, I suppose you could totally miss a range of the variable values where the slope differed from values right before it and right after it.
One last sidelight: Joe earlier gave the code
You could also do
When you can't plot a prediction for every value, you have to go to plan B. Something like Joe's going in 2 year intervals is usually fine. Dividing a variable into 20 equally sized intervals may also be fine. But it may not work well if you have extreme outliers, e.g. if income ranges between $0 and $1 billion you probably don't want your plotting values to be $50 million, $100 million, $150 million, etc.
This is not unique to mcp -- you'd have the same issues with picking and plotting points in margins and marginsplot. But, you mostly need to think about what points you want to plot values for if you can't afford the luxury of plotting points for every observed value. You could use some sort of formula (e.g. divide up into 20 intervals, or do it for every other year or every 5 years) but you could also just specify values yourself.
Under most conditions, I would think 20 points would be plenty. But, if you have a bunch of spline functions, where the slope keeps on changing, maybe you need more points than that. If you weren't careful, I suppose you could totally miss a range of the variable values where the slope differed from values right before it and right after it.
One last sidelight: Joe earlier gave the code
Code:
gen educrange=_n in 1/21 // Make a dummy set of education variables for mcp
Code:
range educrange 1 21 21
Comment