Hello,

I'm dealing with the descriptive statistics for a data set. Two variables related to paternal and maternal involvement are daily_f and daily_m. Means of these two variables are 0.43 and 0.69 respectively (weighted). Now I want to do an unpaired t-test for these two variables but weight function is not allowed.

The result of unweighted t-test is as follow:

Two-sample t test with equal variances
------------------------------------------------------------------------------
Variable | Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
---------+--------------------------------------------------------------------
daily_f | 9,626 .4887804 .0050952 .4999001 .4787927 .498768
daily_m | 9,626 .7738417 .0042641 .4183646 .7654831 .7822003
---------+--------------------------------------------------------------------
combined | 19,252 .631311 .0034772 .4824619 .6244955 .6381266
---------+--------------------------------------------------------------------
diff | -.2850613 .0066441 -.2980843 -.2720383
------------------------------------------------------------------------------
diff = mean(daily_f) - mean(daily_m) t = -42.9045
Ho: diff = 0 degrees of freedom = 19250

Ha: diff < 0 Ha: diff != 0 Ha: diff > 0
Pr(T < t) = 0.0000 Pr(|T| > |t|) = 0.0000 Pr(T > t) = 1.0000
The unweighted means of two variables and other parameters are different from the weighted. Thus, this t-test result can not be applied to the weighted data, right?

After browsing similar posts, I found that two ways may be used to solve the problem:

a) First, to use -mean- and -lincom- commands.
Code:
mean daily_f daily_m [iweight=w2sweight]
lincom daily_f-daily_m
The result is as below:
Mean estimation Number of obs = 15,126,283

--------------------------------------------------------------
| Mean Std. Err. [95% Conf. Interval]
-------------+------------------------------------------------
daily_f | .4452293 .0001278 .4449788 .4454797
daily_m | .7173577 .0001158 .7171308 .7175847
--------------------------------------------------------------

. lincom daily_f-daily_m //p<0.01

( 1) daily_f - daily_m = 0

------------------------------------------------------------------------------
Mean | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
(1) | -.2721285 .000134 -2031.01 0.000 -.2723911 -.2718659
------------------------------------------------------------------------------
Because -mean- command drops samples when one of the two variables is missing, this test is similar to the paired t-test which is also different from the unpaired one. Consequently, -mean- and -lincom- commands may not provide the best solution.

b) Another method is to append the data to combine paternal and maternal involvement variables into one parental involvement variable and to run -reg- with -weight- (gender as the independent variable). However, this method seems not that convenient.

So... is there a good way to make an unpaired comparison between means of two variables? Is it necessary to conduct a weighted t-test?

Thank you so much.