I am generating a new variable based on existing variables in my dataset which were exported from Qualtrics. Using the following code:
gen X = .
replace X = 1 if Y == 1
The result is showing 0 changes made however there should be 64 changes. I've never come across this problem before, I wonder if it has something to do with the type of variable. Y (exported from Qualtrics) is double and X (that I generated) is a float.
replace X = 1 if Y== 1
(0 real changes made)
It only seems to be this one variable, all new variables have work. Anyone come across this before?
Related Posts with Generating new variable - Qualtrics export
Dummy variable for group matched observationsDear all, I have a variable of unique ids for a dataset of survey respondents which I have matched …
Generate variable with conditionsDear all, I am currently working on my masterthesis. For this thesis, I am preparing a dataset whic…
Histogram –Assigning min and max values to binsDear Stata users, For my Project, I need the histogram of the intraday returns for each day and save…
no observations r(2000) error codeHello I have a dataset of daily stock return and cash dividends for all Danish listed firms. I am i…
Different colors for the confidence intervals plotDear All, I want to plot confidence intervals with different colors of my preference. I am using the…
Subscribe to:
Post Comments (Atom)
0 Response to Generating new variable - Qualtrics export
Post a Comment