Beef Part I

12 views
Skip to first unread message

Adi A

unread,
Feb 4, 2011, 3:25:08 PM2/4/11
to Econ_401_winter_2011
Hi all,
I'm starting a discussion regarding the beef hw question. I also
looked at his slides (regression demo 1 & 2).
At this point, I have two questions:
1. What does DW mean?
2. How did he create the histograms? How is it done technically in
Excel?
If any of you attends the tutoring session tomorrow and learns
something important, please share ...:)
Have a good weekend,
Adi.

Adi Aloni

unread,
Feb 4, 2011, 3:58:25 PM2/4/11
to econ_401_w...@googlegroups.com
Another question - how do we convert a log-linear equation into a demand
function?

alex smirnov

unread,
Feb 4, 2011, 5:37:04 PM2/4/11
to econ_401_w...@googlegroups.com
Hi Adi,

Regarding log-linear, see part 5 of problem 1

basically, when you take a log of your data and add it together (put it into a linear form), you "transform" a log equation into a linear equation

Q1=b0*P1^b1    =>    log(Q1) = LOG(b0) + B1*log(P1)

5. Regression Analysis
a) To run the regression SALES = a + bGNP, click on “Tools/DataAnalysis/Regression.”
EXCEL will ask you to input the X and Y range. Y is your dependent variable, or Left-
Hand Side (LHS) variable, and X are all you independent variables, or the Right Hand
Side (RHS) variables. To add labels to the regression, make sure you included the first
row in the X and Y range and check the box before “Labels”. Click on “OK” and EXCEL
will automatically run a least squares regression on your designated data and provide a
linear equation and basic statistical tests to evaluate your regression model. On the
regression menu, there are a few other options you can experiment with, such as residual
output and residual plots. You are advised to try these on your own, and make sure you
understand the output both statistically and economically.
b) If your equation is a power function, i.e. in the form:
SALES = aGNPb (see chapter 3, SM)
To estimate this equation you will need to generate new data series for both sides of the
equation to make the equation linear. Make the variable the natural log of SALES, say,
LSALES in a new column and the natural log of GNP in another, say LGNP. Then
proceed to run a regression on LSALES and LGNP.
The result is: LSALES = 2.9 + .97*LGNP

Adi Aloni

unread,
Feb 4, 2011, 6:01:39 PM2/4/11
to econ_401_w...@googlegroups.com

Thanks Alex. However, once I have the regression equation in ln terms, how do I make it a power function again?

alex smirnov

unread,
Feb 4, 2011, 6:10:31 PM2/4/11
to econ_401_w...@googlegroups.com
first you take your data and create a log of it........then you run a regression.........you get your coefficients

your coefficients are Q1=b0*P1^b1*P2^b2 etc

b0 is your intercept, and the b1-bn are the coefficients that excel spits out

at least that's what I think  ;)

Adi Aloni

unread,
Feb 4, 2011, 6:43:38 PM2/4/11
to econ_401_w...@googlegroups.com

Got it. Also, once I have the ln of the forecast using the log linear regression equation, I can use the EXP function to get the real number.

alex smirnov

unread,
Feb 4, 2011, 7:48:44 PM2/4/11
to econ_401_w...@googlegroups.com
yes, you are right

In Excel, the Exp function returns e raised to the nth power, where e = 2.71828183.  

also, after some "sole searching" ...

DW is Durban Watson.  This page explains it very concisely and simply


if you run a regression with only 1 variable PBEEF (as Heineke does if you look at first demo pg 2)

Then you to get that 0.091685, you type in 

=SUMXMY2(C26:C47,C25:C46)/SUMSQ(C25:C47)

into any cell.  It is also described on pg30 of his notes on regression (part 1)


As far as the histogram, I still haven't figured out how to get the normal line or to get 15 intervals (ran out of time).........but basically you select your Standard residuals  =>

go to Data tab  => Data Analysis => Histogram  => data should already be selected (ignore the "bin range" for now)........click on "chart output"  =>   click OK    and u should have some type of a histogram  ;)

Adi Aloni

unread,
Feb 4, 2011, 8:42:54 PM2/4/11
to econ_401_w...@googlegroups.com

Thanks Alex!

zhouz...@yahoo.com

