I currently have data that looks like this:
a X 0
a Y 0
a Y 1
b X 0
b Y 0
b Z 1
c X 1
c Y 1
c Z 0
Where abc is the individual, XYZ is the method, and 01 is whether that individual uses that method.
How do I reshape my data so that I have dummy variables for each method that take the value 1 if that individual uses that method?
Thank You
Related Posts with Reshape Long to Wide to create dummy variables
Count frequencies of (binary) variable and merge these to original datasetThe following provides one solution to the problem. However, it seems unnecessarily complicated to m…
Descriptive Statistics by SegmentHi all, I have ratings data (ratings are 0-5) and I am trying to see what what % of users never rat…
TWFE: Different results between Stata and RHi, We are running two-way fixed effects on R and Stata using the same data, and they are giving di…
Stochastic Frontier AnalysisI conducted Stochastic Frontier Analysis (SFA) using the command 'frontier' with the natural log of …
Showing values that exist in a value label but are not taken on by a variable in a table/tabulation?Hi All, I have a variable that represents the answers to the following question on a survey: Do you…
Subscribe to:
Post Comments (Atom)
0 Response to Reshape Long to Wide to create dummy variables
Post a Comment