Statalist


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

st: R: t-test using analytic weights


From   "Carlo Lazzaro" <carlo.lazzaro@tin.it>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: R: t-test using analytic weights
Date   Tue, 10 Nov 2009 16:23:44 +0100

Dear Sripal,

As far as my previous example is concerned, the following line is redundant:

oneway age Group [aweight = height], bonferroni.

BTW, Bonferroni correction (just like other corrections for multiple
comparisons available for -ANOVA-) is actually useful for comparing the
means of three or more Groups.

Hence, for two Groups only (as your reported) the revised example goes like
this(flag: Stata 9.2/SE):

-------------------------------------------------
set obs 100
g Group=1 in 1/50
replace  Group=2 in 51/100
g age = 50 *uniform()
g height=165*uniform()
oneway age Group [aweight = height]
-------------------------------------------------

Should you be interested in comparing the means of three or more Groups, you
can replace the line  
oneway age Group [aweight = height]

with the line 
oneway age Group [aweight = height], bonferroni

Kind Regards,
Carlo
-----Messaggio originale-----
Da: Carlo Lazzaro [mailto:carlo.lazzaro@tin.it] 
Inviato: martedì 10 novembre 2009 16.08
A: 'statalist@hsphsun2.harvard.edu'
Cc: 'Sripal Kumar'
Oggetto: R: t-test using analytic weights

Sripal might want to take a look at:
-help ANOVA-;
 the following example (flag: Stata 9.2/SE):
-------------------------------------------------
set obs 100
g Group=1 in 1/50
replace  Group=2 in 51/100
g age = 50 *uniform()
g height=165*uniform()
oneway age Group [aweight = height]
oneway age Group [aweight = height], bonferroni
-----------------------------------------------

HTH and Kind Regards,
Carlo
-----Messaggio originale-----
Da: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Per conto di Sripal Kumar
Inviato: martedì 10 novembre 2009 15.14
A: statalist
Oggetto: st: t-test using analytic weights

Hi,

I am trying to use t-test of independent samples but by using analytic
weights.  I tried the following:

ttest age1 == age2 [aweight = wt], unpaired

I get an error message saying "weights not allowed".  Is there a way around
it?

thanks,

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