Page 1 of 1

Linear estimation with indicator variable

Posted: Tue Jun 16, 2015 7:11 pm
by igtrader02
Hi,

Can someone provide me with some guidance on how I should estimate a simple linear regression with an indicator variable?

Specifically, I am trying to estimate a linear regression that regresses selling price (SPRICE) on living area (LIVAREA)^2 but separating small houses from large houses using an indicator variable (LGELOT) which has the value of 1 for large lots and 0 for small lots. So essentially I should end up with an expression for that estimates the mean selling price for large lots and mean selling price for small lots and their associated coefficients for (LIVAREA)^2

I am using EViews 8 and just can't seem to obtain the answer. I've attached the EViews workfile.
stockton4.wf1
(104.42 KiB) Downloaded 200 times

Re: Linear estimation with indicator variable

Posted: Tue Jun 16, 2015 9:39 pm
by startz
Hi,

Can someone provide me with some guidance on how I should estimate a simple linear regression with an indicator variable?

Specifically, I am trying to estimate a linear regression that regresses selling price (SPRICE) on living area (LIVAREA)^2 but separating small houses from large houses using an indicator variable (LGELOT) which has the value of 1 for large lots and 0 for small lots. So essentially I should end up with an expression for that estimates the mean selling price for large lots and mean selling price for small lots and their associated coefficients for (LIVAREA)^2

I am using EViews 8 and just can't seem to obtain the answer. I've attached the EViews workfile.
stockton4.wf1
Something like

Code: Select all

ls sprice c livarea^2 lgelot lgelot*livearea^2

Re: Linear estimation with indicator variable

Posted: Tue Jun 16, 2015 9:54 pm
by igtrader02
.

Re: Linear estimation with indicator variable

Posted: Tue Jun 16, 2015 9:57 pm
by startz
Hi,

Can someone provide me with some guidance on how I should estimate a simple linear regression with an indicator variable?

Specifically, I am trying to estimate a linear regression that regresses selling price (SPRICE) on living area (LIVAREA)^2 but separating small houses from large houses using an indicator variable (LGELOT) which has the value of 1 for large lots and 0 for small lots. So essentially I should end up with an expression for that estimates the mean selling price for large lots and mean selling price for small lots and their associated coefficients for (LIVAREA)^2

I am using EViews 8 and just can't seem to obtain the answer. I've attached the EViews workfile.
stockton4.wf1
Something like

Code: Select all

ls sprice c livarea^2 lgelot lgelot*livearea^2
Hi,

I've tried the command above already in my numerous attempts, but it does not yield the correct answer.

The answer according to the book is,

Large lots : SPRICE = 113279 + 193.83 * LIVAREA^2
Small lots : SPRICE = 62172 + 186.86 * LIVAREA^2

Can't seem to replicate the results.
So what do you get?

Re: Linear estimation with indicator variable

Posted: Tue Jun 16, 2015 9:58 pm
by igtrader02
Just figured out how to do it.

Thanks y'all.