Hello all,
I have a question I am trying to run a linear probability model with the following command
To do that I create a panel by
xtreg id year
But the error comes that I can not do so to a string variable. So I convert it with the following command
Encode id , generate(id1)
Now when I set the panel I get the error that “ repeated time values within the panel”
And when I run the regression I get the error “insufficient observations”
The ID is unqiue for each observation.
My data on dataex command is as follows:
input long id1 float(year mig_dummy age_cat SPEIx)
1 1988 0 20 -.222614
1 1989 0 20 -.272857
1 1990 0 20 1.33297
1 1991 0 20 .469962
1 1992 0 20 1.3215
1 1993 0 20 -.194207
1 1994 0 20 1.63262
1 1995 0 20 1.16407
1 1996 0 20 .389528
1 1997 0 20 1.39639
1 1998 0 20 .910947
1 1999 0 20 -.860725
1 2000 0 20 -.617814
1 2001 0 20 .0590388
1 2002 0 20 -1.03181
1 2003 0 20 1.3444
1 2004 0 20 .698185
1 2005 0 20 .816702
1 2006 0 20 .916122
1 2007 0 20 .859999
1 2008 0 20 1.46291
1 2009 0 20 -.0181454
1 2010 1 20 .610469
2 1990 0 20 1.33297
Related Posts with Insufficient observations when running panel data
How to create a variable that indicates when we have the first non-zero value of another variable - panel dataDear all, I am working with a matched employer-employee dataset from Brazil in which each observati…
Non-numeric String variableHi All, I am new to Stata and getting hands on it by using the data. I have cross sectional data fo…
QUAIDS EstimationHi everyone, Does anyone know a command or ado for QUAIDS estimation that is faster than the in-bui…
Gradient colored scatterplotHello everyone, I am trying to make a scatter plot using the plottig scheme (or any scheme for that…
Survey Data QuestionI'm trying to analyze data from a national survey. I need to stratify it by weight, stratum and psu.…
Subscribe to:
Post Comments (Atom)
0 Response to Insufficient observations when running panel data
Post a Comment