unread,
Feb 5, 2011, 5:29:58 PM2/5/11
to Econ_401_winter_2011
hi, alex , what 's the C26:C47,C25:C46 in the parenthesis mean ?
On Feb 4, 4:48 pm, alex smirnov <alex.smir...@gmail.com> wrote:
> yes, you are right
>
> In Excel, the *Exp* function returns e raised to the nth power, where e =
> 2.71828183.
>
> also, after some "sole searching" ...
>
> DW is Durban Watson.  This page explains it very concisely and simply
>
> http://paws.wcu.edu/jarrell/mehodwstat.htm
>
> if you run a regression with only 1 variable PBEEF (as Heineke does if you
> look at first demo pg 2)
>
> Then you to get that 0.091685, you type in
>
> =SUMXMY2(C26:C47,C25:C46)/SUMSQ(C25:C47)
>
> into any cell.  It is also described on pg30 of his notes on regression
> (part 1)
>
> As far as the histogram, I still haven't figured out how to get the normal
> line or to get 15 intervals (ran out of time).........but basically you
> select your Standard residuals  =>
>
> go to Data tab  => Data Analysis => Histogram  => data should already be
> selected (ignore the "bin range" for now)........click on "chart output"  =>
>   click OK    and u should have some type of a histogram  ;)
>
>
>
> On Fri, Feb 4, 2011 at 3:43 PM, Adi Aloni <aloni....@gmail.com> wrote:
> > Got it. Also, once I have the ln of the forecast using the log linear
> > regression equation, I can use the EXP function to get the real number.
>
> > *From:* econ_401_w...@googlegroups.com [mailto:
> > econ_401_w...@googlegroups.com] *On Behalf Of *alex smirnov
> > *Sent:* Friday, February 04, 2011 3:11 PM
>
> > *To:* econ_401_w...@googlegroups.com
> > *Subject:* Re: Beef Part I
>
> > first you take your data and create a log of it........then you run a
> > regression.........you get your coefficients
>
> > your coefficients are Q1=*b0**P1^*b1**P2^*b2* etc
>
> > b0 is your intercept, and the b1-bn are the coefficients that excel spits
> > out
>
> > at least that's what I think  ;)
>
> > On Fri, Feb 4, 2011 at 3:01 PM, Adi Aloni <aloni....@gmail.com> wrote:
>
> > Thanks Alex. However, once I have the regression equation in ln terms, how
> > do I make it a power function again?
>
> > *From:* econ_401_w...@googlegroups.com [mailto:
> > econ_401_w...@googlegroups.com] *On Behalf Of *alex smirnov
> > *Sent:* Friday, February 04, 2011 2:37 PM
> > *To:* econ_401_w...@googlegroups.com
> > *Subject:* Re: Beef Part I
>
> > Hi Adi,
>
> > Regarding log-linear, see part 5 of problem 1
>
> > basically, when you take a log of your data and add it together (put it
> > into a linear form), you "transform" a *log* equation into a *linear*equation
> > On Fri, Feb 4, 2011 at 12:58 PM, Adi Aloni <aloni....@gmail.com> wrote:
>
> > Another question - how do we convert a log-linear equation into a demand
> > function?
>
> > -----Original Message-----
> > From: econ_401_w...@googlegroups.com
> > [mailto:econ_401_w...@googlegroups.com] On Behalf Of Adi A
> > Sent: Friday, February 04, 2011 12:25 PM
> > To: Econ_401_winter_2011
> > Subject: Beef Part I
>
> > Hi all,
> > I'm starting a discussion regarding the beef hw question. I also
> > looked at his slides (regression demo 1 & 2).
> > At this point, I have two questions:
> > 1. What does DW mean?
> > 2. How did he create the histograms? How is it done technically in
> > Excel?
> > If any of you attends the tutoring session tomorrow and learns
> > something important, please share ...:)
> > Have a good weekend,
> > Adi.- Hide quoted text -
>
> - Show quoted text -

alex smirnov

unread,
Feb 5, 2011, 5:37:13 PM2/5/11
to econ_401_w...@googlegroups.com
those are the "normal residuals".......that's the column into which excel spits out the normal residuals if you do a regression analysis

alex smirnov

unread,
Feb 5, 2011, 8:45:47 PM2/5/11
to econ_401_w...@googlegroups.com
Hey everyone, I took some pictures of the white board at today's TA session.  Not sure how useful they will be, but here they are


here's also an excel file that shows how to calculate the Durban Watson


Here are also a couple of random notes I took from the session:


standard error  -  part of the variation that is NOT explained by the regression model or the average error between the estimation and the actual data

intercept - baseline of case shipment without all the variables inpacting (including seasonality) - i.e. The december case shipments

January - is the difference between january and december everything holding constant.  or seasonality due only to January

consumer packs and dealer allowances - a unit increase in x results in ...everything else held constant

need to calculate F-stat on the midterm by HAND

Spencer

unread,
Feb 5, 2011, 9:12:48 PM2/5/11
to econ_401_w...@googlegroups.com, econ_401_w...@googlegroups.com
Thanks alex

Sent from my iPhone

Carla Nunes

unread,
Feb 6, 2011, 9:41:33 PM2/6/11
to econ_401_w...@googlegroups.com
Hi guys,
 
I'm getting started on the beef homework part 1 (while watching super bowl :) and have a couple questions.
 
1) I run several regressions, starting w/ CPI variable, then w/ CPI and PBeef, then CPI, PBeef and Pchick, etc, etc.  In each of them, I get an improvement on the R square, however, some of the t-stat is negative and/or the p-stat isn't less than 0.05.  When we see that, do we remove that RHS variable, or do we leave it until the end? 
 
2) As far as the CPI goes, the homeworks mentions about 1967=1, does that mean we need to create a dummy?  If so, do we use both dummy and cpi on the regression?  Or just one of them? 
3) When I run the regression w/ all RHS variables + dummy, I get a lot of variables whose t-stat and p-value are not good but the R square is good.  Do you get the same?  What does that mean?
 
4) What's the strategy you're using to find the "best" model.
 
Thanks,
Carla

Adi Aloni

unread,
Feb 6, 2011, 10:25:55 PM2/6/11
to econ_401_w...@googlegroups.com

Hi Carla,

 

When I did the regressions, I started with using all the variables at once and then deleted the ones with inadequate p-value. I got the same r square values and good forecasts even after omitting variables. I don’t

know if there’s a right answer here, I guess it’s generally a trial and error process. I guess that’s my reply to your question 4, too.

 

For the CPI, I don’t think it’s a dummy, because it’s not a case of yes/no variable (like “is it January?”) but a sequence of values, where the baseline happens to be 1967.

 

If I understand correctly, the R square will get better as you keep adding variables, regardless of their fit quality.

 

Hope that helps,

Adi.

Savita Raina

unread,
Feb 6, 2011, 11:37:31 PM2/6/11
to econ_401_w...@googlegroups.com
Hi Adi, Carla,
 
This is what i got on running regressions. Can you check if you got the same answer
 
  Coefficients Standard Error t Stat P-value Lower 95% Upper 95% Lower 95.0% Upper 95.0% T-test
