Hi,
I'm trying to create and export a summary table for the mean and standard deviations statistics of each category of each variable given the observations = 1 for my dummy: problemgambler.
When I use:
eststo S1, title("group 1"): estpost tabstat lowincome Sex ag16g10 Educ2 origin2 i.maritalstatus if problemgambler == 1, statistics(mean sd) columns(statistics) listwise
This provides me with the mean for the variable over all categories. And when I use:
eststo S1, title("group 1"): estpost tabstat lowincome i.Sex i.ag16g10 i.Educ2 i.origin2 i.maritalstatus if problemgambler== 1, statistics(mean sd) columns(statistics) listwise
I get the error 'factor-variable and time-series operators not allowed'
I'm aware this works:
bysort problemgambler: sum lowincome i.Sex i.ag16g10 i.Educ2 i.origin2 i.maritalstatus
But I do not know how to export this way.
Does anyone have a suggestion to correct this, or do I need to construct a dummy variable for each category and run the initial command?
Thanks,
Ben
I'm trying to create and export a summary table for the mean and standard deviations statistics of each category of each variable given the observations = 1 for my dummy: problemgambler.
When I use:
eststo S1, title("group 1"): estpost tabstat lowincome Sex ag16g10 Educ2 origin2 i.maritalstatus if problemgambler == 1, statistics(mean sd) columns(statistics) listwise
This provides me with the mean for the variable over all categories. And when I use:
eststo S1, title("group 1"): estpost tabstat lowincome i.Sex i.ag16g10 i.Educ2 i.origin2 i.maritalstatus if problemgambler== 1, statistics(mean sd) columns(statistics) listwise
I get the error 'factor-variable and time-series operators not allowed'
I'm aware this works:
bysort problemgambler: sum lowincome i.Sex i.ag16g10 i.Educ2 i.origin2 i.maritalstatus
But I do not know how to export this way.
Does anyone have a suggestion to correct this, or do I need to construct a dummy variable for each category and run the initial command?
Thanks,
Ben
Comment