Dear Statalist,
I have data on individuals' allocation of a budget across four categories. Each individual completes four rounds, each round has 4 decisions. As of now, I have four lines with each four decisions for every individual.
So far, so good. Now my advisor suggested I drop every allocation of 0 or 100; for example, if, in one round, an individual decides to allocate 100 only to one category and leave the other three empty.
The problem with drop is that the whole row (round) gets deleted even though the other three decisions in that round (row) have non-zero and non-100 data.
Without dropping, I tried to use regress with the if !(alloc==0 | alloc==100) qualifier, however, judging from the number of observations, again, the whole row is not considered (not just the 0 or 100 part) (even though it is no longer dropped).
Now, I'm thinking of using reshape long again, in essence, to have 16 rows per individual - with only one decision per row, such that if a 0 or 100 occurs, only that row is dropped without affecting the other decisions in that row.
Is this the best way to tackle my problem?
If so, how should I rename 1alloc, 2alloc, 3alloc, and 4alloc such that each allocation has its own row but is still part of round 1? I was thinking of 1alloc1, 2alloc2, 3alloc3, and 4alloc4 but I have a feeling that this is incorrect.
I am most grateful for any advice and insights!
Kind regards,
Mary
EDIT: reshape long (again) throws errors as the id variable does not uniquely identify the observations
I have data on individuals' allocation of a budget across four categories. Each individual completes four rounds, each round has 4 decisions. As of now, I have four lines with each four decisions for every individual.
So far, so good. Now my advisor suggested I drop every allocation of 0 or 100; for example, if, in one round, an individual decides to allocate 100 only to one category and leave the other three empty.
The problem with drop is that the whole row (round) gets deleted even though the other three decisions in that round (row) have non-zero and non-100 data.
Without dropping, I tried to use regress with the if !(alloc==0 | alloc==100) qualifier, however, judging from the number of observations, again, the whole row is not considered (not just the 0 or 100 part) (even though it is no longer dropped).
Now, I'm thinking of using reshape long again, in essence, to have 16 rows per individual - with only one decision per row, such that if a 0 or 100 occurs, only that row is dropped without affecting the other decisions in that row.
Is this the best way to tackle my problem?
If so, how should I rename 1alloc, 2alloc, 3alloc, and 4alloc such that each allocation has its own row but is still part of round 1? I was thinking of 1alloc1, 2alloc2, 3alloc3, and 4alloc4 but I have a feeling that this is incorrect.
I am most grateful for any advice and insights!
Kind regards,
Mary
EDIT: reshape long (again) throws errors as the id variable does not uniquely identify the observations
Comment