Intercept 0.081237643 2.283591 0.035575 0.972062 -4.75976 4.922234 -4.75976 4.922234
LnCPI 0.790177043 0.309327 2.554502 0.021209 0.134433 1.445921 0.134433 1.445921 reject
LnPBEEF -0.978059735 0.092357 -10.5899 1.23E-08 -1.17385 -0.78227 -1.17385 -0.78227 reject
LnPChick 0.144451708 0.108541 1.330855 0.201892 -0.08564 0.374547 -0.08564 0.374547 Accept
LnPOP 0.527316656 0.730914 0.721448 0.481044 -1.02215 2.076785 -1.02215 2.076785 Accept
LnPPORK 0.108343609 0.098856 1.095976 0.289312 -0.10122 0.317909 -0.10122 0.317909 Accept
Ln(Y) 0.488764971 0.187332 2.609085 0.018987 0.091639 0.885891 0.091639 0.885891 Reject

 
In this case my equation will be : LnBeef = .08 + .79CPI -.07Beef +.488Y
 
please guide me in case i am doing it wrong.
 
Savita

Carla Nunes

unread,
Feb 7, 2011, 1:17:48 AM2/7/11
to econ_401_w...@googlegroups.com
Thanks, Adi... Yea, I'm not sure what's the best way to go with... whether to keep on adding variables, or start w/ them all and then start removing them.  I'll ask the professor on Monday.
With regards to the dummy, I'm not sure why he would mention that 1967 = 1...
 
My best estimate was CPI, PBEEF, PCHICK, POP, even if the R square is slightly lower than the one provided by the professor in demo 1, which is Y, PBEEF, PCHICK, POP.  At least the coefficients, including intercept, have good t stat and p-values.
Did you guys get something similar? 
 
Carla

Carla Nunes

unread,
Feb 7, 2011, 1:26:12 AM2/7/11
to econ_401_w...@googlegroups.com
Hi Savita,
 
I haven't done the log-linear part yet, but from what I can see in yours, you'll probably need to drop some of the variables as some p-values are not good such as in LnPchick, LnPpork, LnPop...
 
I'll try to work on this tomorrow, and will let you know what I get!  I hope the professor will go over this also during the class.
 
See ya,
Carla

Savita Raina

unread,
Feb 7, 2011, 1:31:27 AM2/7/11
to econ_401_w...@googlegroups.com
hey Carla,
 
I did take work on the problem further and did removed variables such as lnPchick, LnPpork etc .Will discuss with you all tomorrow.

jonathan car

unread,
Feb 7, 2011, 2:45:32 AM2/7/11
to econ_401_w...@googlegroups.com
I got more or less same a Savita's answers on the log(Q-Beef)
 
Attached is what i got so far. Still working on the rest of the problems. Will update again tomorrow.
 
Regards
Jonathan
(Way to go - A. Rogers)


From: Savita Raina <savita...@gmail.com>
To: econ_401_w...@googlegroups.com
Sent: Sun, February 6, 2011 10:31:27 PM
Beer HW _ JC.pdf

zhouz...@yahoo.com

unread,
Feb 7, 2011, 9:14:26 AM2/7/11
to Econ_401_winter_2011
thanks, alex

On Feb 5, 2:37 pm, alex smirnov <alex.smir...@gmail.com> wrote:
> those are the "normal residuals".......that's the column into which excel
> spits out the normal residuals if you do a regression analysis
>
> On Sat, Feb 5, 2011 at 2:29 PM, zhouziha...@yahoo.com <zhouziha...@yahoo.com
> > > - Show quoted text -- Hide quoted text -

Carla Nunes

unread,
Feb 7, 2011, 10:38:34 AM2/7/11
to econ_401_w...@googlegroups.com
Hi Jonathan, thanks!  Quick question:  I see that you chose the equation which has all variables.  Should that equation have been chosen even when certain coefficients have the t-stat/p-value test failed?  I know that the R square for that one is the biggest, but I was wondering if there are times when we can choose a lower R square for a choice of a good t-stat/p-value in all variables used.
 
Did anyone go to the TA session last Saturday?  Was anything mentioned about how to choose the "ideal" model?
 
Thanks,
Carla

jonathan car

unread,
Feb 7, 2011, 12:35:37 PM2/7/11
to econ_401_w...@googlegroups.com
Hi Carla
You brought up a good question. I don't know the answer as I am still trying to figure out the exact relevance of t-stat and P-Value to the whole equation as far a statistics and probabilities are concern.
 
Regards
Jonathan


From: Carla Nunes <ccrn...@gmail.com>
To: econ_401_w...@googlegroups.com
Sent: Mon, February 7, 2011 7:38:34 AM

Carla Nunes

unread,
Feb 7, 2011, 5:13:34 PM2/7/11
to econ_401_w...@googlegroups.com
Hi guys,
 
I was wondering if any of you got started on part II of the beef homework.  I have a question about the RHS variables.  He mentions that the beef (LHS) should be per capita, but doesn't say anything about what changes happen in the RHS variables.  Income (Y) is already measure as "personal", so I believe no changes are needed.  Also, the price doesn't change either.  My question is regarding the Pop and CPI variables.  Is it relevant to include them in this new regression where the dependent variable is per capita?
 
Please let me know if you got any insights on this.  Thanks,
 
Carla

alex smirnov

unread,
Feb 7, 2011, 5:16:05 PM2/7/11
to econ_401_w...@googlegroups.com
Hey,

I went to the TA session.  She didn't really say how to get an "ideal" set of variables.  She did something along the lines of not simply removing variables that have a low t-stat or P-value.   On the other hand, you don't want to have more variables than needed.  I guess we'll find out in class today.

Another thing I'd like to point out, is that if you select all the data given and do a scatter plot, you'll notice that the population has a "hump" in 1952.  If you look at either of the regression examples, there's a dummy next to 1952 to identify that fact






On Mon, Feb 7, 2011 at 9:35 AM, jonathan car <joncar...@yahoo.com> wrote:

