non-linear least squares with many regressors
Posted: Mon Oct 24, 2016 8:06 am
Hi all,
I have a question on defining coefficients for non-linear least squares with many regressors.
I have 14 variables with similar name pattern. They all start with "n_", e.g. n_cpi, n_gdp, n_ism, etc. I need to do non-linear LS of the form
dep = constant + beta1*n_cpi*(1 + gamma11*date_dummy1 + gamma12*date_dummy2)
+ beta2*n_gdp*(1 + gamma21*date_dummy1 + gamma22*date_dummy2)
+ ...
+ beta14*n_ism*(1 + gamma141*date_dummy1 + gamma142*date_dummy2)
where beta1 is the coefficients for the overall response to gdp, gamma11 and gamma12 are the coefficients for the two subperiods, etc. I can't figure out how to properly specify the gamma coefficient using a loop. Can anyone give me a suggestion?
Thanks!
I have a question on defining coefficients for non-linear least squares with many regressors.
I have 14 variables with similar name pattern. They all start with "n_", e.g. n_cpi, n_gdp, n_ism, etc. I need to do non-linear LS of the form
dep = constant + beta1*n_cpi*(1 + gamma11*date_dummy1 + gamma12*date_dummy2)
+ beta2*n_gdp*(1 + gamma21*date_dummy1 + gamma22*date_dummy2)
+ ...
+ beta14*n_ism*(1 + gamma141*date_dummy1 + gamma142*date_dummy2)
where beta1 is the coefficients for the overall response to gdp, gamma11 and gamma12 are the coefficients for the two subperiods, etc. I can't figure out how to properly specify the gamma coefficient using a loop. Can anyone give me a suggestion?
Thanks!