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: Producing graph with predictions after IVPOIS
From
"Anat (Manes) Tchetchik" <[email protected]>
To
[email protected]
Subject
Re: st: Producing graph with predictions after IVPOIS
Date
Thu, 7 Mar 2013 21:29:08 +0200
Thanks much Austin!!!
this was very helpful!
On Thu, Mar 7, 2013 at 6:59 PM, Austin Nichols <[email protected]> wrote:
> Anat (Manes) Tchetchik <[email protected]>
> In addition to the oft-repeated "nots" of the Statalist FAQ, one can
> offer the positive advice:
> *Do use publicly available data* to construct an example of what you
> want or the error you run into.
>
> clear
> use http://fmwww.bc.edu/RePEc/bocode/i/ivp_bwt.dta
> g lnbw=ln(bw)
> loc x "parity white male"
> loc z "edfwhite edmwhite incwhite cigtax88"
> ivreg2 lnbw `x' (cigspreg=`z')
> *gmm (bw*exp(-{xb:`x' cigspreg}-{b0})-1), inst(`x' `z') onestep
> *above works only in Stata 11+
> ivpois bw `x', endog(cigspreg) exog(`z')
> ren cigspreg tmp
> g double pbw=.
> qui forv i=1/6 {
> g cigspreg=(`i'-1)*10
> predict double xb
> g double exb=exp(xb)
> su exb, mean
> replace pbw=r(mean) in `i'
> drop xb exb cigspreg
> }
> g c=(_n-1)*10 in 1/6
> la var pbw "Predicted mean birthweight"
> la var c "Cigarettes during pregnancy"
> la var tmp "Cigarettes during pregnancy"
> la var bw "Birthweight"
> ren tmp cigspreg
> sc bw tmp, msize(vsmall)||sc pbw c, c(l)
>
>
> On Thu, Mar 7, 2013 at 11:29 AM, Nick Cox <[email protected]> wrote:
>> Specifically
>>
>> not explaining where user-written programs you refer to come from
>>
>> not explaining what "doesn't work" means
>>
>> not using the -cmdname- convention (neither do most people, but it's
>> still a good idea).
>>
>> In fact these points don't really hinge on what is or is not in the
>> FAQ or even whether there is one.
>>
>> Just imagine you wrote a program and someone says to you "I tried your
>> program but it doesn't work". This is essentially no information.
>>
>> Or just imagine that you are the local Stata expert and someone says
>> to you "I have problems with the -foobar- command". Your first
>> question has to be "What is that?"
>>
>> Unclear questions waste everyone's time, including the people who
>> wrote them, because they won't get good answers.
>>
>> Nick
>>
>> On Thu, Mar 7, 2013 at 3:08 PM, Anat (Manes) Tchetchik
>> <[email protected]> wrote:
>>
>>> Hi Nick,
>>> Thanks for your answer.
>>> I probably missed something, What was the thing I should have done
>>> which I haven't? is there an archive with FAQs I could have search
>>> for the answer there?
>>> Anyway, I have posted two questions in the past few months, I didn't
>>> realize it is that much.
>>> Anat
>>>
>>> On Thu, Mar 7, 2013 at 3:09 PM, Nick Cox <[email protected]> wrote:
>>>> I have rewritten this question using Statalist FAQ guidelines. Why is
>>>> this (seemingly) so difficult to understand and to do? Being new to
>>>> Statalist can't be a reason here as Anat has posted many questions
>>>> over some time.
>>>>
>>>> Anat Tchetchik, PhD
>>>>
>>>> I ran an -ivpois- model and want to produce few figures.
>>>>
>>>> -ivpois- is a user-written command by Austin Nichols from SSC.
>>>>
>>>> In the Poisson model I used to employ the -prgen- command, for example:
>>>>
>>>> prgen income, x( spain=1) from(1) to(14) ncases(14) gen(meetingsbrypr)
>>>>
>>>> But it doesn't work for -ivpois-. -prgen- is another user-written
>>>> command, which I downloaded from <I can't fill that in, as several
>>>> places could qualify>.
>>>>
>>>> Any ideas for other commands?
>>>>
>>>> Nick
>>>>
>>>> On Thu, Mar 7, 2013 at 12:54 PM, Anat (Manes) Tchetchik
>>>> <[email protected]> wrote:
>>>>> Hi all.
>>>>>
>>>>> I ran an IVPOIS model and wan't to produce few figures.
>>>>> In the poisson model I used to employ the prgen command
>>>>> (for example: prgen income, x( spain=1) from(1) to(14) ncases(14) gen
>>>>> (meetingsbrypr)
>>>>> But it doesn't work for the IVpois
>>>>> Any ideas for other commands?
> *
> * 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/
--
Anat Tchetchik, PhD
Department of Hotel and Tourism Management
Guilford Glazer Faculty of Business and Management
Ben-Gurion University of the Negev
P.O.Box: 653
Beer-Sheva, Israel, 84105
E-mail: [email protected]
Phone 972-(0)8-6479735
Fax: 972-(0)8-6472920
Web: http://cmsprod.bgu.ac.il/Eng/som/hotelmanage/Staff/Academic/ChechikA.htm
*
* 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/