Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Contains data from share.dta obs: 5 , 8 5 4 vars: 8 2 3 Jan 2 0 0 9 1 5 : 4 9 size:
Contains data from share.dta
obs:
vars: Jan :
size:
Variable storage display
name type format label variable label
school byte g school number:
sex byte g sex: male, female
arm byte g treatment arm: control, intervention
scpar byte g social class
debut byte g onset of sexual activity in followup:
noyes
regret byte g regret of first sex with last partner in
those with partner: noyes
kscore byte g knowledge of sexual health followup:
score from to
idno float g individual number
Sorted by: school
Sorted by: schCreate a data set containing data for males only from the above dataset and name it "sharem.dta" using stata commands
Use collapse on the data set sharem, collapsing by school and arm, in order to find for each school a the total number of males in the school hint use a dummy variable b the number of males who have had sexual debut in the school c the number of males in the school who regret their las sex act. Rename the variables maledebutm and regretm and create new variables for the proportion of males who had a sexual debut in each school and the proportion of males who regret sex in each school. Save the collapsed data set as shareschoolm
Use summary statistics to compare the school level proportion of males who had sexual debut and the school level proportion of males who regret having sex, between the two study arms.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started