Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: From: Steven Samuels <>

Subject   st: From: Steven Samuels <>
Date   Mon, 17 Oct 2011 16:12:53 -0400


You've given us little information, but I would guess  that you are seeing not a low-power phenomenon, but rather classic confounding: the original, unadjusted, group difference arose because "var1" is associated with "var2", and the distribution of "var2" differs between the two groups. If so, increasing the sample size won't help much.

sysuse auto, clear
reg mpg i.foreign
reg mpg weight i.foreign             
                         b           se            t            p
No Confounder         4.945804     1.362162     3.630848     .0005254
Weight  Added        -1.650029     1.075994    -1.533493     .1295987

Plotting "var1" and the model predictions against "var2" should be helpful. If "var2" is a continuous variable, as you imply, the predictions will be two parallel lines. (You should check the linearity and no-interaction assumptions.)

To answer your question: no, the t-test logic does not apply to this power calculation, but the  post-hoc power calculation is simple:

*************CODE BEGINS*************
sysuse auto, clear
ssc install powercal

reg mpg i.foreign // no confounder

gen wt1000 = weight/1000
label var wt1000 "Weight (1,000 lb)"
reg mpg wt1000 i.foreign  //with confounder weight

scalar se = _se[1.foreign]
scalar n  = e(N)
scalar df = e(df_r)

local effects  165 200 250 300  //first is observed effect x 10
foreach d of local effects{
qui powercal pow_`d', delta(`d'/100) sdinf(sqrt(n)*se) nunit(n)  tdf(df) ///
format pow_* %6.3f

/* Power to detect Differences x 10 */
list pow_* in 1
**************CODE ENDS**************



On Oct 15, 2011, at 12:37 PM, Cameron McIntosh wrote:

What's the correlation between var1 and var2?


> From:
> To:
> Date: Sat, 15 Oct 2011 17:45:55 +0200
> Subject: st: Post estimation power estimations.
> Evnin' list.
> I have a question for you: when you do a ttest and you have no significant difference, you can estimate the group size needed for the between group differences to be significant, using SD and the differences in mean. I know this is a statistical no no - but lets save that discussion for another chain of emails.
> My problem is that the between group difference is significant. When i correct for a variable, that shouldent interfere the between group difference dissaperes. 
> What i've done:
> Xi: regress var1 var2
> _group_2 p=0.45
> Indicating that the Var2 adjusted var1 between group difference is no longer significant. I believe This is a power issue.
> Can i aply the same logic as in ttest exemple, and if so - how to do that in Stata? 
> Mvh
> Lars Folkestad

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index