Carla Nunes

unread,
Feb 7, 2011, 5:37:44 PM2/7/11
to econ_401_w...@googlegroups.com
THanks, Alex.  Did she mention anything about the actual homework that we'll need to turn in?  Wonder what changes are needed in the RHS variables.  :S

alex smirnov

unread,
Feb 7, 2011, 5:45:41 PM2/7/11
to econ_401_w...@googlegroups.com
no, she didn't mention anything   

Gayathri Ravi

unread,
Feb 7, 2011, 7:54:58 PM2/7/11
to econ_401_w...@googlegroups.com
Alex, Sorry, was unable to skype you during my travel. This is very useful..thank you very much!!

Spencer

unread,
Feb 8, 2011, 11:30:57 AM2/8/11
to econ_401_w...@googlegroups.com, econ_401_w...@googlegroups.com
Hi all, what variables did you all use for finding the best model? Was it beef chicken and income for log and linear?

Also, do we use the log() command for ln or just ln() 

Sent from my iPhone

Carla Nunes

unread,
Feb 8, 2011, 11:51:58 AM2/8/11
to econ_401_w...@googlegroups.com
Spencer, you're referring to the models for the homework we'll be turning in tomorrow, correct?
 
If that's the case, I did get the variables u mentioned for the linear one, but I'm not done w/ the log-linear yet.
 
And answering to your question, you just use "ln()" for the new column values.
 
Hope that helps.
Carla

Spencer

unread,
Feb 8, 2011, 11:56:47 AM2/8/11
to econ_401_w...@googlegroups.com, econ_401_w...@googlegroups.com
Great! Yes I am referring to the one due tomorrow.

Sent from my iPhone

Carla Nunes

unread,
Feb 8, 2011, 12:09:43 PM2/8/11
to econ_401_w...@googlegroups.com
Ok, good.  Quick question on the linear one:  did you chicken variable had an "almost" bad t-stat/p-value? 
 
t-stat 2.038720326 
p-value 0.057341444

It's not ideal, but I guess this is because of the low sample size.
 
Let me know if you got the same.
 
Carla

Christy Knight

unread,
Feb 8, 2011, 12:21:21 PM2/8/11
to Econ_401_winter_2011
I am confused as to why chicken is included. I am getting what seem
to be bad results for t-stat and p-value

t Stat: 0.539819222
p-Value: 0.595592589

-Christy

Carla Nunes

unread,
Feb 8, 2011, 12:24:32 PM2/8/11
to econ_401_w...@googlegroups.com
What are your columns?  Where are you using the per capita values?

Carla Nunes

unread,
Feb 8, 2011, 1:27:25 PM2/8/11
to sph...@gmail.com, econ_401_w...@googlegroups.com
I thought I had sent this to all, but apparently not.
 
So, for the log model, I got same variables + dummy.

On Tue, Feb 8, 2011 at 9:46 AM, Carla Nunes <ccrn...@gmail.com> wrote:
BTW, I got the other variables for the log-linear.  They are the same as the linear model + dummy.

On Tue, Feb 8, 2011 at 9:13 AM, <sph...@gmail.com> wrote:
I am at work now, but ill respond to this as soon as I get home or if anyone else can chime in.

Adi Aloni

unread,
Feb 8, 2011, 2:04:03 PM2/8/11
to econ_401_w...@googlegroups.com

Are we ruling out population as a variable once we used it to calculate per capita data?

 

From: econ_401_w...@googlegroups.com [mailto:econ_401_w...@googlegroups.com] On Behalf Of Carla Nunes


Sent: Tuesday, February 08, 2011 9:25 AM
To: econ_401_w...@googlegroups.com

Carla Nunes

unread,
Feb 8, 2011, 2:06:19 PM2/8/11
to econ_401_w...@googlegroups.com
I did try using pop, but in all models, the t-stat/p-value failed.  BTW, I'm leaning towards including the dummy in my linear model too.  It improved the pchick values.

Christy Knight

unread,
Feb 8, 2011, 2:44:24 PM2/8/11
to Econ_401_winter_2011
I guess I am just stumped all around.

I know how to calculate the critical T and F values, but I don't know
what is the threshold for saying that the regression failed the t-stat/
p-value.

for per capita, are you dividing income by population and just using
that as a variable?

In the slides the first assumption test is that the residuals have a
normal distribution. I've tried a lot of different regressions and I
get basically the same graph of the residuals, none of which look
"normal."

Thanks!
Christy

On Feb 8, 11:06 am, Carla Nunes <ccrnu...@gmail.com> wrote:
> I did try using pop, but in all models, the t-stat/p-value failed.  BTW, I'm
> leaning towards including the dummy in my linear model too.  It improved the
> pchick values.
>
>
>
>
>
>
>
> On Tue, Feb 8, 2011 at 11:04 AM, Adi Aloni <aloni....@gmail.com> wrote:
> >  Are we ruling out population as a variable once we used it to calculate
> > per capita data?
>
> > *From:* econ_401_w...@googlegroups.com [mailto:
> > econ_401_w...@googlegroups.com] *On Behalf Of *Carla Nunes
> > *Sent:* Tuesday, February 08, 2011 9:25 AM
>
> > *To:* econ_401_w...@googlegroups.com
> > *Subject:* Re: Beef Part 2
>
> > What are your columns?  Where are you using the per capita values?
>
> > On Tue, Feb 8, 2011 at 9:21 AM, Christy Knight <christyfkni...@gmail.com>

alex smirnov

unread,
Feb 8, 2011, 2:51:52 PM2/8/11
to econ_401_w...@googlegroups.com
for the linear, I used income per capita, pbeef, pchicken, dummy (for 1952).  This is what I get.  Everything seems to be significant.  All the standard residuals are within 2.5 std dev.  These results seem better than without the dummy.  I'm just not sure why the coefficient for the dummy is negative......also the histogram is not normal  =(    back to the drawing board


