Hello, I am using YRBS data -- a student survey taken in each US state every other year. Each entry of my dataset contains the responses of each individual student, along with the state and year. I want to create a time trend for a dummy variable--that is: how many students (more specifically, what percentage of them) in state A, B, C, etc. responded Yes to the question in each of the years X Y C.
I can find this easily by creating a for loop for each state and then tabulating year and the question (I should add that I weight the tabulations). However, this is not useful for my end goal, which is to handle a time trend.
How can I collapse this variable (a dummy variable with weights for each individual), to get the pct of students each year, for each state, that replied "yes"?
I have tried collapse, tabout, table, tabstat, tab2xl, etc. -- and can't quite get what I want.
Thank you!
Related Posts with Weighted Tabulation by Multiple Groups -- Export to XLS or DTA
How do I detect if I have problem with my degree of freedom due to too many categorical variables in my regression model?I am aware that having too many categorical variables in the regression model might affect degree of…
Markov switching for panel dataI want to estimate a Markov switching model for an unsustainable fiscal regime and a sustainable fis…
Reporting summary statistics for time variable (e.g., number of minutes)I'd like to report the summary statistics for a time variable. I ran an experiment and I have the n…
When to use Tobit regression?Hallo, I have been recommended to use a Tobit regression because my independent variable is very ri…
Calculate the age when the grant was received from the current age and the year when the grant was receivedDear All, Can you help me with the following. I have collected the age (d4) for all the respondent…
Subscribe to:
Post Comments (Atom)
0 Response to Weighted Tabulation by Multiple Groups -- Export to XLS or DTA
Post a Comment