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
Inverse Probability Weighing for Multiple TreatmentsHi all, I am trying to compute inverse probability weight for multiple treatments. But I am struggl…
What is the c.operator in reg and set emptycells ?Today when I run this regression Code: did2s l_homicide [aweight=popwt], first_stage(i.sid i.year)…
Re: Converting a string variable to a date variableHello, My date variable (moyr) could not be used when I declared my dataset to be monthly panel dat…
Specific Help in Merging my Two DatasetsHello Generous people on this Forum, I am trying to merge these two databases found herehttps://dri…
How to generate a single time variable for survey respondents in different time zones?Greetings, I'm running Stata 15 on a Mac OS. I recently conducted a survey across a period of a cou…
Subscribe to:
Post Comments (Atom)
0 Response to Insufficient observations when running panel data
Post a Comment