I think for the F, you look at the significance, and if that's small, then that corresponds to the fact that there's a small chance your  Betas = 0

for the per/capita conversion, i divided both "BEEF" and "Y" by the population.  I don't think anything else needs to change

a.JPG

b.JPGc.JPG
b.JPG
a.JPG
c.JPG

Adi Aloni

unread,
Feb 8, 2011, 3:04:09 PM2/8/11
to econ_401_w...@googlegroups.com

Alex, it’s OK that the coefficient of the dummy is negative – you want it to reduce the forecasted demand to the low level of supply as opposed to higher demand due to forced low prices.

image001.jpg
image002.jpg
image003.jpg

Gabriel Bowers

unread,
Feb 8, 2011, 3:04:42 PM2/8/11
to econ_401_w...@googlegroups.com
I haven't started working on the HMWK yet.  But Heineke made an interesting point near to the end of yesterday's class.
 
By adding the dummy, the error introduced into the other coefficients (i.e. chicken) by the "price fixing of beef during 1952" was reduced.  This improved the t-value of the "chicken" coefficient.
 
Gabriel

b.JPG
a.JPG
c.JPG

Carla Nunes

unread,
Feb 8, 2011, 3:07:08 PM2/8/11
to econ_401_w...@googlegroups.com
Ok, let me try to help you.
 
You use the critical T and F values to compare with the values obtained for a given regression.  In a typical output, there is an ANOVA section, where you'll see the F and Significance F.  So, that F, from the ANOVA section, should be greater than your critical F.
 
Similarly, afer you run the regression, the list of variables chosen will appear on the bottom of the ANOVA section.  Each variable has its coefficient, standard error, t-stat and p-value.  The absolute value of the t-stat for each variable should also be greater than your calculated critical T.  Another test you need to do is to do is to verify whether the coefficient has the right signal (professor went over this yesterday). 
 
If some of these tests fail for certain variables, you will need to try another combination of variables in order to reach one where every variable passes all the conditions above.
 
As far as the variables used, my were:  PBEEF, PCHICK, Y (this is per capita), and DUMMY.
 
Hope that helps!

Carla Nunes

unread,
Feb 8, 2011, 3:10:52 PM2/8/11
to econ_401_w...@googlegroups.com
Alex, I got exactly the same as yours.  And I used the same set of variables for the log linear model.
 
Thanks for the confirmation! :)
Carla

b.JPG
a.JPG
c.JPG

Carla Nunes

unread,
Feb 8, 2011, 3:12:12 PM2/8/11
to econ_401_w...@googlegroups.com
BTW, the histogram will not be "perfectly" normal because the sample set is very small!
c.JPG
b.JPG
a.JPG

Carla Nunes

unread,
Feb 8, 2011, 3:27:04 PM2/8/11
to econ_401_w...@googlegroups.com
Guys, I had sent an email to Heineke asking about using the dummy on the linear model.  There is nothing on the residuals that indicate that we should use one for 1952.  Therefore, it should be dropped.  I'll keep my original model without the dummy.
c.JPG
a.JPG
b.JPG

Christy Knight

unread,
Feb 8, 2011, 3:45:46 PM2/8/11
to Econ_401_winter_2011
OK without the Dummy variable, this is the regression I get. Does
this match anyone else?

I think i'm getting the hang of this. How do you make the graphs?
I've tried the histogram function under Data Analysis, and also tried
graphing the residuals, standard residuals, and both at the same time
and I don't get anything as pretty as alex except for his "standard
Residuals" which looks more like my regular residual graph.

ugh.

R2 - .98
Intercept: 68.3779
Per Capita: .0258
PBeef: -125.86
PChick: 30.0722

Adi Aloni

unread,
Feb 8, 2011, 3:50:14 PM2/8/11
to econ_401_w...@googlegroups.com
I have the same numbers for the linear model :)

About the graphs, I just used a line graph on the standard residuals...

-----Original Message-----
From: econ_401_w...@googlegroups.com
[mailto:econ_401_w...@googlegroups.com] On Behalf Of Christy Knight
Sent: Tuesday, February 08, 2011 12:46 PM
To: Econ_401_winter_2011
Subject: Re: Beef Part 2

alex smirnov

unread,
Feb 8, 2011, 4:19:21 PM2/8/11
to econ_401_w...@googlegroups.com
I still think the dummy should be used for 1952, because income/capital is abnormally higher for that year, but i could be wrong

Cristy, I have the same #s if I don't use a dummy

Regarding the normalcy of the normal residuluals, I get the bellow historgram using y/capita, pbeef,pchicken, dummy.........i think that means my model is incorrect.......any thoughts regarding the bellow histogram?


d.JPG
d.JPG

Carla Nunes

unread,
Feb 8, 2011, 4:27:10 PM2/8/11
to econ_401_w...@googlegroups.com
Alex,
 
I got another email from the prof and he said we can use the dummy if we want.  So, I think I'll use the dummy.  As long as you justify it, we're good.
 
I'll post my MAPE and RMSE to confirm w/ yours, since you'll also be using the same for linear as me.
 
Carla

d.JPG

alex smirnov

unread,
Feb 8, 2011, 4:28:07 PM2/8/11
to econ_401_w...@googlegroups.com
i'm still feeling uneasy about the histogram though  =(    it's not normal by any stretch of the imagination
d.JPG

Carla Nunes

unread,
Feb 8, 2011, 4:35:03 PM2/8/11
to econ_401_w...@googlegroups.com
Try to define the bins yourself.  I usually put the bins between -3 and 3 since those are equivalent to standard deviations. 

d.JPG

Christy Knight

