Statalist


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

RE: st: Getting data from NBER to STATA


From   "Kieran McCaul" <[email protected]>
To   <[email protected]>
Subject   RE: st: Getting data from NBER to STATA
Date   Fri, 22 May 2009 13:12:07 +0800

What folder is the data file in?
By default, Stata will be looking in C:\data (I think), so you need to
change to the folder that the data is in.

Try -help cd-.




______________________________________________
Kieran McCaul MPH PhD
WA Centre for Health & Ageing (M573)
University of Western Australia
Level 6, Ainslie House
48 Murray St
Perth 6000
Phone: (08) 9224-2701
Fax: (08) 9224 8009
email: [email protected]
http://myprofile.cos.com/mccaul 
http://www.researcherid.com/rid/B-8751-2008
______________________________________________
Epidemiology is so beautiful and provides such an important perspective
on human life and death, 
but an incredible amount of rubbish is published.  Richard Peto (2007) 


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Kirimi Sindi
Sent: Friday, 22 May 2009 11:30 AM
To: [email protected]
Subject: Re: st: Getting data from NBER to STATA

I am trying to figure out what is wrong with this infile syntax.

. set mem 1000m
(1024000k)
.
. local dat_name "cpsmar08.dat"
.
.
.
. local dta_name "./cpsmar08.dta"

.
.
. local dct_name "./cpsmar08.dct"

.
. quietly infile using "`dct_name'", using("`dat_name'") clear
file cpsmar08.dat not found
r(601);

end of do-file
r(601);

Thank you,

Kirimi

Austin Nichols wrote:
> Forgot to say --
> then drop the extra observations (last line below)!
>
> ... note the extra step for CPS files after infiling is to -replace-
> household and family record variables with something like:
>
> unab x: hrecord-frecord
> loc x: subinstr local x "frecord" "", all
> loc x: subinstr local x "hrecord" "", all
> qui foreach v of local x {
>  replace `v'=`v'[_n-1] if hrecord>1
> }
> unab x: frecord-precord
> loc x: subinstr local x "precord" "", all
> loc x: subinstr local x "frecord" "", all
> qui foreach v of local x {
>  replace `v'=`v'[_n-1] if hrecord==3
> }
> keep if hrecord==3
> *
> *   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/
>
>
>   

-- 
*******************************
Imagination is more important than knowledge. 
For while knowledge defines all we currently know and understand, 
imagination points to all we might yet discover and create.
*******************************

Kirimi Sindi
PhD Candidate
Department of Agricultural,
Food, and Resource Economics
Room 20 Cook Hall
Michigan State University
East Lansing,  MI  48824
Telephone: +1-517-353-5320
Home Tel : +1-517-355-8151	
Fax: +1-517-432-1800

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



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