Announcement

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

  • Mean centering of the Human Value Scale (ESS)

    Hello,

    i want to use the Schwartz "Human Value Scale" from the European Social Survey Data. In this article (Link added) Schwartz provides the SPSS Syntax for creating 10 Values by taking the means of the 21 Items that index the Human Value Scale and subtracting the mean rating.

    The SPSS-Syntax:
    Code:
    COMPUTE mrat = MEAN(v1 to v21) .
    EXECUTE .
    COMPUTE SEcenter = MEAN(v5, v14) - mrat . EXECUTE . COMPUTE COcenter = MEAN(v7, v16) - mrat . EXECUTE . COMPUTE TRcenter = MEAN(v9, v20) - mrat . EXECUTE . COMPUTE BEcenter = MEAN(v12, v18) - mrat. EXECUTE . COMPUTE UNcenter = MEAN(v3, v8, v19) - mrat . EXECUTE . COMPUTE SDcenter = MEAN(v1, v11) - mrat . EXECUTE . COMPUTE STcenter = MEAN(v6, v15) - mrat . EXECUTE . COMPUTE HEcenter = MEAN(v10, v21) - mrat. EXECUTE . COMPUTE ACcenter = MEAN(v4, v13) - mrat . EXECUTE . COMPUTE POcenter = MEAN(v2, v17) - mrat . EXECUTE .
    I want to translate the SPSS-Syntax into Stata:
    Code:
    egen mrat = rowmean (v1 to v21)
    scores se_center = mean (v5 v14) - mrat
    scores co_center = mean (v7 v16) - mrat
    Is this correct?

    Best regards and thank you in advance,
    Amelie


  • #2
    Amelie:
    the code you're interested might be the following one, run on a toy-example:
    Code:
    . sysuse auto.dta
    (1978 Automobile Data)
    
    . egen mrat= rowtotal(price mpg rep78 headroom)
    
    . egen mrat_1=rowtotal(price mpg )
    
    . replace mrat_1= mrat_1- mrat
    (74 real changes made)
    
    . egen mrat_2=rowtotal(rep78 headroom)
    
    . replace mrat_2= mrat_2- mrat
    (74 real changes made)
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Hello Carlo,

      thanks for your answer. As i am interested in the over all mean of all items (In my case: The meanvalue of one respondent over a list of Items)
      wouldn't it be neccessary to use "mean" instead of "rowtotal" ?

      In your example:
      Code:
      egen mrat= rowmean(price mpg rep78 headroom)
          
       egen mrat_1=rowmean(price mpg)  
       replace mrat_1= mrat_1- mrat

      Comment


      • #4
        Amelie is correct.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment

        Working...
        X