unread,
Feb 8, 2011, 4:39:37 PM2/8/11
to Econ_401_winter_2011
I used the standard residuals and got a normal looking graph using the
bins btwn -3 and 3!!

I still need to figure out the RMSE and MAPE.

Does anyone know if you're supposed to use the residuals or the
standard residuals for the DW statistic?

-Christy

Carla Nunes

unread,
Feb 8, 2011, 4:58:21 PM2/8/11
to econ_401_w...@googlegroups.com
For DW, you use the regular residuals, not the standard ones.

alex smirnov

unread,
Feb 8, 2011, 6:02:19 PM2/8/11
to econ_401_w...@googlegroups.com
I got a standard distribution when i redefined the bins!

thank you

Christy Knight

unread,
Feb 8, 2011, 6:13:50 PM2/8/11
to Econ_401_winter_2011
Here is what I am getting for RMSE and MAPE. Does that tie to anyone
else's numbers or am I totally off base??

1971
RMSE: .429; MAPE: -.0009
LnRMSE: .00056; MAPE: -1.2E-5

1972
RMSE: .329; MAPE: -.00073
LnRMSE: .002; MAPE: -3.9E-5



On Feb 8, 3:02 pm, alex smirnov <alex.smir...@gmail.com> wrote:
> I got a standard distribution when i redefined the bins!
>
> thank you
>
>
>
>
>
>
>
> On Tue, Feb 8, 2011 at 1:58 PM, Carla Nunes <ccrnu...@gmail.com> wrote:
> > For DW, you use the regular residuals, not the standard ones.
>

Kevin

unread,
Feb 8, 2011, 7:02:37 PM2/8/11
to Econ_401_winter_2011
I am a bit stuck. I managed to calculate the regression, however I do
not understand the reasoning on choosing variables. Is it a trial and
error process? How do i get the critical T and F values?
Additionally, what values would make an unsatisfactory T-Stat and P-
Value?


Kevin


On Feb 8, 12:07 pm, Carla Nunes <ccrnu...@gmail.com> wrote:
> Ok, let me try to help you.
>
> You use the critical T and F values to compare with the values obtained for
> a given regression.  In a typical output, there is an ANOVA section, where
> you'll see the F and Significance F.  So, that F, from the ANOVA section,
> should be greater than your critical F.
>
> Similarly, afer you run the regression, the list of variables chosen will
> appear on the bottom of the ANOVA section.  Each variable has its
> coefficient, standard error, t-stat and p-value.  The absolute value of the
> t-stat for each variable should also be greater than your calculated
> critical T.  Another test you need to do is to do is to verify whether the
> coefficient has the right signal (professor went over this yesterday).
>
> If some of these tests fail for certain variables, you will need to try
> another combination of variables in order to reach one where every variable
> passes all the conditions above.
>
> As far as the variables used, my were:  PBEEF, PCHICK, Y (this is per
> capita), and DUMMY.
>
> Hope that helps!
>

Gayathri Ravi

unread,
Feb 8, 2011, 7:24:35 PM2/8/11
to econ_401_w...@googlegroups.com
Hi Guys

Can some one please confirm the order of using "exp" please:

1) After getting the log linear equation, you use this equation for 1971 and 1972 to predict the per capita beef consumption using L PBeef
2) And then, we use "exp" to convert the value we got in the previous step to get the real number.
3) Then, we compare the actual per capita beef consumption(Beef) with the one we got in step 2 

Is the sequence right ?

Spencer

unread,
Feb 8, 2011, 9:01:11 PM2/8/11
to econ_401_w...@googlegroups.com, econ_401_w...@googlegroups.com
How can you compare if one equation is significantly better than the other ? It seems we used the same variables for both even though there is a different result for the answers.

Sent from my iPhone

alex smirnov

unread,
Feb 9, 2011, 12:57:17 AM2/9/11
to econ_401_w...@googlegroups.com
Hey everyone,

I think I'm nearing the conclusion of this beef saga  ;)  Not sure how correct I am, but let me try answering/confirming your questions

________________________________________


Christy:  the way I understand MAPE and RMSE (pg 6-7 of regression slides 2), is that you're trying to calculate it for a period, not for a single year.  The equation is a SUM over N-m observations (i.e. we have 22 totals years, we use 20 of those to build a model, and we're trying to forecast it over the last 2  =>  N - m = 22-20=2)

I got 
MAPE = 2.63% (linear)  MAPE = 2.37% (log linear)
RMSE = 2.61 (linear)     RMSE = 2.41 (log linear)

this seems pretty good .  The log linear is a tiny bit better by this measure 

for both models I only used income, pbeef, pchicken, & dummy (1952)

_______________________

Kevin:

I think it is a trial/error.  However, the F statistic tells you if the overall model is good (portion of data explained by the regression equation over the total forecast error)  see pg 19 of regression slides 1
t statistic tells you if a particular variable is significantly different from 0 (i.e. that variable has predictive properties)

The bigger the F and T, the better your model/variable.  Technically you are supposed to compare each with its "critical value", but as a rule of thumb, I believe you can just see if both are large enough (for t, the rule of thumb is t>2 I believe)

you can get the critical value of each in excel 

for example, in my case, =FINV(0.05,4,16) will tell me what F critical with a 95% confidence with k-1 degrees of freedom and N-k residuals (see pg 11 of regression slides 1) is.  so if my actual F is greater than that number (3.006917 for me), then you cannot reject the model and hence accept it

similarly, in my case =TINV(2*0.05,45)  (1.745884 in my case) will give me the critical t value for N-k degrees of freedom (see pg 22 of regression slides 1).  The "2" is there because I'm trying to convert from 2-tail test to a 1-tail test.  I'm not sure if that's accurate, but that's how I get the same result as pg 22 of his regression slides 1.  also see 


__________________________________________________________


Gayathri:

Yes, I believe the sequence is right

