Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: st: Problem with bfit command for model selection
From
Joe Canner <[email protected]>
To
"[email protected]" <[email protected]>
Subject
RE: st: Problem with bfit command for model selection
Date
Thu, 20 Mar 2014 20:36:34 +0000
Lubo,
I was able to reproduce your error, both using the auto.dta sample data set and the spmdata sample data set that comes with -bfit-. After some exploring, I determined that the error stems from trying to run logit models that contain only categorical independent variables. Whether or not it makes sense to run such a model (since -bfit- is designed to generate polynomial terms from any continuous variables in the model), it is definitely a bug, since -bfit- should warn you that this is a problem or should be able to pass along the results from such a model without generating an error.
To reproduce the bug on the spmdata sample data set, do the following:
. use spmdata, clear
. gen binary=rouond(runiform()) // You can generate more categorical variables if you want, but the result is the same
. bfit logit w binary
You can use a similar procedure with the auto sample data set:
. sysuse auto, clear
. gen binary=rouond(runiform()) // You can generate more categorical variables if you want, but the result is the same
. bfit logit foreign binary rep78
Using one of these examples, you should be able to provide the author of -bfit- with enough information to reproduce the bug.
Regards,
Joe
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Joe Canner
Sent: Thursday, March 20, 2014 3:18 PM
To: [email protected]
Subject: RE: st: Problem with bfit command for model selection
Lubo,
I don't know much about -bfit- (as per the FAQ, you should provide information on where this came from), but based on what I could find out about it, I can't imagine a reason why it would require a string variable. Accordingly, the only suggestion I can provide is to do a -set trace on- before running the -bfit- command and see exactly where the problem is. If that doesn't give you any hints, report back and perhaps someone here will have some ideas.
Regards,
Joe Canner
Johns Hopkins University School of Medicine
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Lubo Larsson
Sent: Thursday, March 20, 2014 12:40 PM
To: [email protected]
Subject: Re: st: Problem with bfit command for model selection
Hello,
The actual command was : bfit logit v gend appt cdate
The variables were originally in an SPSS file then converted to Stat
format using StatTransfer.
Lubo.
On Thu, Mar 20, 2014 at 11:27 AM, Richard Goldstein
<[email protected]> wrote:
> as per the FAQ, please show us what you actually typed
>
> Rich
>
> On 3/20/14, 11:51 AM, Lubo Larsson wrote:
>> Hello,
>> I am trying to use bfit. The syntax is: bfit logit depvar indepvars.
>>
>> However I am getting an error message r(3254):
>> st_local(): 3254 nonstring found where string required
>>
>> Would very much appreciate if anyone has any insights on this.
>>
>> Regards,
>> Lubo
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/statalist-faq/
> * http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/