Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Option stat() not allowed r(198)

    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?
    Attached Files

  • #2
    Welcome to Statalist.

    You have accidentally posted your topic in Statalist's Mata Forum, which is used for discussions of Stata's Mata language, which is different than Stata's command language. Your question will see a more appropriate, and much larger audience if you post it in Statalist's General Forum.

    Also, if you have not already done so, take a look at the Statalist FAQ linked to at the top of this page for posting guidelines and suggestions.

    Comment

    Working...
    X