Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Margins saving error

    Hi Statalist,

    I'm having trouble saving a margins dataset after running a non-parametric regression and I'm struggling to see where my mistake is.

    After opening my dataset, my exact code is:

    Code:
    npregress kernel std_dev n if c5==1 & year==2018, vce(bootstrap, reps(100) seed(100))
    margins, at(n=(1(1)32)), saving (marginsus)
    Stata returns with:

    Code:
    invalid 'saving'
    r(198);
    How can I resolve this issue?

  • #2
    Too many commas. Eliminate the comma that precedes -saving(marginsus)- and it will run without complaints. In Stata syntax, a comma is used to separate the start of a command from its options, but it is not used between two options.

    Comment


    • #3
      Originally posted by Clyde Schechter View Post
      Too many commas. Eliminate the comma that precedes -saving(marginsus)- and it will run without complaints. In Stata syntax, a comma is used to separate the start of a command from its options, but it is not used between two options.
      Problem solved, thank you.

      Comment

      Working...
      X