Page 1 of 1

Getting Syntax Error

Posted: Thu Apr 12, 2012 1:05 pm
by andrevg
Hello, I'm trying to run a program I'm writing to correct heteroskedasticity on a linear regression.

equation extended2.ls co2 c gdp gdp^2 gdp^3 density gov udensity
genr res = resid
equation hwhite.ls res^2 C GDP GDP^2 GDP*(GDP^2) GDP*(GDP^3) GDP*DENSITY GDP*GOV GDP*UDENSITY (GDP^2)*(GDP^3) (GDP^2)*DENSITY (GDP^2)*GOV (GDP^2)*UDENSITY (GDP^3)^2 (GDP^3)*DENSITY (GDP^3)*GOV (GDP^3)*UDENSITY DENSITY DENSITY^2 DENSITY*GOV DENSITY*UDENSITY GOV GOV^2 GOV*UDENSITY UDENSITY UDENSITY^2
genr sigma2 = c(1) + c(2)GDP + c(3)*GDP^2 + c(4)*GDP*(GDP^2) + c(5)*GDP*(GDP^3) + c(8)*GDP*UDENSITY + c(12)*(GDP^2)*UDENSITY + c(13)*(GDP^3)^2 + c(16)*(GDP^3)*UDENSITY + c(22)*GOV^2 + c(23)*GOV*UDENSITY + c(24)*UDENSITY + c(25)*UDENSITY^2
genr sigma = @sqrt(abs(sigma2))
equation extendedfinal.ls (co2)/sigma 1/sigma gdp/sigma (gdp^2)/sigma (gdp^3)/sigma density/sigma gov/sigma udensity/sigma

I'm getting the error in:

genr sigma2 = c(1) + c(2)GDP + c(3)*GDP^2 + c(4)*GDP*(GDP^2) + c(5)*GDP*(GDP^3) + c(8)*GDP*UDENSITY + c(12)*(GDP^2)*UDENSITY + c(13)*(GDP^3)^2 + c(16)*(GDP^3)*UDENSITY + c(22)*GOV^2 + c(23)*GOV*UDENSITY + c(24)*UDENSITY + c(25)*UDENSITY^2

I would apreciate if anyone could help me see my error and correct me.
thanks

Re: Getting Syntax Error

Posted: Thu Apr 12, 2012 1:08 pm
by EViews Gareth
c(2)GDP

Re: Getting Syntax Error

Posted: Thu Apr 12, 2012 3:32 pm
by andrevg
Thanks a lot.
:)