_______________________

Spencer:

I don't really know how to compare, other than MAPE and RMSE.  I also plotted the predicted vs actual data for both models, and I get pretty similar result.  I think this is to be expected.  If you look at the bottom of problem 6 (the one we didn't have to turn in), the first partial answer states "both linear and log-linear forms explain the data very well"

______________________________

Please take everything I've written with a grain of salt   ;)


Alex

Adi Aloni

unread,
Feb 9, 2011, 1:05:06 AM2/9/11
to econ_401_w...@googlegroups.com

When you don’t use a dummy for the linear regression (I opted for that option), the RMSE and MAPE of the linear regression are better than the ones of the log linear:

For the linear model they are:

RMSE

1.11

MAPE

1.12%

 

For the log linear model they are the same as Alex wrote:

RMSE

2.41

MAPE

2.37%

 

I’m not sure if we can say, based on these numbers, that the linear model is superior. I think it’s not enough data to determine. I might calculate RMSE and MAPE for all the 23 periods and see if one of the models is still better. If I do, I’ll share the results.

 

Until tomorrow,

Adi.

From: econ_401_w...@googlegroups.com [mailto:econ_401_w...@googlegroups.com] On Behalf Of alex smirnov
Sent: Tuesday, February 08, 2011 9:57 PM
To: econ_401_w...@googlegroups.com
Subject: Re: Beef Part 2

 

Hey everyone,

Gayathri Ravi

unread,
Feb 9, 2011, 1:09:59 AM2/9/11
to econ_401_w...@googlegroups.com
Alex, thank you!

I'll get to the rest tomorrow afternoon. Gn all.

Savita Raina

unread,
Feb 9, 2011, 1:32:19 AM2/9/11
to econ_401_w...@googlegroups.com
thanks Alex and Adi,
 


 
On Tue, Feb 8, 2011 at 10:05 PM, Adi Aloni <alon...@gmail.com> wrote:

Gabriel Bowers

unread,
Feb 9, 2011, 1:55:02 AM2/9/11
to econ_401_w...@googlegroups.com
I am getting the same numbers as Adi when I don't use a dummy 1952 in my linear regression.
 
It's interesting that if I insert a dummy variable for 1952 in my linear data, then the RMSE and MAPE are almost the same for linear and log (~2.4).  In other words, the results for both are equal.
 
Yesterday, Heineke did not take a dummy for the linear regression.  He only mentioned using a dummy when reviewing the standard error the power regression when a dummy had not been used.  In this case 1952 was a clear outlier.  It's does not like a clear outlier in the linear regression.

Gabriel

Gayathri Ravi

unread,
Feb 9, 2011, 1:56:47 AM2/9/11
to econ_401_w...@googlegroups.com
I think, what he said was, we should decide on using the dummy after interpreting the residuals.

Carla Nunes

unread,
Feb 9, 2011, 2:02:02 AM2/9/11
to econ_401_w...@googlegroups.com
Yes, as Gayathri said, both cases are fine.  You can choose to add the dummy after you made the observation on the power model.  He confirmed this w/ me today as well.  So, either way will be good.
I chose to add the dummy as I wanted to compare both using the same variables.
 
See you tomorrow!
 
Carla

Spencer Hsu

unread,
Feb 9, 2011, 2:18:07 AM2/9/11
to econ_401_w...@googlegroups.com
What conclusion can be drawn about these RMSE and MAPE values? That they have a small forecast error?

David Song

unread,
Feb 9, 2011, 4:11:18 AM2/9/11
to econ_401_w...@googlegroups.com
Did anyone use CPI (Consumer Price Index) as a variable?  I didn't see any of professor's solution to Problem 6 includes CPI, but it's a given data.

Savita Raina

unread,
Feb 9, 2011, 4:11:51 AM2/9/11
to econ_401_w...@googlegroups.com
Alex,
 
Even I am including dummy variables in my regression but my RMSE and MAPE numbers are not same as your. Could you confirm whether you have same equation as mine
 
Linear
 
  Qactual Qf  Error error Sq ∑ ABS (Yi - YF)/Yi
1971 95.15459 97.51935509 -2.3647657 5.5921169 0.024852
1972 98.23276 100.5059495 -2.2731923 5.1674031 0.023141
           
Sum       10.75952 0.047993
N-m       2 2
RMSE       2.319431  
MAPE         0.023996
Q* = 61.15 -116.93 * Pbeef +42.95* Pchick + .0263* Y/pop - 6.547* dummy
 
Log
  Qactual Qf  Error error Sq ∑ ABS (Yi - YF)/Yi
1971 95.15459 88.90969 6.244895 38.998718 0.065629
1972 98.23276 98.19254 0.040221 0.0016177 0.000409
           
Sum       39.000336 0.066038
N-m       2 2
RMSE       4.4158994  
MAPE         0.033019
lnQ* = -2.93 -.86*LnPbeef + .19 *LnPChick +.89 *LnY/pop -.155*Dummy
LnQ* 1971 4.487621
LnQ* 1972 4.58693
Q*1971n= exp(C14) 88.90969
 
Thanks

Gayathri Ravi

unread,
Feb 9, 2011, 8:41:44 AM2/9/11
to econ_401_w...@googlegroups.com
David, I don't think you'll need to use CPI if you are using the per capita income variable.

alex smirnov

unread,
Feb 9, 2011, 11:42:42 AM2/9/11
to econ_401_w...@googlegroups.com
Hi Savita,

