Dear all,
I am very sorry if you've discussed a very similar case like this before. I have been looking but I can't seem to find what I need exactly. I am working with Stata 16 and need to make a description table of many different variables. So I entered
estpost sum (zufriedenheit_insg freizeit_ind freizeit_gem age ost ///
koh_1 koh_2 uni fach real haupt ohne vz tz arbeitslos incnet hhincnet ///
lat nel ehe reldur2) if miss==0, stat(n min max mean sd) by(sex_gen1) ///
missing columns(statistics) listwise nototal
esttab , cells ///
("min(fmt(0)) max(fmt(0)) mean(fmt(3)) sd(fmt(3) label(SD))")///
drop (zufriedenheit_insg freizeit_ind freizeit_gem age ost ///
koh_1 koh_2 uni fach real haupt ohne vz tz arbeitslos incnet hhincnet ///
lat nel ehe reldur2)///
unstack varwidth(35) nonumber dmaker (,) stats(N, fmt(0) labels("N"))/// label addnotes(Quelle: Pairfam-Daten 1. und 2. Welle, eigene Analyse)///
title (Deskriptionstabelle nach Geschlecht getrennt)
esttab using "$path_out/deskriptionstabellesm3.rtf", ///
cells("mean(fmt(3) label(MW)) sd(fmt(3) label(SD))")///
drop (ost vz tz arbeitslos lat nel ehe uni fach real haupt ohne) /// unstack varwidth(35) nomtitle nonumber label dmarker (,) ///
stats(N, fmt(0)) labels("Beobachtungen (N)") refcat (age "Alter" /// koh_"Geburtskohorte" freizeit_ind "Häufigkeit Freizeitaktivitäten" ///
erwerb "Erwerbstätigkeit" sin "Beziehungsstatus" ///
uni "Höchster Bildungsgrad", nolabel) modelwidth (8)
modelwidth(6) dmarker(,) nomtitle nonumber replace
in order to achieve a table that looks like the one I enclosed beneath instead of the one that doesn't show women and men next to eachother but after eachother like the other one I attached.
Instead it keeps telling me:
option stat() not allowed
r(198); as soon as the esttab command starts.
Do you please know how to help?
I am very sorry if you've discussed a very similar case like this before. I have been looking but I can't seem to find what I need exactly. I am working with Stata 16 and need to make a description table of many different variables. So I entered
estpost sum (zufriedenheit_insg freizeit_ind freizeit_gem age ost ///
koh_1 koh_2 uni fach real haupt ohne vz tz arbeitslos incnet hhincnet ///
lat nel ehe reldur2) if miss==0, stat(n min max mean sd) by(sex_gen1) ///
missing columns(statistics) listwise nototal
esttab , cells ///
("min(fmt(0)) max(fmt(0)) mean(fmt(3)) sd(fmt(3) label(SD))")///
drop (zufriedenheit_insg freizeit_ind freizeit_gem age ost ///
koh_1 koh_2 uni fach real haupt ohne vz tz arbeitslos incnet hhincnet ///
lat nel ehe reldur2)///
unstack varwidth(35) nonumber dmaker (,) stats(N, fmt(0) labels("N"))/// label addnotes(Quelle: Pairfam-Daten 1. und 2. Welle, eigene Analyse)///
title (Deskriptionstabelle nach Geschlecht getrennt)
esttab using "$path_out/deskriptionstabellesm3.rtf", ///
cells("mean(fmt(3) label(MW)) sd(fmt(3) label(SD))")///
drop (ost vz tz arbeitslos lat nel ehe uni fach real haupt ohne) /// unstack varwidth(35) nomtitle nonumber label dmarker (,) ///
stats(N, fmt(0)) labels("Beobachtungen (N)") refcat (age "Alter" /// koh_"Geburtskohorte" freizeit_ind "Häufigkeit Freizeitaktivitäten" ///
erwerb "Erwerbstätigkeit" sin "Beziehungsstatus" ///
uni "Höchster Bildungsgrad", nolabel) modelwidth (8)
modelwidth(6) dmarker(,) nomtitle nonumber replace
in order to achieve a table that looks like the one I enclosed beneath instead of the one that doesn't show women and men next to eachother but after eachother like the other one I attached.
Instead it keeps telling me:
option stat() not allowed
r(198); as soon as the esttab command starts.
Do you please know how to help?
Comment