Statalist


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

st: Re: follow-up


From   Maarten buis <[email protected]>
To   "John L. Worrall" <[email protected]>
Subject   st: Re: follow-up
Date   Wed, 14 Jan 2009 16:32:03 +0000 (GMT)

What you probably want is something like this:

adjust age foreign stfratio prior_bi pctprior ///
bmi black hisp othrace eth_norm gang_bi       ///
pctgang iq_ged married ln_sent timeserv       ///
pct_g5 violent, by(custcode) pr

(where "///" is a way to wrap a long line in a 
.do-file, for more see: -help comments-)

This will give you the predicted probabilities for
each value of custcode while keeping the other 
variables at their mean value. In your code part
of the differences between the custcodes are due
to differences between the custcodes in the 
distribution of the other variables. Alternatively
you could for example replace the block 
"black hisp othrace" with 
"black=0 hisp=0 othrace=0" to get the predicted 
probabilities for (presumably) whites rather than 
for someone with "average race".

Hope this helps,
Maarten

Ps. I have CC-ed this to statalist as this may be 
useful to other people who are (now or in the future) 
following this thread.

--- "John L. Worrall" <[email protected]> wrote:

> Maarten,
> 
> Thanks for your reply to my post. I typed "adjust, by(custcode) pr"
> after estimation and the following appeared. Am I right, then, that
> the .018 for 1A means there is a 1.8% probability of a positive
> outcome for value 1A on the custcode variable, all else held
> constant? Thanks, John
> 
>  
> 
> adjust, by(custcode) pr
> 
>
----------------------------------------------------------------------
>                Equation: con_ctx1     Command: ivprobit
> 
>    Variables left as is: age, foreign, stfratio, prior_bi, pctprior,
> bmi, black, hisp, othrace, eth_norm, gang_bi, pctgang, iq_ged,
> married, ln_sent, timeserv, pct_g5, violent
>
----------------------------------------------------------------------
> 
> ----------------------
> Custody   |
> Level ID  |         pr
> ----------+-----------
>        1A |    .018073
>        2A |     .04191
>        3A |    .096283
>        4A |    .164255
>        5A |    .271731
> ----------------------
> 
>      Key:  pr  =  Probability



-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room N515

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


      
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index