I have code like this:
Code:
regress y x1 x2 x3 egen p10 = pctile(x1), p(10) egen p20 = pctile(x1), p(20) margins, at (x1= (p10 p20))
I know that x1 is between 0 and 1, so my first (and prefered) attempt was
Code:
margins, at (x1=(0(0.1)1))
Can you help me to make either the first (with percentiles) or the second version (evaluation margins at values not in the data set) work? I have the feeling it's just about type casting the variables p10 and p20 correctly.
I really tried to find help online but very different errors are treated under "invalid numlist".
All your help is highly appreciated!
Best,
Chris
0 Response to margins at percentiles
Post a Comment