Hello everyone, I am running two multiple linear regression models where the first one needs to have an interaction term between the dummy variable female (1 = female, 0=male) and a categorical variable beauty. The first model needs to have the interaction term between female and beauty, and the second one between male and beauty. I've read that i.female##c.beauty will give me the interaction term between the two variables but how should I write the regress in order to have an interaction term between female and beauty and male and beauty? I have tried the following: for the model with the interaction term between female and beauty I used regress with 1.female##c.beauty and 0.female##c.beauty for the second model but I don't know if this is the correct way to write it and if this is giving me the results I want. I also don't really understand the difference between # and ##.
Related Posts with Question on interaction terms
Multivalued treatment using inverse probability weights in teffectsDear Stata users, I want to estimate the ATE of a new policy on the number of firms, where policy h…
command gmnlHello. I would like to estimate Generalized Multinomial Logit using command gmnl. But I got this err…
Fit plots based on multivariable linear regressionDear community, I would like to create a two-way plot of two continuous variables. STATA's fit plot…
choosing/ extracting the highest value from multiple observationsDear Stata team, I would appreciate it if someone could shed some light on my query below: I have …
Help in understanding tfdiffDear all, I am trying to understand the tfdiff command before applying it to my data. To do so, I s…
Subscribe to:
Post Comments (Atom)
0 Response to Question on interaction terms
Post a Comment