Hello everyone
I am working in some descriptive analysis of a survey. Basically I want to get the counts and proportions of participants each year to put them in a matrix and then export them into excel using putexcel. The problem is I am failing to obtain the weighted counts of the variables to.
I tried:
But the return list only stores the unweighted observations and I want the weighted counts.
I laso try generating the weighted counts and porportions using this command:
However, still can not find a way to the data return by this command with putexcel, let alone store it into a matrix.
Any help or alternative pathway to accomplish this will be appreciated.
Thank you
I am working in some descriptive analysis of a survey. Basically I want to get the counts and proportions of participants each year to put them in a matrix and then export them into excel using putexcel. The problem is I am failing to obtain the weighted counts of the variables to.
I tried:
Code:
svy: tab year, obs percent format(%14.3gc) ereturn list mat define obs = e(Obs) mat list obs mat define pct = e(b)' mat list pct putexcel U7=matrix(obs) V7=matrix(pct), nformat(number_d2) hcenter
I laso try generating the weighted counts and porportions using this command:
Code:
svy: tab year, cell count
Any help or alternative pathway to accomplish this will be appreciated.
Thank you
Comment