Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set obs 10000
- gen x=rnormal(0,1)
- gen y=30*x +20*x^2+100*rnormal(0,1)
- * put x on an ordinal scale, that runs from -5 to 5
- egen xx = cut(x), group(11)
- replace xx=xx-5
- reg y c.xx##c.xx
- margins, at(xx=(-5/5))
- marginsplot
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement