Statalist


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

AW: st: AW: RE: Problem importing data


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   AW: st: AW: RE: Problem importing data
Date   Thu, 12 Mar 2009 18:11:50 +0100

<> 
" 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: [email protected]
[mailto:[email protected]] Im Auftrag von Ted Lundgren
Gesendet: Donnerstag, 12. März 2009 17:41
An: [email protected]
Cc: [email protected]
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 [[email protected]]
Sent: 12/3/2009 2:48:37 PM
To: [email protected]
Subject: 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: [email protected] 
[mailto:[email protected]] Im Auftrag von Howard Lempel 
Gesendet: Donnerstag, 12. März 2009 15:30 
An: [email protected] 
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 what 
commands have you typed into Stata so far and exactly what error message did

you get? 

That being said, you may want to take a look at -help encode-, which creates

a 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 and specifies

which 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: [email protected] 
[mailto:[email protected]] On Behalf Of Ted Lundgren 
Sent: Thursday, March 12, 2009 10:13 AM 
To: [email protected] 
Subject: st: Problem importing data 

Hi all, 

I am new to Stata (have been using Eviews earlier), and despite this 
excellent forum I'm still having trouble getting my panel data right. I have

a "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, the 
panel can't be estimated, i.e. I am getting an error message. "Year" is also

being 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/



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