Bookmark and Share

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: Last estimates not found after bs4rw


From   [email protected] (Jeff Pitblado, StataCorp LP)
To   [email protected]
Subject   Re: st: Last estimates not found after bs4rw
Date   Fri, 20 Sep 2013 14:15:58 -0500

Aranzazu <[email protected]> is trying to use -bs4rw-:

> I am running a logistic regression after svy. I am having problems
> using bs4rw. I wrote a very simple program to check the syntax of
> bs4rw and I obtained "last estimates not found". Here is my do-file:
> 
> program define forecast, properties(svyb)
> logit y x1 x2 x3 [pw=wt]
> end
> bs4rw, rw(wt*): forecast
> 
> 
> On the other hand, I do not have problems using:
> 
> bs4rw, rw(wt*): logit y x1 x2 x3 [pw=wt]

-bs4rw- is a user-written prefix command, authored by me, and was most likely
downloaded from this location

	http://www.stata.com/users/jpitblado

The official -svy- prefix was made to work with bootstrap replicate weights in
Stata 12, so -bs4rw- is now obsolete.

Aranzazu does not indicate which Stata version is being used, so I will assume
it is Stata 13.  However, I will also assume that Aranzazu still wants to use
-bs4rw-.

Given that

	. bs4rw, rw(wt*): logit y x1 x2 x3 [pw=wt]

works, it is not clear why Aranzazu wants to wrap -logit- in another program.
In any event, I can see 2 things wrong with Aranzazu's program.

1.  -forecast- is an official command, new in Stata 13.  For this reason, I
will be using -myprog- instead of -forcast-.

2.  The call to -logit- in Aranzazu's -forcast- program should not be using
a hardcoded weight specification.  Here is how I would code this:

	program define myprog
		logit `0'
	end

Now the call using -bs4rw- looks like

	. bs4rw, rw(wt*): myprog y x1 x2 x3 [pw=wt]

and should behave just like -logit-.  I assume Aranzazu is going to do
something with the -logit- results; otherwise, I recommend just using -logit-
directly.

--Jeff
[email protected]
*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index