Hi i need stata help for econometrics...
I need to solve these problems using stata and i don't know which code i need to put to create dummy variable as the instruction. How do i create an dummy variable through stata?
ps: ii & iii is just for the reference in case it helps you to understand what is going on
In the model from part ( 1 ) , allow the effect of being an athlete to differ by gender . To do this , choose female nonathletes as the base group , and define dummy variables for each of the remaining groups :" . femath = 1 , if the student is a female and an athlete , and O otherwise . maleath = 1 , if the student is a male and an athlete , and O otherwise* . malenoath = 1 , if the student is a male and not an athlete , and O otherwise* hsize + A The estimated equation is : colgpa = + - hsize - + - hsperc + sat + - femath + - maleath + malenoath . At the 10 %/ significance level , against a two-tailed alternative hypothesis , the coefficient on femath I statistically significant and V in sign . This I that on average , female athletes obtain higher GPAS than female nonathletes , ceteris paribus .( V ) Create the explanatory variable femalesat , which is an interaction between female and sat , and add it to the regression equation in part ( ii ) . The estimated equation is : colgpa = + - hsizet - hsize _ + - hsperct salt - female + - femalesatt - athlete . At the 10% significance level , against a two-tailed hypothesis , the coefficient on femalesat is in sign and V statistically significant .( is ) The estimated equation is : colgpa = 1. 2379 ~ + ( - 0. 0573 ) - hsize + 0.0049 - hsize 2 + ( - 0. 0131 ) - hisperc + 0. 0016\\ A sat +\\ 0 . 1609 - female + 0. 1687 { athlete . The estimated GPA difference between athletes and nonathletes is approximately 0 . 1687 - grade points . This estimated difference between athletes and nonathletes is* I statistically significant at the 5% level against a two-tailed alternative . ( iii ) Drop sat from the model and reestimate the original regression equation . The newly estimated equation is : colgpa = 3. 0405 ~ + ( - 0. 0532 ) ~ hsize+ 0.0054 - hsize 2 + ( - 0. 017 ) - hsperct 0. 0649 - female+ 0. 0118 - athlete . Without sat as an explanatory variable , the estimated GPA difference between athletes and nonathletes is approximately 0. 0118 ~ grade points . This estimated differential between athletes and nonathletes is not statistically significant at the 5% level against a two-tailed alternative