I do have different numbers.  Not sure why  =(    I confirmed with Carla though, we have the same #s.  

attached is my data though.  Hope that helps.

alex
log.JPG
linear.JPG

Carla Nunes

unread,
Feb 9, 2011, 11:50:43 AM2/9/11
to econ_401_w...@googlegroups.com
Savita,
 
These are my numbers... they match w/ Alex's.  Make sure that for the log-linear case, you first convert the equation to the regular form.  Do not leave on the log form, otherwise, it will be different.  The professor mentioned that on the problem itself.
 
Linear:
 
Date PCBEEF Actual
Y
PCBEEF Forecasted
YF
Y - YF (Y - YF)2 abs(Y - YF)/Y
1971 95.15458937 97.80199668 -2.64740731 7.008765474 0.027822172
1972 98.23275718 100.8074474 -2.57469023 6.629029782 0.026210098
SUM 13.63779526 0.054032270
 
RMSE                  2.41
MAPE 0.023658923
 
 
 
Log-linear:
Date PCBEEF Actual
Y
PCBEEF Forecasted
YF
Y - YF (Y - YF)2 abs(Y - YF)/Y
1971 95.15458937 93.58853911 1.56605 2.45251342 0.016457958
1972 98.23275718 95.2013054 3.031452 9.189699897 0.030859887
SUM 11.64221332 0.047317845
 
RMSE                  2.41
MAPE 0.023658923

Adi Aloni

unread,
Feb 9, 2011, 12:41:02 PM2/9/11
to econ_401_w...@googlegroups.com

What are you guys planning to print out when submitting the hw? Do you think we have to show the whole process again?

alex smirnov

unread,
Feb 9, 2011, 12:43:56 PM2/9/11
to econ_401_w...@googlegroups.com
i'm going to submit 2 histograms, 2 regressions, 2 graphs of actual vs predicted and a few lines of explanations...........i'm not going to show the regressions that didn't work too well

Savita Raina

unread,
Feb 9, 2011, 1:03:35 PM2/9/11
to econ_401_w...@googlegroups.com
Thanks Carla and Alex,
 
I was just using 2 decimals after the period and that made the difference....I am getting same results as your

David Song

unread,
Feb 9, 2011, 4:12:32 PM2/9/11
to econ_401_w...@googlegroups.com
I'm having a bit difficulty using the Log-linear equation.  My intercept and coefficients are all the same as Alex.  But when I plug in the numbers, it doesn't come out correct.  Do I take the Antilog of each number?
Thanks!

David

Adi Aloni

unread,
Feb 9, 2011, 4:14:23 PM2/9/11
to econ_401_w...@googlegroups.com

Calculate the LBEEF using the Ln values of the coefficients (like a linear equation, using Ln values). Then, use the function exp(LBEEF) to calculate the real beef demand.

 

From: econ_401_w...@googlegroups.com [mailto:econ_401_w...@googlegroups.com] On Behalf Of David Song
Sent: Wednesday, February 09, 2011 1:13 PM
To: econ_401_w...@googlegroups.com
Subject: Re: Beef Part 2

 

I'm having a bit difficulty using the Log-linear equation.  My intercept and coefficients are all the same as Alex.  But when I plug in the numbers, it doesn't come out correct.  Do I take the Antilog of each number?

Thanks!

 

David

Savita Raina

unread,
Feb 9, 2011, 4:30:21 PM2/9/11
to econ_401_w...@googlegroups.com
hey David try this
 
eg this is my eqn : lnQ* = -2.93 -.86*LnPbeef + .19 *LnPChick +.90 *LnY/pop -.155*Dummy
put in values of the lnPbeef and all other  ln variable for year 1971 then you will get value of LnQ* (forecast)
Using Exp funtion take exp (LnQ*) that will give you forecasted demand.
I hope this helps, this is like taking anti-log of the number
 
Savita

David Song

unread,
Feb 9, 2011, 4:35:11 PM2/9/11
to econ_401_w...@googlegroups.com
Thanks Adi and Savita, I got it! :-)

David Song

unread,
Feb 9, 2011, 6:07:20 PM2/9/11
to econ_401_w...@googlegroups.com
After all my nasty calculations, I conclude my Linear model is better
than my Log-linear one, does anyone draw same conclusion as me? My
linear RMSE = 1.2 and my Log-linear RMSE = 2.99, the MAPE error
percentage is also smaller for my linear: 1.2 % vs. 2.9 %

Spencer

unread,
Feb 9, 2011, 6:14:29 PM2/9/11
to econ_401_w...@googlegroups.com, econ_401_w...@googlegroups.com
Mine was both in the 2s so one wasn't that much better

Sent from my iPhone

Savita Raina

unread,
Feb 9, 2011, 6:28:11 PM2/9/11
to econ_401_w...@googlegroups.com
David,
 
Did you remove the dummy variable from the equation? i suppose Adi had got similar result if I am not mistaken..since i have dummy varaibles my results are almost same for both.

Kevin

unread,
Feb 9, 2011, 7:07:21 PM2/9/11
to Econ_401_winter_2011
Anyone not use the dummy in log-linear? I came out to

RMSE = 6.088
MAPE = 6.15%

Elliott Le

unread,
Feb 9, 2011, 7:21:58 PM2/9/11
to econ_401_w...@googlegroups.com
Hi Kevin,

I'm not using the dummy variable either.

RMSE = 1.108222 MAPE = 0.011206 (1.12%) for linear
RMSE = 5.651498 MAPE = 0.056842 (5.68%) for log-linear

Elliott Le
--
Elliott Le

jonathan car

unread,
Feb 9, 2011, 7:43:43 PM2/9/11
to econ_401_w...@googlegroups.com
Hi everyone.
 
I have attached my Problem 7 answers hereto.
 
I hope they are more or less correct.
Regards
Jonathan

From: Elliott Le <ellio...@gmail.com>
To: econ_401_w...@googlegroups.com
Sent: Wed, February 9, 2011 4:21:58 PM

Subject: Re: Beef Part 2
Problem 7 Answers - JC.pdf
Reply all
Reply to author
Forward
0 new messages