Hi all,
I'm trying to create a Rasch Model with GSS data and running into all sorts of issues. I've been following this Stata.com example (http://www.stata.com/support/faqs/st...s/rasch-model/) and it seems pretty helpful, but GSS data is not in the same format. The example requires data to be in the long format via the reshape command, but I'm unsure how to make my data fit that structure. I would be using the ID variable, the abortion variables, and the person's response for the particular abortion variable (yes/no). It would look something like this:
ID#1, abany, response
ID#1, abnomore, response
ID#1, absingle, response
ID#1, abpoor, response
ID#1, abdefect, response
ID#1, abrape, response
ID#1, abhlt, response
ID#2, abany, response
ID#2, abnomore, response
.....
So how I could I get my data to fit this structure so I could advance on with the Rasch model? The example uses this code below, but I'm unsure how "item" could reflect the person's individual response for the abortion variable.
reshape long math, i(subj_id) j(item)
I'm guessing I'd need to do something like this, but again, how I can I match up the response with the person's ID?
reshape long allabortionvariables, i(ID) j(response)
Below is the GSS code for the variables I'm interested in if that is helpful.
THANK YOU
. tab abany
ABORTION IF |
WOMAN WANTS |
FOR ANY |
REASON | Freq. Percent Cum.
------------+-----------------------------------
1 | 547 36.93 36.93
no | 934 63.07 100.00
------------+-----------------------------------
Total | 1,481 100.00
. tab abdefect
STRONG |
CHANCE OF |
SERIOUS |
DEFECT | Freq. Percent Cum.
------------+-----------------------------------
1 | 1,167 78.53 78.53
no | 319 21.47 100.00
------------+-----------------------------------
Total | 1,486 100.00
. tab abhlth
WOMANS |
HEALTH |
SERIOUSLY |
ENDANGERED | Freq. Percent Cum.
------------+-----------------------------------
1 | 1,332 89.34 89.34
no | 159 10.66 100.00
------------+-----------------------------------
Total | 1,491 100.00
. tab abnomore
MARRIED--WA |
NTS NO MORE |
CHILDREN | Freq. Percent Cum.
------------+-----------------------------------
1 | 600 40.32 40.32
no | 888 59.68 100.00
------------+-----------------------------------
Total | 1,488 100.00
. tab abpoor
LOW |
INCOME--CAN |
T AFFORD |
MORE |
CHILDREN | Freq. Percent Cum.
------------+-----------------------------------
1 | 650 43.68 43.68
no | 838 56.32 100.00
------------+-----------------------------------
Total | 1,488 100.00
. tab abrape
PREGNANT AS |
RESULT OF |
RAPE | Freq. Percent Cum.
------------+-----------------------------------
1 | 1,197 81.21 81.21
no | 277 18.79 100.00
------------+-----------------------------------
Total | 1,474 100.00
. tab absingle
NOT MARRIED | Freq. Percent Cum.
------------+-----------------------------------
1 | 612 41.18 41.18
no | 874 58.82 100.00
------------+-----------------------------------
Total | 1,486 100.00
I'm trying to create a Rasch Model with GSS data and running into all sorts of issues. I've been following this Stata.com example (http://www.stata.com/support/faqs/st...s/rasch-model/) and it seems pretty helpful, but GSS data is not in the same format. The example requires data to be in the long format via the reshape command, but I'm unsure how to make my data fit that structure. I would be using the ID variable, the abortion variables, and the person's response for the particular abortion variable (yes/no). It would look something like this:
ID#1, abany, response
ID#1, abnomore, response
ID#1, absingle, response
ID#1, abpoor, response
ID#1, abdefect, response
ID#1, abrape, response
ID#1, abhlt, response
ID#2, abany, response
ID#2, abnomore, response
.....
So how I could I get my data to fit this structure so I could advance on with the Rasch model? The example uses this code below, but I'm unsure how "item" could reflect the person's individual response for the abortion variable.
reshape long math, i(subj_id) j(item)
I'm guessing I'd need to do something like this, but again, how I can I match up the response with the person's ID?
reshape long allabortionvariables, i(ID) j(response)
Below is the GSS code for the variables I'm interested in if that is helpful.
THANK YOU
. tab abany
ABORTION IF |
WOMAN WANTS |
FOR ANY |
REASON | Freq. Percent Cum.
------------+-----------------------------------
1 | 547 36.93 36.93
no | 934 63.07 100.00
------------+-----------------------------------
Total | 1,481 100.00
. tab abdefect
STRONG |
CHANCE OF |
SERIOUS |
DEFECT | Freq. Percent Cum.
------------+-----------------------------------
1 | 1,167 78.53 78.53
no | 319 21.47 100.00
------------+-----------------------------------
Total | 1,486 100.00
. tab abhlth
WOMANS |
HEALTH |
SERIOUSLY |
ENDANGERED | Freq. Percent Cum.
------------+-----------------------------------
1 | 1,332 89.34 89.34
no | 159 10.66 100.00
------------+-----------------------------------
Total | 1,491 100.00
. tab abnomore
MARRIED--WA |
NTS NO MORE |
CHILDREN | Freq. Percent Cum.
------------+-----------------------------------
1 | 600 40.32 40.32
no | 888 59.68 100.00
------------+-----------------------------------
Total | 1,488 100.00
. tab abpoor
LOW |
INCOME--CAN |
T AFFORD |
MORE |
CHILDREN | Freq. Percent Cum.
------------+-----------------------------------
1 | 650 43.68 43.68
no | 838 56.32 100.00
------------+-----------------------------------
Total | 1,488 100.00
. tab abrape
PREGNANT AS |
RESULT OF |
RAPE | Freq. Percent Cum.
------------+-----------------------------------
1 | 1,197 81.21 81.21
no | 277 18.79 100.00
------------+-----------------------------------
Total | 1,474 100.00
. tab absingle
NOT MARRIED | Freq. Percent Cum.
------------+-----------------------------------
1 | 612 41.18 41.18
no | 874 58.82 100.00
------------+-----------------------------------
Total | 1,486 100.00
Comment