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: how to index regressions inside a foreach loop in order to avoid writing over the estimates
From
hind lazrak <[email protected]>
To
[email protected]
Subject
Re: st: how to index regressions inside a foreach loop in order to avoid writing over the estimates
Date
Fri, 14 Oct 2011 10:12:57 -0700
Thank you Richard for taking the time to come back to the thread.
Using and expanding on the approach recommended by Jesper I was able
to get a matrix of coefficients that were statistically significant at
the 0.1 level while accounting for environmental variables I needed to
control for.
Best,
Hind
On Fri, Oct 14, 2011 at 7:41 AM, Richard Williams
<[email protected]> wrote:
> At 10:46 PM 10/13/2011, hind lazrak wrote:
>>
>> Dear Richard
>>
>> Thank you for taking the time to respond to the question I posted.
>>
>> I made the example simpler in my post for more clarity.
>>
>> In the first step I ran the pwcorr, sig to capture the list of
>> variables that I ran in the loop.
>> In fact the simple linear regression does include three other
>> variables that may act as either modifier or confounder. So I need to
>> control for them.
>>
>> So this brings me back to the original question. Is there any way to
>> get a table of coeffs that are statistically significant at the 95%
>> level?
>
> Is this equivalent to saying that you only want the printout when `var' is
> statistically significant? If so, I think you could modify the following
> code:
>
> sysuse auto
> quietly reg price mpg trunk weight
> if abs( _b[mpg] / _se[mpg]) >=1.96 reg
>
> In other words, assuming the sample is fairly large, check to see if the t
> value for the var being tested is sufficiently large. If it is, display the
> results, otherwise do not.
>
> -------------------------------------------
> Richard Williams, Notre Dame Dept of Sociology
> OFFICE: (574)631-6668, (574)631-6463
> HOME: (574)289-5227
> EMAIL: [email protected]
> WWW: http://www.nd.edu/~rwilliam
>
> *
> * 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/