Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: invalid syntax of marksample depending on option specified in preceding line for syntax?


From   László Sándor <sandorl@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: invalid syntax of marksample depending on option specified in preceding line for syntax?
Date   Tue, 27 Mar 2012 16:56:34 -0400

Hi,

This might be a one-liner for one of you, but I'd appreciate the help.
My ado file (currently tested on Stata 12.1 for Mac, but starting with
"version 10.1") includes the lines:

	syntax varlist [if/] [, Weight(varname) nbins(integer 20)
controls(varlist) absorb(varname) x_q(varname) connect NOAddmean
reportreg create_xq saving(string) *]
	marksample touse

Now all works fine until I try to specify a weight. Because having a
", weight(w)" option (variable w exists) gives me a syntax error — but
not for the syntax command, but for marksample.

Trace:
  - syntax varlist [if/] [, Weight(varname) nbins(integer 20)
controls(varlist) absorb(varname) x_q(varname) connect NOAddmean
reportreg create_x
> q saving(string) *]
  - marksample touse
invalid syntax

What is this about?

Thanks in advance,

Laszlo

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index