Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Nonlinear relation in generalized additive model

    I have a question about a stata code. I need to run GAM (generalized additive model) to estimate a nonlinear relationship. For simplicity, let’s say I want to run
    Y=B1+B^2*X2 with family function of inverse Guassian and link function of log.
    Do you happen to know the code?

  • #2
    You didn't get a quick answer. You'll increase your chances of a helpful answer by following the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output, and sample data using dataex. I would think after posting 18 items, you would know this.

    I don't know exactly what you want to do - the terminology of generalized additive model is not one I'm familiar with. Most additive models can be run with conventional Stata estimators (regress, logit, ologit, poisson etc.). If you look at the subject index under generalized linear models, there is a wide variety of models under this label. GEE and GLM seem likely candidates for what you want.

    I suspect your equation is wrong. I don't see why you would have b squared as the parameter. You can estimate a b2 and then use lincom or other tools to look at its square root if that is really what you're after. It would more normally be x squared with a parameter. that would be written using factor variable notation: regress y x x#x

    Comment

    Working...
    X