Hello?
Does anyone know how I can implement the below equation in R? I would
like to estimate the following equation:

## Advertising

y=beta_ij * (1+gamma_j * dummy) * x_ij
where y is continuous, and all the x variables (j of them) are i=3
level categorical variables. The intuition is that instead of
estimating the additive value for a dummy variable, I would like to
estimate the multiplicative value for the dummy variable. Thus the
presence of the dummy would scale the beta. Note that for each x
variable there is only one gamma.
For concreteness, you can imagine that y is a continious test score, x
are categorical variables indicating different types of education
achievements, each type of education achievement is categorised in 3
levels (none, some, a lot), and the dummy indicates race. In this
model I believe that race affects test scores proportionally to
estimated beta of each education level. This avoids having to estimate
a gamma for each education achievement level.
Is the solution to simply use nls {stats} and type out the equation?
Hope the explanation makes sense, happy to explain further.
Best wishes,
Peter
______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.