Hi all,
I am using a dataset with vocabulary data for 5585 children who are 2 years old.
We have a list of 100 words commonly spoken by 2 year olds which has been translated into 6 different languages. We asked parents to look at this list of 100 words and tick yes/no for the words that their child says in any of the 6 languages.
I've attached a screenshot of a dummy dataset so you can see how the data is laid out in an example 13 cases, for 2 languages only (english and maori) and 3 words.
For each of the 6 languages, each of the 100 words has its own variable:
For example, for English and Maori, the variable names are: word_1_english, word_1_maori, word_2_english, word_2_maori,...word_100_english, word_100_maori.
The possible responses are 0 (labelled "No") and 1 (labelled "Yes")
I would like to create a score ("totalscore") out of 100 for the bilingual children (maorieng_y2cm == 1) that tells me how many of the 100 words the child knows in EITHER English or Maori, without double counting if a child knows the word in both languages.
For instance,
ID 200093, totalscore = 2
ID 133593, totalscore = 3
ID 249443, totalscore = 2
...
ID 124223, totalscore = 3 (NOT 4)
ID 120882, totalscore = 2 (NOT 3)
If the child isn't bilingual (mooring_y2cm == .) then I want totalscore to stay as missing.
I wondered about using the 'foreach' command, but I don't know enough state code to figure out how to code this
Any help would be much appreciated!
Array
Jin
Related Posts with How to create an indicator of total vocabulary score for bilingual children
Importing previously imputed data using mi importHello Stata Users, I have been trying to import previously imputed data (m=0, 1,2,…..20) using mi im…
Wrangling panel data - calculating growth rates and cagrI am working with bisnode panel data https://www.bisnodegroup.com/solutio.../company-data/ which has…
Comparing predictions and regression fitted values between two regression models with an additional explanatory varaiableDear Statalisters, I am struggling with a task in which I want to investigate how an additional var…
Scoring measures using STATAI have dataset that includes items measuring diagnostic criteria for personality disorders. For each…
Machine Learning setupHow can I break down my loaded dataset into training set and test set, and develop random forest on …
Subscribe to:
Post Comments (Atom)
0 Response to How to create an indicator of total vocabulary score for bilingual children
Post a Comment