I hope someone can help me. I am having a really hard time making a - what I thought would be a quite simple table.
I want to make a table over background factors related to placement breakdown looking similar to this one below:
Probability of placement breakdown | Significance | |
Gender | ||
Boys (n=545) | 0.21 | 0.720 |
Girls (n=478) | 0.23 | 0.720 |
Age | ||
0-5 (n=56) | 0.07 | 0.000 |
6-12 (n=318) | 0.22 | 0.958 |
13-17 (n=587) | 0.23 | 0.320 |
18-22 (n=52) | 0.23 | 0.741 |
Gender is also a dummy variable called gender 1 = boy 0 = girl.
And age consists of multiple dummy variables called age_0_5, age_6_12, age_13_17 and age_18_22.
If we start with the gender variable, I might be able to figure out the rest on my own.
My data is survey data collected in clusteres, so we use the svy-command to compensate for that.
What I have tried to do is:
. svy: mean breakdown, over(gender)
(running mean on estimation sample)
Survey: Mean estimation
Number of strata = 1 Number of obs = 1,007
Number of PSUs = 156 Population size = 1,007
Design df = 155
--------------------------------------------------------------------
| Linearized
| Mean std. err. [95% conf. interval]
-------------------+------------------------------------------------
c.breakdown@gender |
0 | .2252632 .024941 .175995 .2745313
1 | .2142857 .0237364 .1673971 .2611744
--------------------------------------------------------------------
. test c.breakdown@0.gender=c.breakdown@1.gender
Adjusted Wald test
( 1) c.breakdown@0bn.gender - c.breakdown@1.gender = 0
F( 1, 155) = 0.13
Prob > F = 0.7200
. estadd scalar p_diff = r(p)
added scalar:
e(p_diff) = .71999581
. esttab ., cells("b") stats(p_diff) nostar noabbrev nonumber eqlabels(none) collabels(Probability of placement breakdown) nomtitle
-------------------------
Probability of placement breakdown
-------------------------
c.breakdown@0.gender .2252632
c.breakdown@1.gender .2142857
-------------------------
p_diff .7199958
-------------------------
I have tried several ways but this is the closest i get to the table above. It is not very interpretable especially since there is no labels on the variables.
Are there any suggestions on how I could do this better/more interpretable?
Thank you in advance,
Sofie.
0 Response to Comparing means across groups using svy commands and esttab
Post a Comment