I want to test whether they have a preference for green options in the first period. Then, I want to test if their preference for green stays the same, increases, or decreases.
Code:
set seed 1000 clear all set obs 25 generate actorid = _n expand 100 bys actorid : generate choiceid = _n generate period1chosen = runiform() < 0.3 generate period2chosen = runiform() < 0.2 if period1chosen == 1 replace period2chosen = 0 if period2chosen == . gen green = (choiceid < 25)
The second analysis to get at changes in preference is less clear. reg period2chosen green seems wrong.
0 Response to Choice across periods
Post a Comment