For my Master thesis, I used Qualtrics for an online experiment and within this experiment respondents are randomly distributed over two different treatment groups (condition 1 and condition 2).
My experiment is about which crisis response strategy is most effective in protecting corporate reputation, reducing anger among stakeholders and preventing the possibility of a lower purchase intention when a company is involved in a crisis.
The crisis response strategies that I use are apology (condition 1) and compensation (condition 2).
Both conditions have the same items and same scales, except one question is different for both conditions because this question checks if the manipulation has succeeded.
In condition 1(apology) I have the following variables:
ApolManipulationCheck__ (variable to test if the manipulation check has succeeded for this condition)
ApolPostcrisisrep_overall (Dependent variable)
ApolPostAng_1 (Dependent variable)
ApolPostCPI_ (Dependent variable)
In condition 2 (compensation) I have the following variables:
CompManipulationCheck_ (variable to test if the manipulation check has succeeded for this condition)
CompPostcrisis_overall (Dependent variable)
CompPostAng_1 (Dependent variable)
CompPostCPI_1 (Dependent variable)
All variables have been converted from string into numeric.
I’m using Stata 16.1 on MacOs Catalina 10.15 and I have 111 observations in my data set (56 in condition 1 and 55 in condition 2).
In order to run tests in Stata I need to create an independent variable, which I think should be a dummy variable where apology = 0 and compensation = 1.
I tried to create a dummy variable with the following steps and commands:
- First I created a new variable (Postcrisisrep_overall) which is a combination of the variables ApolPostcrisisrep_overall and CompPostcrisis_overall to get rid of missing values.
/// Combining Post-crisis rep
gen Postcrisisrep_overall = 0
replace Postcrisisrep_overall = CompPostcrisis_overall if CompPostcrisis_overall !=.
replace Postcrisisrep_overall = ApolPostcrisisrep_overall if ApolPostcrisisrep_overall !=.
- Then I created a dummy variable, where apology = 0 and compensation = 1
gen PostcrisisrepDummy = 0
replace PostcrisisrepDummy = 1 if CompPostcrisis_overall !=.
This worked when I checked my data editor. So, I repeated the two steps for the two other dependent variables and the manipulation check.
So now I have four dummy variables in total that match with my 3 dependent variables and the manipulation check variable:
CompManupDummy
PostcrisisrepDummy
PostAngDummy
PostCpiDummy
I think I used the right command and used the right steps to create a dummy variable which represents my independent variable (apology and compensation).
But, now are all my dummy variables linked to a dependent variable but I feel like the right method is when I have to create only 1 dummy variable with apology = 0 and compensation = 1 that I can use for all my dependent variables.
So, my question is how do I create a dummy variable with apology = 0 and compensation = 1 that I can use for all my dependent variables, instead of creating a dummy variable for each dependent variable?
I know it is much easier for you to help me if I use dataex, but I watched videos on how to use it and I tried to copy a part of my dataset but I cannot manage to make a clear, clear copy of my dataset.
So, I try to explain as good as possible what my data set looks like.
Thanks in advance!
0 Response to Problem regarding the creation of an independent variable
Post a Comment