Hi,
So this is my first time posting and also using Stata. I have spent some time trying to figure it out, so forgive me if it is obvious.
I have dataset from a Qualtrics vignette survey asking participants about decision making in child welfare.
The participants got one of 8 randomized vignettes with three variables included in the vignette, which are either - adoption/independent, stable/unstable, 1 placement/4placements.
When I downloaded the survey from Qualtrics, I have variables in Stata that look like the following
Vignette_DO_ILUS1P (just for clarification, this Vignette_DO_ILUS1P is independent, unstable, 1 placement).
Vignette_DO_ILUS4P
Vignette_DO_ILS1P
Vignette_DO_ILS4P
Vignette_DO_AUS1P
Vignette_DO_AUS4P
Vignette_DO_AS1P
Vignette_DO_AS4P
Each of the variables in Stata just show a 1 or a - to indicate if a participant recieved that particular vignette or not.
I need to create new variables for adoption, independent, stable, unstable, 1 placment and 4 placements and I have tried the following
gen unstable=0 if Vignette_DO_ILUS1P ==1
gen independetlive=0 if Vignette_DO_ILUS1P==1
gen oneplacement=0 if Vignette_DO_ILUS1P ==1
gen adopt=1 if Vignette_DO_AS4P==1
gen stable=1 if Vignette_DO_AS4P==1
gen fourplacement=1 if Vignette_DO_AS4P==1
That works well enough to make the six new variables, but then I get stuck.
My primary problem is that I have three other variables that also contain unstable for instance Vignette_DO_AUS1P and I need them all to be combined into a new variable that contains all the participants that had unstable as part of their vignette. And then I need to do the same for the others, adoption, stable, 1 placement, etc.
I tried variations of
gen adopt1 =1 if Vignette_DO_AS1P==1
gen adopt2=1 if Vignette_DO_AUS4P==1
gen adopt3=1 if Vignette_DO_AUS1P==1
gen combinedadopt=1 if adopt==1 + adopt1==1 + adopt2==1 + adopt3==1
But when I looked at browse combinedadopt, I just got a variable with no data just - hyphens all the way down.
I appreciate any help and direction you all can provide.
So this is my first time posting and also using Stata. I have spent some time trying to figure it out, so forgive me if it is obvious.
I have dataset from a Qualtrics vignette survey asking participants about decision making in child welfare.
The participants got one of 8 randomized vignettes with three variables included in the vignette, which are either - adoption/independent, stable/unstable, 1 placement/4placements.
When I downloaded the survey from Qualtrics, I have variables in Stata that look like the following
Vignette_DO_ILUS1P (just for clarification, this Vignette_DO_ILUS1P is independent, unstable, 1 placement).
Vignette_DO_ILUS4P
Vignette_DO_ILS1P
Vignette_DO_ILS4P
Vignette_DO_AUS1P
Vignette_DO_AUS4P
Vignette_DO_AS1P
Vignette_DO_AS4P
Each of the variables in Stata just show a 1 or a - to indicate if a participant recieved that particular vignette or not.
I need to create new variables for adoption, independent, stable, unstable, 1 placment and 4 placements and I have tried the following
gen unstable=0 if Vignette_DO_ILUS1P ==1
gen independetlive=0 if Vignette_DO_ILUS1P==1
gen oneplacement=0 if Vignette_DO_ILUS1P ==1
gen adopt=1 if Vignette_DO_AS4P==1
gen stable=1 if Vignette_DO_AS4P==1
gen fourplacement=1 if Vignette_DO_AS4P==1
That works well enough to make the six new variables, but then I get stuck.
My primary problem is that I have three other variables that also contain unstable for instance Vignette_DO_AUS1P and I need them all to be combined into a new variable that contains all the participants that had unstable as part of their vignette. And then I need to do the same for the others, adoption, stable, 1 placement, etc.
I tried variations of
gen adopt1 =1 if Vignette_DO_AS1P==1
gen adopt2=1 if Vignette_DO_AUS4P==1
gen adopt3=1 if Vignette_DO_AUS1P==1
gen combinedadopt=1 if adopt==1 + adopt1==1 + adopt2==1 + adopt3==1
But when I looked at browse combinedadopt, I just got a variable with no data just - hyphens all the way down.
I appreciate any help and direction you all can provide.

Comment