Originally posted by Tommaso Salvitti
View Post
A couple of comments:
1. You still have anomalies in your dataset: check the sumscores (item5) for child IDs 3 and 14 for judge ID 1.
2. Although the simple sumscore,seems to be the convention and I suppose reflects intention by the experts to weight the individual scores unequally, if you wanted to weight the individual scores equally, then you could for example rescale each score from zero to one before summing them. Something like the following.
Code:
version 18.0 clear * quietly input byte(Soggetti ITEM1A ITEM1B ITEM2A ITEM2B ITEM3A ITEM3B ITEM4A /// ITEM4B ITEM5A ITEM5B) 1 . 2 . 4 . 17 . 17 . 40 2 1 2 1 2 15 16 16 16 33 36 3 2 2 3 4 14 17 16 18 36 41 4 2 2 2 4 13 18 18 18 35 42 5 2 2 3 4 15 17 17 18 37 41 6 2 2 2 4 17 18 18 18 39 42 7 1 1 1 2 15 12 15 12 32 27 8 . 2 . 4 . 17 . 16 . 39 9 2 2 3 4 16 17 18 18 39 41 10 2 2 3 4 15 18 16 18 36 42 11 2 1 2 4 14 15 18 17 36 37 12 2 1 1 2 14 9 16 10 33 22 13 2 2 3 4 18 18 18 18 41 42 14 1 1 1 3 18 17 16 18 34 39 15 2 2 2 4 18 18 18 18 40 42 16 2 2 2 4 16 17 17 18 37 41 17 2 1 1 3 17 18 18 18 38 40 18 . 2 . 3 . 14 . 13 . 32 19 2 2 4 4 16 17 16 18 38 41 end rename (ITEM?A ITEM?B) (sco?1 sco?2) rename Soggetti cid forvalues i = 1/5 { local varlist `varlist' sco`i' } quietly reshape long `varlist', i(cid) j(rid) * * Begin here * recast double sco? forvalues i = 1/4 { summarize sco`i', meanonly quietly replace sco`i' = (sco`i' - r(min)) / (r(max) - r(min)) } egen double sum = rowtotal(sco1-sco4) mvdecode sum, mv(0) mixed sum i.rid || cid: , reml dfmethod(kroger) nolog estat icc exit
Comment