Hi,
I want to regress variable "pass" which is equal to 1 if the course was passed on variable "roommate" which is a dummy equal to 1 if the individual has a roommate.
I would like to weigh each pass observation by the number of credits each course has. How should I do this? Would it suffice to use [aw=credits] in the regression? Would it be the same case if I have an instrument and I want to use ivregress 2sls?
My data looks like the sample below:
Thanks!
I want to regress variable "pass" which is equal to 1 if the course was passed on variable "roommate" which is a dummy equal to 1 if the individual has a roommate.
I would like to weigh each pass observation by the number of credits each course has. How should I do this? Would it suffice to use [aw=credits] in the regression? Would it be the same case if I have an instrument and I want to use ivregress 2sls?
My data looks like the sample below:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float id str1 course_code float(pass credits roommate) 1 "A" 1 5 1 1 "B" 1 5 1 1 "C" 1 4 1 1 "D" 0 2 1 1 "E" 1 2 1 1 "F" 1 2 1 2 "A" 1 5 0 2 "B" 0 5 0 2 "G" 0 5 0 2 "H" 1 5 0 3 "N" 1 7.5 1 3 "M" 1 7.5 1 3 "O" 1 7.5 1 3 "B" 1 5 1 4 "Y" 0 15 1 4 "Z" 0 2.5 1 5 "Q" 1 5 1 6 "R" 1 7.5 0 6 "T" 1 7.5 0 7 "B" 1 5 0 7 "C" 1 2.5 0 7 "D" 1 3 0 end
Comment