Page 1 of 1
Reading DATA!!!
Posted: Thu Jan 29, 2015 1:16 pm
by celineboulenger13
Hi, I am new at RATS (I have version 8 ) and I have been having problems loading my panel data from excel. I have the set up the booklet recommends (having the data set up per individual) and I have tried having the names of the series on the first row and then not having the names but every time I get the same error, here is the code I am using:
OPEN DATA "C:\Documents\paneldataforstata.xlsx"
CALENDAR(PANELOBS=23,A) 1990:1
DATA(FORMAT=XLSX,ORG=COLUMNS) 1//1990:01 552//2012:01 individual year gdp cap labor re
and here is the error I am getting:
## IO30. There is no series INDIVIDUAL on the file
## IO30. There is no series YEAR on the file
## IO30. There is no series GDP on the file
## IO30. There is no series CAP on the file
## IO30. There is no series LABOR on the file
## IO30. There is no series RE on the file
My data looks like :
Code: Select all
country year gdp capital labor re
1 1990 4.27251E+11 97675046357 8502257 14.756
1 1991 4.25431E+11 88491579483 8548010 16.433
1 1992 4.2715E+11 84954717509 8623259 15.8744
1 1993 4.44303E+11 90624439154 8675174 17.164
1 1994 4.62274E+11 95802590018 8832057 16.879
1 1995 4.80215E+11 1.06241E+11 9049690 16.469
1 1996 4.99171E+11 1.09159E+11 9154738 16.575
1 1997 5.18856E+11 1.16407E+11 9230553 17.733
1 1998 5.41845E+11 1.27666E+11 9331221 16.702
1 1999 5.68961E+11 1.33482E+11 9428920 17.701
1 2000 5.90991E+11 1.44166E+11 9624371 17.422
1 2001 6.02389E+11 1.32714E+11 9793326 18.001
1 2002 6.2566E+11 1.44637E+11 9937598 17.712
1 2003 6.44926E+11 1.62769E+11 10101919 18.509
1 2004 6.71733E+11 1.7665E+11 10229628 18.52
1 2005 6.93339E+11 1.87794E+11 10555735 19.95
1 2006 7.14074E+11 2.05223E+11 10806943 21.481
1 2007 7.40924E+11 2.15657E+11 10986204 21.066
1 2008 7.68355E+11 2.3615E+11 11285373 19.61
1 2009 7.81662E+11 2.41189E+11 11522495 19.62
1 2010 7.97001E+11 2.46267E+11 11715010 22.351
1 2011 8.15503E+11 2.55332E+11 11882313 26.773
1 2012 8.45904E+11 2.83966E+11 12027327 25.14892
2 1990 2.23054E+11 50950902671 3524707 32.359
2 1991 2.30731E+11 55189848688 3576695 32.367
2 1992 2.35561E+11 55265428595 3668918 35.856
2 1993 2.36802E+11 54589018456 3705767 37.74
2 1994 2.4249E+11 57398066802 3825983 36.596
2 1995 2.4896E+11 57508229022 3849977 38.605
etc...
For 24 countries total!
Could someone please help me out? I am getting very frustrated. It says in the booklet that RATS easily reads panel data so I must be missing something here.
Thanks in advance!
Re: Reading DATA!!!
Posted: Thu Jan 29, 2015 9:23 pm
by TomDoan
celineboulenger13 wrote:Hi, I am new at RATS (I have version 8 ) and I have been having problems loading my panel data from excel. I have the set up the booklet recommends (having the data set up per individual) and I have tried having the names of the series on the first row and then not having the names but every time I get the same error, here is the code I am using:
OPEN DATA "C:\Documents\paneldataforstata.xlsx"
CALENDAR(PANELOBS=23,A) 1990:1
DATA(FORMAT=XLSX,ORG=COLUMNS) 1//1990:01 552//2012:01 individual year gdp cap labor re
and here is the error I am getting:
## IO30. There is no series INDIVIDUAL on the file
## IO30. There is no series YEAR on the file
## IO30. There is no series GDP on the file
## IO30. There is no series CAP on the file
## IO30. There is no series LABOR on the file
## IO30. There is no series RE on the file
My data looks like :
Code: Select all
country year gdp capital labor re
1 1990 4.27251E+11 97675046357 8502257 14.756
1 1991 4.25431E+11 88491579483 8548010 16.433
1 1992 4.2715E+11 84954717509 8623259 15.8744
1 1993 4.44303E+11 90624439154 8675174 17.164
1 1994 4.62274E+11 95802590018 8832057 16.879
1 1995 4.80215E+11 1.06241E+11 9049690 16.469
1 1996 4.99171E+11 1.09159E+11 9154738 16.575
1 1997 5.18856E+11 1.16407E+11 9230553 17.733
1 1998 5.41845E+11 1.27666E+11 9331221 16.702
1 1999 5.68961E+11 1.33482E+11 9428920 17.701
1 2000 5.90991E+11 1.44166E+11 9624371 17.422
1 2001 6.02389E+11 1.32714E+11 9793326 18.001
1 2002 6.2566E+11 1.44637E+11 9937598 17.712
1 2003 6.44926E+11 1.62769E+11 10101919 18.509
1 2004 6.71733E+11 1.7665E+11 10229628 18.52
1 2005 6.93339E+11 1.87794E+11 10555735 19.95
1 2006 7.14074E+11 2.05223E+11 10806943 21.481
1 2007 7.40924E+11 2.15657E+11 10986204 21.066
1 2008 7.68355E+11 2.3615E+11 11285373 19.61
1 2009 7.81662E+11 2.41189E+11 11522495 19.62
1 2010 7.97001E+11 2.46267E+11 11715010 22.351
1 2011 8.15503E+11 2.55332E+11 11882313 26.773
1 2012 8.45904E+11 2.83966E+11 12027327 25.14892
2 1990 2.23054E+11 50950902671 3524707 32.359
2 1991 2.30731E+11 55189848688 3576695 32.367
2 1992 2.35561E+11 55265428595 3668918 35.856
2 1993 2.36802E+11 54589018456 3705767 37.74
2 1994 2.4249E+11 57398066802 3825983 36.596
2 1995 2.4896E+11 57508229022 3849977 38.605
etc...
For 24 countries total!
Could someone please help me out? I am getting very frustrated. It says in the booklet that RATS easily reads panel data so I must be missing something here.
Thanks in advance!
Did you try using the Data Wizard? Obviously, one problem is that the series appears to be called "Country" on the file, not "Individual". If you can't read it using the Wizard, you would have to attach the actual data file.
Re: Reading DATA!!!
Posted: Thu Jan 29, 2015 10:04 pm
by celineboulenger13
Sorry I did change the series to be named individual and not country.
How do I use the data Wizard? Is that the "ratsdata" program? I did try using it but did not understand it. Sorry this is such an elementary question but I am very confused with RATS and how it works.
Thanks a lot for your help!
Re: Reading DATA!!!
Posted: Thu Jan 29, 2015 10:21 pm
by TomDoan
The Data Wizard is described beginning on page Int-18 of the Introduction. It's in RATS (not RATSDATA) on the Data/Graphics menu (Data (Other Formats) operation).
Re: Reading DATA!!!
Posted: Thu Jan 29, 2015 10:25 pm
by celineboulenger13
Yes I was using that but when I try to open the file that way nothing happens. And the series are not on the series log. Could you tell me the steps I am supposed to follow when I use the data wizard?
Thanks!!
Re: Reading DATA!!!
Posted: Thu Jan 29, 2015 11:20 pm
by celineboulenger13
So i tried using the Wizard again and this time it worked!
However I am working on doing panel FMOLS but I get error messages when I try to include a constant and when I use the series in logs instead of levels.
@panelfm(det=constant, average=simple, print=full)
# lgdp lcap llabor lre
## OP3. This Instruction Does Not Have An Option CON
## OP3. This Instruction Does Not Have An Option DET
## SR10. Missing Values And/Or SMPL Options Leave No Usable Data Points
The Error Occurred At Location 1801, Line 158 of PANELFM
Those are the error messages I get, they all go away if I use no constant and don't use the logs. However I should be able to do this with a constant and logs right?
Could you help with that?
Thanks a lot!
Re: Reading DATA!!!
Posted: Fri Jan 30, 2015 5:19 am
by TomDoan
You'll have to post the whole program. Copy and paste it straight out of RATS.
Re: Reading DATA!!!
Posted: Fri Jan 30, 2015 9:59 pm
by celineboulenger13
OPEN DATA "C:\Users\Celine Boulenger\Documents\WinRATS 8\paneldataforstata.xlsx"
CALENDAR(PANELOBS=23,A) 1980:1
DATA(FORMAT=XLSX,NOLABELS,ORG=COLUMNS,TOP=2) 1//1980:01 24//2002:01 INDIVIDUAL YEAR GDP CAP LABOR RE
set lgdp = log(gdp)
set lcap = log(cap)
set llabor = log(labor)
set lre = log(re)
@panelfm(lags=3)
# lgdp lcap llabor lre
## SR10. Missing Values And/Or SMPL Options Leave No Usable Data Points
The Error Occurred At Location 1801, Line 158 of PANELFM
@panelfm(constant)
## OP3. This Instruction Does Not Have An Option CON
Re: Reading DATA!!!
Posted: Sat Jan 31, 2015 6:32 am
by TomDoan
In the final one, DET=CONSTANT is the option, not CONSTANT. (And DET=CONSTANT is the default, so you don't need it anyway).
With the log data, have you checked your data to make sure you have (positive) data all the way through? (TABLE instruction?)
Re: Reading DATA!!!
Posted: Sat Jan 31, 2015 10:28 am
by celineboulenger13
I understand for the constant but when I get results there is no constant coefficient. Do you know how to retrieve it?
For the logs, yes all of my numbers are positive and when I look at the log series they look totally fine; I really don't understand why it is not working.
Thanks,
Re: Reading DATA!!!
Posted: Sat Jan 31, 2015 10:52 am
by celineboulenger13
It seems that @panelfm is only working for me when I use 3 variables in log and one in levels. But obviously that doesn't make sense to do. Do you have any idea what is going on?
Thanks,
Re: Reading DATA!!!
Posted: Sat Jan 31, 2015 12:11 pm
by celineboulenger13
Am I allowed to use @fm instead of @panelfm if I am trying to do Panel FMOLS?
When I use @fm I get rid of those "errors" I had with @panelfm. It lets me use the variables in natural logs. Please help me out! here is my result with @fm
@fm(lags=5)
# lgdp lcap llabor lre
Linear Regression - Estimation by Fully Modified LS
Dependent Variable LGDP
Panel(23) of Annual Data From 1//1981:01 To 88//1989:01
Usable Observations 551
Degrees of Freedom 547
Skipped/Missing (from 2010) 1459
Mean of Dependent Variable 26.857688906
Std Error of Dependent Variable 1.500298527
Standard Error of Estimate 0.188009839
Sum of Squared Residuals 19.335191729
Durbin-Watson Statistic 0.1915
Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. Constant 3.2372185119 0.4985490730 6.49328 0.00000000
2. LCAP 0.9145869765 0.0446334757 20.49105 0.00000000
3. LLABOR 0.0274955653 0.0433791912 0.63384 0.52618376
4. LRE 0.0314858413 0.0104497359 3.01308 0.00258615
Re: Reading DATA!!!
Posted: Sat Jan 31, 2015 8:43 pm
by TomDoan
Is it possible that your data are constructed in a way that there is a linear combination of the four variables in logs with the individual-specific intercept is zero? That would produce the behavior that you describe. You can do @FM, but that assumes homogeneity in both the intercept and the cointegrating vector across individuals.
The deterministics are considered nuisance parameters in this model, so they aren't shown.