Hi All,
Stata 14.2 - Longitudinal Data
I'm wanting find the effects of a variable with a nonlinear relationship to the dependent variable and that also has both positive and negative values. Unfortunately using:
will square negative values and create positive values. Yes, it would be possible to create a new variable "var^2" by multiplying "var" by its absolute value, but I want to use -margins- after the regression, which wouldn't be able to combine the effects of "var" and "var^2".
Are there any ideas on how to make sure a squared variable stays negative and is able to be used in -margins-?
-Jeff
Stata 14.2 - Longitudinal Data
I'm wanting find the effects of a variable with a nonlinear relationship to the dependent variable and that also has both positive and negative values. Unfortunately using:
Code:
reg depvar var var#var
Are there any ideas on how to make sure a squared variable stays negative and is able to be used in -margins-?
-Jeff
Comment