Is it possible to change the confidence interval level (say from the default 95% to 90%) when using Stata's marginsplot
command? It does not seem to accept the level(90)
option or keep information from a preceding margins, level(90)
command.
Asked
Active
Viewed 4,850 times
-3

Roberto Ferrer
- 11,024
- 1
- 21
- 23

M Duna
- 1
- 1
- 2
-
Please read the _Asking_ section in http://stackoverflow.com/help on how to ask good questions. – Roberto Ferrer Jan 28 '15 at 10:28
1 Answers
1
Please post exact code along with your explanation of what went wrong. It's difficult to assess what the problem is if you don't do that. This works fine (from the help file):
clear
set more off
webuse nhanes2
regress bpsystol agegrp##sex
margins agegrp
marginsplot, level(80)

Roberto Ferrer
- 11,024
- 1
- 21
- 23
-
Dear Roberto, thank you for you prompt response. I am using STATA 12. My code is: `nbreg pprev i.major##c.efrac civilwar lpoplog lgdplog lpolity lpolitysq lpprev enr, vce (cluster ccode) level(90)` `margins major, at(efrac==(0(.1)1)civilwar=0 lpprev=0) atmeans level(90)` `marginsplot, recast(line) recastci(rarea) yline(0) level(90)` STATA returns: "option level() not allowed". I get the same msg when running the code you posted above. Any idea of what I am doing wrong? – M Duna Jan 29 '15 at 11:18
-
1It seems to work if I `set level 90, permanently` before running the three commands without the `level()` option... Problem solved. – M Duna Feb 04 '15 at 09:21