Announcement

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

  • delimit don't work

    Hi everyone,

    I want to add notes for my graph, I was wondering why stata says #d ; unknown command, and also it cannot recognise /// in twoway, here is my code, thank you so much for your help!

    #d ;
    local note `"`"Notes: Students rated agreement with the statement "You are more professionally ambitious than your most recent work colleagues"
    on a 1-to-5 scale, where 1 is Strongly Disagree and 5 is Strongly Agree.
    Whiskers show the 95% confidence interval calculated from regressions of students' answers
    on an indicator for being in the public treatment using robust standard errors.
    Non-single respondents are in a serious relationship, cohabiting, engaged, or married."'"' ;
    local notepart1 : piece 1 110 of `note' ;
    local notepart2 : piece 2 110 of `note' ;
    local notepart3 : piece 3 110 of `note' ;
    local notepart4 : piece 4 110 of `note' ;
    #d cr

    set scheme s1mono
    twoway (bar constant group1 if treatment== "B", barw(1.8)) (bar constant group2 if treatment== "A", barw(1.8)) (rcap low_bond up_bond group2 if public == 1), ///
    legend(label(1 "Private") label(2 "Public") order(1 2) size(small) rows(1) position(6)) graphregion(color(white)) ///
    title("Figure 6. Professional Ambition (Primary Experiment)", size(medium) position(12) ring(1)) ///
    ytitle("Agreement Rating", height(5)) yscale(range(5.5)) ylab(0(1)5) ///
    xlab(2 "Single" 8 "Non-Single" 14 "Single" 20 "Non-Single") ///
    text(4.5 11 "Group 19", color(white) size(1)) ///
    text(5.3 5 "Women", size(medium) box lc(white) fc(grey*0.1) margin(t+1 b+1) width(55)) ///
    text(5.3 17 "Men", size(medium) box lc(white) fc(grey*0.1) margin(t+1 b+1) width(55)) ///
    text(0.5 1 "`xval1'" 0.5 3 "`xval2'" 0.5 7 "`xval3'" 0.5 9 "`xval4'" 0.5 13 "`xval5'" 0.5 15 "`xval6'" 0.5 19 "`xval7'" 0.5 21 "`xval8'", size(2.5)) ///
    text(4.8 2 "p-value < `pvalue1'" 4.8 8 "p-value = `pvalue2'" 4.8 14 "p-value = `pvalue3'" 4.8 20 "p-value = `pvalue4'", size(2.5)) ///
    note(`"`notepart1'"' `"`notepart2'"' `"`notepart3'"' `"`notepart4'"', size(2.3))

  • #2
    these are the kinds of errors that occur when you use something interactively that should only be used in a do file; so, are you putting these in a do file and attempting to "do" or "run" the file? or are you using these interactively?

    Comment


    • #3
      Originally posted by Rich Goldstein View Post
      these are the kinds of errors that occur when you use something interactively that should only be used in a do file; so, are you putting these in a do file and attempting to "do" or "run" the file? or are you using these interactively?
      Thank you for your reply! I am new to stata and not sure what do you mean by use something interactively that should only be used in a do file, but yes, I put these code in a do file and try to run the file.

      Comment

      Working...
      X