Page 1 of 2

Insufficient number of observations

Posted: Sun Apr 03, 2016 2:56 am
by gishena
When I tried a certain regression with 1 dependable variable and about 10 independable variables I get the error "insuffiicent number of observations. I have about 350000 observations so I really do not get the error. Furthermore, I wanted to have panel data as I have multiple values over many time periods and it did not work??? Please help me as it is about my master thesis...

Kind regards.
gishena

Re: Insufficient number of observations

Posted: Sun Apr 03, 2016 4:54 am
by gishena
Edit: I got what the problem was with the insufficent number of observations but I still can not get the excel file I have imported into EViews as panel data.

This is the thing I have: http://postimg.org/image/b3ykzfs4b/

How do I import it as structured panel data as I have multiple values over multiple time periods?

Re: Insufficient number of observations

Posted: Sun Apr 03, 2016 7:07 am
by EViews Gareth
You need to define your cross-section identifier.

Re: Insufficient number of observations

Posted: Tue Apr 05, 2016 1:35 am
by gishena
I did. It gives me an error as some values are N/A

Re: Insufficient number of observations

Posted: Tue Apr 05, 2016 2:09 am
by gishena
I`ll upload the excel file I`m using. I am getting some no sense errors which I should not be getting. At the cross section ID series I type Company name and I get the error: Company is not defined. I want to import it as a structured panel so give me a hand please.

I give a link to the excel file, it is over 150 mb big.

https://drive.google.com/open?id=0B7m3_ ... lhaMC1kd2M

Re: Insufficient number of observations

Posted: Tue Apr 05, 2016 8:11 am
by EViews Gareth
Assuming you are talking about the "stock returns" sheet, couple of observations...

If I open that Excel file just by dragging it on to EViews and hitting "Finish", EViews automatically detects it as a panel.

I don't know what you're doing, but there is no column titled "Company", which is probably why you're getting an error in EViews.

Re: Insufficient number of observations

Posted: Tue Apr 05, 2016 11:18 pm
by gishena
I am talking about the sheet called "WRDS". When importing the file, I chose this sheet. Is it possible to import it as a structured panel?

Furthermore, I have one more question and don`t want to open another thread. Can you tell me the command to winsorize all variables at the 1st and 99th percentile to reduce the effect of outliers and miscoded firm-year observations? I downloaded the trim add in and supposedly installed it but after I estimate an equation and go under proc add-ins there turns out to be no add-ins for this object.

Manually I generated those series:

series lvg_q = @recode(lvg>@quantile(lvg,.99),@quantile(lvg,.99),@recode(lvg<@quantile(lvg,.01),@quantile(lvg,.01),lvg))
but I got syntax error

Re: Insufficient number of observations

Posted: Wed Apr 06, 2016 7:32 am
by EViews Gareth
That sheet doesn't contain panel data. More precisely, the date and company name columns do not uniquely identify the observations. For example rows 154760 and 154761.

The syntax for your winsorizing is correct (and worked for me).

Re: Insufficient number of observations

Posted: Thu Apr 07, 2016 5:06 am
by gishena
But I was trying to use the column "Correct CUSIP and Year" as ID series which is unique.

And sorry for the silly questions, but will my regressions give different results just because I used it as an unstructured panel when compared to a panel?

Re: Insufficient number of observations

Posted: Thu Apr 07, 2016 7:39 am
by EViews Gareth
But I was trying to use the column "Correct CUSIP and Year" as ID series which is unique.
Previously you said you were using company name.....

Either way, they're not unique. Look at the example I gave you.

And sorry for the silly questions, but will my regressions give different results just because I used it as an unstructured panel when compared to a panel?
Depends on the regression.

Re: Insufficient number of observations

Posted: Fri Apr 08, 2016 12:45 am
by gishena
I finally managed to get the add-in working. If I want to winsorise and the 99th and 1th percentile at the add-in I have to use the values 0,1 and 0,99 right?

And can somebody help me to edit the excel file so that I can import it as a structured panel??

Re: Insufficient number of observations

Posted: Sat Nov 26, 2016 9:22 am
by acemi
Hello, I'm trying to estimate following equation by L-S estimation method in eviews 7. I get, "insufficient number of obs" error. I checked that there isnt any missing data or variables. Previously I got "log of negative number" error but I fixed it by using EviewsGareth's solution on a related post saying "Check your setting under Options->Auto-Series in Stats. It should be at "Treat evaluation errors as NAs"."

Can anyone give me a clue about what am I missing ? (My file is attached below, I want to estimate coefficients 1 to 5.)
Thank you in advance.

log(y) = (1/((1-c(2))*(1-c(3))-c(1)))*((1-exp(-c(1)*@trend))*c(2)*(1-c(3))*log(s)+(1-exp(-c(1)*@trend))*c(1)*log(l)+(1-exp(-c(1)*@trend))*c(4)*log(fi)+(1-exp(-c(1)*@trend))*log(c(5)+(1-c(2))*c(1)*n)+(1-exp(-c(1)*@trend))*c(2)*(1-c(3))*log((n+delta)+(c(1)*n))+(1-exp(-c(1)*@trend))*log(y(-1)))

Re: Insufficient number of observations

Posted: Sat Nov 26, 2016 9:56 am
by EViews Gareth
You'll have to use starting values that do not make the log terms negative.

Re: Insufficient number of observations

Posted: Sat Nov 26, 2016 10:03 am
by acemi
Hello Eviews Gareth,

Thank you for your prompt reply and excuse my incomprehension. Can you give me an concrete example in what you refer to in your reply for example from my data ?
Thank you very much.

Re: Insufficient number of observations

Posted: Sat Nov 26, 2016 11:00 am
by EViews Gareth

Code: Select all

log(c(5)+(1-c(2))*c(1)*n)
That has to be possible