Hello there,
I have a data set like this-
uid question c1 c2 c3
1 q1 2 3 6
1 q2 3 5 2
1 q3 4 5 3
2 q1 5 2 6
2 q2 3 6 2
3 q1 3 4 5
3 q2 3 5 2
3 q3 3 3 6
3 q4 4 5 2
But, I need it like this-
uid class q1 q2 q3 q4
1 c1 2 3 4 .
1 c2 3 5 5 .
1 c3 6 2 3 .
2 c1 5 3 . .
2 c2 2 6 . .
2 c3 2 3 4 .
3 c1 3 3 3 4
3 c2 4 5 3 5
3 c3 5 2 6 2
I have tried xpose, sxpose, reshape and stack.
How can I do it? Thanks in advance.
Related Posts with Partially transpose/ reshape variable in dataset
Regression with Newey West Standard ErrorsHello, I am working on a time series project and I try to verify the Permanent Income Hypothesis wi…
Problem with R2 measures in multilevel modelDear all, Currently, I'm estimating some multilevel linear probability models and I try to obtain (…
qrkd: Stata module to estimate and conduct robust inference for heterogeneous causal effects in quantile regression kink designsqrkd: Stata module to estimate and conduct robust inference for heterogeneous causal effects of a co…
reg3- Can the same exogenous variables appear more than once in the system?Hi all, I'm working on a 3SLS regression where I have three endogenous variables and a set of exoge…
weakivtest (TSLS versus LIML critical values )After Ivreg2 , i need to run the weak instrument test by weakivtest . My question : Can I refer onl…
Subscribe to:
Post Comments (Atom)
0 Response to Partially transpose/ reshape variable in dataset
Post a Comment