I aim at creating a table that reports the mean of credit_rationed1 (namely, the % of credit-rationed individuals) in terms of several household characteristics (age, education, income percentile...) as row variables and years of my sample as column variables. My sample includes survey waves that run every three years from 2002 to 2017. Credit_rationed1 is a dummy variable with value 1 if the household has been rejected a loan application in the last 2 years and value = 0 if they got accepted their loan applications. Missing values mean that household did not ask for a loan in that period.
This is how my data looks like:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float credit_rationed1 double(age education_hhead percrent) float time . 1 1 4 2002 0 1 1 2 2002 . 1 1 1 2002 0 1 1 3 2002 0 1 1 2 2002 . 1 1 4 2002 0 1 1 4 2002 . 1 1 3 2002 . 1 1 1 2002 . 1 1 2 2002 0 1 1 4 2002 0 1 1 1 2002 0 1 1 2 2002 . 1 1 2 2002 . 1 1 2 2002 0 1 1 1 2002 . 1 1 1 2002 . 1 1 1 2002 . 1 1 3 2002 . 1 1 4 2002 . 1 1 1 2002 . 1 1 2 2002 . 1 1 5 2002 . 1 1 4 2002 0 1 1 3 2002 . 1 1 3 2002 . 1 1 3 2002 . 1 1 3 2002 . 1 1 6 2002 . 1 1 2 2002 0 1 1 2 2002 . 1 1 3 2002 . 1 1 4 2002 . 1 1 3 2002 . 1 1 3 2002 . 1 1 1 2002 . 1 1 1 2002 . 1 1 5 2002 1 1 1 1 2002 . 1 1 3 2002 . 1 1 5 2002 0 1 1 1 2002 0 1 1 3 2002 . 1 1 5 2002 . 1 1 1 2002 . 1 1 2 2002 . 1 1 2 2002 . 1 1 4 2002 0 1 1 2 2002 . 1 1 4 2002 1 1 1 3 2002 0 1 1 2 2002 0 1 1 1 2002 0 1 1 2 2002 0 1 1 5 2002 . 1 1 2 2002 . 1 1 1 2002 0 1 1 3 2002 0 1 1 3 2002 0 1 1 5 2002 . 1 1 3 2002 . 1 1 2 2002 . 1 1 4 2002 . 1 1 4 2002 . 1 1 2 2002 . 1 1 4 2002 . 1 1 4 2002 0 1 1 3 2002 . 1 1 2 2002 0 1 1 4 2002 . 1 1 1 2002 . 1 1 2 2002 . 1 1 2 2002 0 1 1 4 2002 0 1 1 3 2002 . 1 1 1 2002 . 1 1 4 2002 0 1 1 1 2002 0 1 1 3 2002 . 1 1 2 2002 . 1 1 4 2002 . 1 1 2 2002 . 1 1 3 2002 . 1 1 2 2002 . 1 1 4 2002 . 1 1 4 2002 . 1 1 2 2002 . 1 1 2 2002 0 1 1 4 2002 . 1 1 1 2002 . 1 1 1 2002 0 1 1 2 2002 . 1 1 2 2002 0 1 1 4 2002 . 1 1 3 2002 . 1 1 1 2002 0 1 1 4 2002 . 1 1 3 2002 0 1 1 3 2002 . 1 1 3 2002 end
Code:
collect: by age education_hhead time: sum credit_rationed1 collect layout (age education_hhead) (time) (result[mean])
"Your layout specification does not uniquely match any items. One or more of the following dimensions might help uniquely match items: age, cmdset, education_hhead."
Does anybody know why is this error appearing? Any suggestions are greatly appreciated.
Best wishes,
0 Response to Problems with collect layout
Post a Comment