Statalist


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

Re: st: Re: Calculate beta values for mim results


From   fjgallo@mac.com
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Re: Calculate beta values for mim results
Date   Fri, 01 May 2009 09:05:12 -0400

Hi Martin,

Thank you for your input and understanding. I appreciate your time in responding. The "e(sample)" part of the syntax was my question. Also, my goal is to calculate the beta values for the parameters estimated from the -mim- procedure over 5 imputed data sets. The mim procedure provides the b-coefficients but not the standardized betas. So that I understand your syntax correctly, will it accomplish this task? I apologize for any misconceptions about my message. Thank you.

Best,
Frank


On May 1, 2009, at 8:36 AM, Martin Weiss wrote:

<>

Let me spell out the line

-qui reg pr we f rep tr tu-

unabbreviated :

-quietly regress price weight foreign rep78 trunk turn-


-quietly- requests that the results of the estimation command not be shown. The command -regress- requests an OLS regression, followed by the dependent and several independent variables. It is not an IV estimator, though. See -ivregress- for an IV method.

BTW, welcome to the Stata community, I hope to see you on the list again soon. It is very good of you to let us know that you are a beginner, so in future, I can tailor my answer better and, for instance, not use abbreviations on the scale I did in my initial post...

I am not sure about the "sample" thing. Could you rephrase your question?



HTH
Martin
_______________________
----- Original Message ----- From: <fjgallo@mac.com>
To: <statalist@hsphsun2.harvard.edu>
Sent: Friday, May 01, 2009 2:48 AM
Subject: Re: st: Re: Calculate beta values for mim results


Hi Martin,

Thank you very much for the reply. I am VERY NEW to Stata. I am using version 10. I assume that pr is the DV and we f rep tr tu are the IVs. Is there something that should replace "sample" such as _mj? I need to calculate the beta values for the -mim- run on 5 imputed data sets. Thank you.

Best,
Frank


On Apr 30, 2009, at 6:50 PM, Martin Weiss wrote:

<>

If you think it is appropriate to do so, you can recover beta coefficients manually yourself. As far as I can tell, that is pretty much what -betacoef- does internally.

*********
*to recover beta coefficients

sysuse auto, clear
qui reg pr we f rep tr tu
qui sum pr if e(sample)
sca sd=r(sd)
qui tabstat we f rep tr tu if e(sample), ///
statistics( sd ) columns(variables) save

mata
sds=st_matrix("r(StatTotal)")'
mata stata qui reg pr we f rep tr tu
bs=st_matrix("e(b)")[1..5]'
beta=bs:*sds:/st_numscalar("sd")
beta
end

*check
reg pr we f rep tr tu, beta noheader
******


HTH
Martin
_______________________
----- Original Message ----- From: <fjgallo@mac.com>
To: <statalist@hsphsun2.harvard.edu>
Sent: Thursday, April 30, 2009 10:35 PM
Subject: st: Calculate beta values for mim results


Dear All,

Can I calculate beta values besides the standard estimates that the - mim- command produces? I tried using the below commands, but results returned no values. Thank you.

Best regards,
Frank


mim: regress y x1 x2.....
mim, storebv
betacoef
return list
matrix list r(beta)

Results:
r(beta) [1,23]
x1    x2... _cons
.         .           0

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

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

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

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

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