Since the demographic of respondents was not representative in terms of proportions (too many males, too left leaning...) but I had a good amount of responses (circa. 6000) I have also created a weight variable, where it is stated how much weight each observation should have, taking into account known data of gender and left right self positioning.
I want to perform a t testto find out if there is significant difference in means due to gender and membership to a party; and between male and female members of the party. I have come to understand that t test cannot be performed with weights, but I am not aware of any alternatives.
I have tried the following code:
Code:
svyset [iw=gndrlrweight] svy: ttest lrPP, by(gndr) svy: ttest liberalism if member==2, by(gndr)
Code:
svyset [iw=gndrlrweight] svy: regttest lrPP, by(gndr)
Code:
svyset [iw=gndrlrweight] test [lrPP]Male = [lrPP]Female
Any help? Thanks in advance!
0 Response to Alternatives to ttest using svy? Comparison of means between male and female respondents
Post a Comment