Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: Re: removing undesired responses (for A. Baker)


From   <[email protected]>
To   <[email protected]>
Subject   st: Re: Re: removing undesired responses (for A. Baker)
Date   Fri, 15 Aug 2003 19:25:08 -0400

If you want to change those 99's to no response, how about:
replace w1=. if w1==99       ?

----- Original Message ----- 
From: "Andie Baker" <[email protected]>
To: <[email protected]>
Sent: Friday, August 15, 2003 6:55 PM
Subject: st: Re: multivariate count regression


> Hi there,
>
> I'm sorry to bother you with something so trivial but I am a new Stata
user and I'm stumped on a simple problem.  If you coul spare a moment I'd be
very grateful.  I'm trying to delete variable values of "99" from my dataset
and each time I use the command:
>
Drop if w1==99
> participants who have answered "99" on the survey are dropped from the
study entirely.  By the time I've dropped all of the "99"s for each variable
I've lost almost all of my data.  I would like to eliminate a participant's
"99" answer on a single variable without eliminating them from the study.
>
> I am writing to you because I've seen your name on statalist often - and
because I don't yet know how to address an inquiry to statalist.  Thanks for
your time and enjoy the weekend!!
>                                                                           
            - Andie
> (I also receive email at [email protected].)
>
> >>> [email protected] 08/14/03 07:04PM >>>
> ----- Original Message -----
> From: "Ralf Dewenter" <[email protected]>
> To: <[email protected]>
> Sent: Thursday, August 14, 2003 12:44 PM
> Subject: st: multivariate count regression
>
>
> > Hi all,
> >
> > Does anybody know, where to find an ado-file
> > for multivariate count regressions?
> > Thanks.
> >
> > Regards
> >
> > Ralf Dewenter
> >
>
> Would -poisson- or -nbreg- with -suest- be sufficient?  I believe it is
similar
> to -mvreg- in that it estimates the between-equation covariance so you can
test
> coefficients across equations.
>
> Example:
>
> . clear
>
> . set obs 100
> obs was 0, now 100
>
> . gen x1 = invnorm(uniform())
>
> . gen x2 = invnorm(uniform())
>
> . gen xb = 1 + 2*x1 - x2
>
> . genpoisson y, xbeta(xb)
>
> . genpoisson y2, xbeta(xb)
>
> . qui poisson y x1 x2,score(s1)
>
> . est store A
>
> . qui poisson y2 x1 x2, score(s2)
>
> . est store B
>
> . suest A B
>
> Simultaneous results for A, B
>                                                             Obs      =
100
>
> --------------------------------------------------------------------------
----
>              |               Robust
>              |      Coef.   Std. Err.      z    P>|z|     [95% Conf.
Interval]
> -------------+------------------------------------------------------------
----
> A_y          |
>           x1 |   1.432079   .1199582    11.94   0.000     1.196966
1.667193
>           x2 |  -.7417589   .0804557    -9.22
0.000    -.8994491   -.5840686
>        _cons |    1.45254   .0961629    15.10   0.000     1.264064
1.641015
> -------------+------------------------------------------------------------
----
> B_y2         |
>           x1 |   1.418806   .1223085    11.60   0.000     1.179085
1.658526
>           x2 |  -.7914187   .0901748    -8.78
0.000     -.968158   -.6146794
>        _cons |   1.459112    .097084    15.03   0.000      1.26883
1.649393
> --------------------------------------------------------------------------
----
>
> . test [A_y]x2 = [B_y2]x2, common
>
>  ( 1)  [A_y]x2 - [B_y2]x2 = 0
>
>            chi2(  1) =    1.48
>          Prob > chi2 =    0.2236
>
>
> Scott
>
>
> *
> *   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/
>
>
> *
> *   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/

*
*   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