[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
Jeph Herrin <junk@spandrel.net> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: AW: st: AW: RE: Problem importing data |

Date |
Thu, 12 Mar 2009 15:15:33 -0400 |

From -help xtset- r(balanced) unbalanced, weakly balanced, or strongly balanced; a set of panels are strongly balanced if they all have the same time values, otherwise balanced if same number of time values, otherwise unbalanced. Whether you should be concerned depends on what you expected. hth, Jeph Ted Lundgren wrote:

Okay, here it goes: "panel variable: countrynum (strongly balanced) time variable: year, 1992 to 2005 delta: 1 unit"In other words, I first used 'Encode country, gen(countrynum)'. Then Igot the above. What does it mean that 'Country' is now stronglybalanced? Should I be concerned about this?<-----Ursprungligt Meddelande-----> *From: Martin Weiss [martin.weiss1@gmx.de]* Sent: 12/3/2009 5:13:50 PM To: statalist@hsphsun2.harvard.eduSubject: AW: st: AW: RE: Problem importing data<> " I get a message that the ID variable is heavily weighted, or something like that." You have to be more specific here. Just paste the error in its entirety, otherwise it is hard to debug... HTH Martin Von: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Ted Lundgren Gesendet: Donnerstag, 12. März 2009 17:41 An: statalist@hsphsun2.harvard.edu Cc: statalist@hsphsun2.harvard.edu Betreff: Re: st: AW: RE: Problem importing data Thank you very much for your help so far! Yes, Country is a string variable with the names of different countries. I was able to carry out the regression by using 'Encode country, gen(countrynum)' in the end, but now I was wondering: Have I done this correctly? 'Cause when I do this, I get a message that the ID variable is heavily weighted, or something like that. Another question when I'm at it...In order to lag a variable two periods (for example), I just use the command 'L2.[variable]', right? Or should I use a minus sign in some way? (For example, in Eviews you simply write: 'variable(-2)', and that's it. <-----Ursprungligt Meddelande----->From: Martin Weiss [martin.weiss1@gmx.de]Sent: 12/3/2009 2:48:37 PM To: statalist@hsphsun2.harvard.eduSubject: st: AW: RE: Problem importing data<> BTW, there is nothing wrong with year being treated as "int". See -help data types-: The years conventionally found in today´s datasets are well within the range of the maximum and minimum for "int"... HTH Martin -----Ursprüngliche Nachricht----- Von: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Howard Lempel Gesendet: Donnerstag, 12. März 2009 15:30 An: statalist@hsphsun2.harvard.edu Betreff: st: RE: Problem importing data Hi there, You'll get a better answer if you give a bit more detail. Two things that would be particularly helpful: 1) What exactly does your data look like? Is "country" a string variable with the names of different countries? Or does it consist of numbers that are codes for countries? 2) Exactly whatcommands have you typed into Stata so far and exactly what error messagedidyou get?That being said, you may want to take a look at -help encode-, whichcreatesa new variable giving assigning a unique number to each value of a string variable. If your country variable already consists of numbers, -help destring- will convert it to a numeric variable. Some non-numeric characters may have found their way into your country variable, in which case, you'll need to eliminate those before -destring-ing. Once you convert country to a numeric variable, you should be able to-xtset- your data, which tells Stata that your data is a panel andspecifieswhich variables contain your cross-sectional and time units. Lastly, you might want to try importing your data using the Stata command -xmluse- or saving your data as a CSV and using -insheet-. Hope this helps. Howie________________________________________From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Ted Lundgren Sent: Thursday, March 12, 2009 10:13 AM To: statalist@hsphsun2.harvard.edu Subject: st: Problem importing data Hi all, I am new to Stata (have been using Eviews earlier), and despite thisexcellent forum I'm still having trouble getting my panel data right. Ihavea "normal" panel so to speak, with "Country" in the first column, "Year" in the second, and then the variables. When I try to get the data into Stata from Excel by either Stattransfer or Copy/Paste, "Country" is all the time being treated as a string variable, no matter what I do. Therefore, thepanel can't be estimated, i.e. I am getting an error message. "Year" isalsobeing treated as 'Int'. What am I doing wrong? * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/ * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/ .. _______________________________________________________________ Eniro Supersök - är vad det heter * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/ . _______________________________________________________________Eniro Supersök - är vad det heter<http://www.eniro.se/?partnerid=spray_mail>

* * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**References**:**Re: AW: st: AW: RE: Problem importing data***From:*"Ted Lundgren" <odovakar@spray.se>

- Prev by Date:
**Re: AW: st: AW: RE: Problem importing data** - Next by Date:
**Re: AW: st: AW: RE: Problem importing data** - Previous by thread:
**Re: AW: st: AW: RE: Problem importing data** - Next by thread:
**Re: AW: st: AW: RE: Problem importing data** - Index(es):

© Copyright 1996–2015 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |