Announcement

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

  • Rename problems.

    Hallo kind people. that's my first post on this forum and let it would kind.

    by the way, Stata is really new staff for me and programming also, i am studying it in university on master and any way after law it's little bit big trampling.

    So i am writing the assignment about abortion and religion anyway how religion influences abortion percentage to be clearer i am comparing religion importance percentage to abortion percentage in states. I am using world value survey.

    i have little problems with rename and graphs


    The * Load WVS dataset, limiting the data to.
    use data/wvs2000, clear

    * Subsetting: only keep data in.
    keep if v2 == 67 | v2 == 89 | v2 == 13 | v2 == 19

    * Inspect the list of included countries.
    fre v2

    tab v210

    tab v191

    tab v9

    ren v210 Abortion

    ren v9 religion

    ren v191 belive in god

    gr dot Abortion religion v191, over(v2, sort(1)des) ///
    name(abortion_and_religion, replace)

    drop if v2==67

    tab Abortion

    tab religion

    tab v191

    drop if v2==89

    tab Abortion

    tab religion

    tab v191


    drop if v2==13

    tab Abortion

    tab religion

    tab v191


    drop if v2==19

    tab Abortion

    tab religion

    tab v191

    Click image for larger version

Name:	Untitled.jpg
Views:	1
Size:	212.3 KB
ID:	1364926


    as you see i can't rename variable v191. any way i want to apologize all of you for such dilettanti problems.

    and alsoo i have little problem with graph.
    Click image for larger version

Name:	Untitled1.jpg
Views:	1
Size:	83.0 KB
ID:	1364927


    I don't want to be mean of religion or mean of abortion I prefer to be the justification of abortion and important of religion.

    please help me if u can.
    I know that it's a really boring topic for you.

    thank you in advance and if u can give addition advice.



  • #2
    Welcome to Stata and Statalist.

    For renaming v191 to "belive in good"

    Code:
     ren v1919 belive_in_good
    Stata will not allow gaps in the variable names. I did not understand your 2nd question. Please clarify more what you are expecting in the graphs.

    Since you are new to Stata, I would suggest you to work in the do file which is a bit of fun and effective. For example try these in a do file and see the results:


    Code:
    foreach var of varlist v2 v210 v191 v9  {
    tab `var'
    }
    
    ren (v210 v9 v191) (Abortion religion belive_in_god)
    Further please read the FAQ section on how to make a good post so that people can help you. No question is a boring question as long as it is precise. Have a fun-journey with Stata




    Roman

    Comment


    • #3
      Thank you Roman, very much.
      I want to change names in graph - "Mean of abortion" and "Mean of religion" and "Mean of v191" to change with this names -> "Justified abortion" and "religion importance" and "Believe in God"

      Comment


      • #4
        Click on the graph editor icon and then click on the texts you want to edit. Should be straight forward. Play around with them.
        Roman

        Comment

        Working...
        X