Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Problem with syntax - Option X required ... but Options not


From   "Joseph Coveney" <[email protected]>
To   "Statalist" <[email protected]>
Subject   Re: st: Problem with syntax - Option X required ... but Options not
Date   Sat, 10 Nov 2007 14:11:21 +0900

Tiago wrote:

I would like to know your opinion about an error I am having when I run a
simple program.

[snipped--reproduced below]

Assuming I have two variables, a and b:

why does the following problem show up?

. rtpcr a b
option model() required
r(198);

. rtpcr a b, model(overdominant)
options not allowed
r(101);

--------------------------------------------------------------------------------

I'm using Stata 10, but I can't reproduce your error when I type-in what
you've shown of your program. The contents of Results window from running
the do-file are copied and pasted below. Notice that it doesn't balk when I specify -model(overdominant)-.

Is is possible that -rtpcr- calls another program that doesn't allow options
and tries to feed it options? I'd recommend -set trace on- for further
diagnosis. You can adjust -set tracedepth- to dig deeper or shallower for
called programs.

Joseph Coveney


. version 9.2

. drop _all

. set obs 2
obs was 0, now 2

. generate a = 1

. generate b = 1

. *
. * Program copied and pasted below (-end- added)
. *
. capture program drop rtpcr

. *! rtpcr v1. TVP 2007
. program define rtpcr, rclass
1. version 9.2
2. syntax varlist(min=2 max=100 default=none numeric) [if] [in] ,
MODEL(string)
3. end

. *
. capture noisily rtpcr a b
option model() required

. rtpcr a b, model(overdominant)

. exit

end of do-file



*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index