From | "b. water" <[email protected]> |
To | [email protected] |
Subject | RE: RE: st: SAS Stata equivalent command |
Date | Thu, 08 Dec 2005 20:34:13 +0000 |
From: Dan Blanchette <[email protected]>_________________________________________________________________
Reply-To: [email protected]
To: [email protected]
Subject: RE: RE: st: SAS Stata equivalent command
Date: Thu, 8 Dec 2005 13:00:54 -0500 (EST)
Please check out "A SAS User's Guide to Stata" www.cpc.unc.edu/services/computer/presentations/sas_to_stata
where you can find some SAS code matched to the equivalent Stata code.
In your circumstance, you have fallen into some obscure SAS coding.
The code: *************************************************************************
if _n_ eq 1 then do;
est = 0; output; est = 0; output; est = 0; output;
end;
*************************************************************************
creates a variable called "est" and sets it to 0 and then creates 3 observations
in the dataset. Why this is important is beyond me, but perhaps it is.
Next the code brings in an existing data set "bi_meta" and concatenates that
onto these 3 observations. Then it sets the variable "est" to be the same value
as the variable "var_logit." And finally it only keeps this new variable "est."
So the eqivalent Stata code would be:
*************************************************************************
clear
set obs 3
gen est = 0
append using "bi_meta.dta"
replace est = var_logit
keep est
*************************************************************************
I hope this helps,
Dan Blanchette
ITS Research Computing Group
University of North Carolina Chapel Hill
[email protected]
© Copyright 1996–2024 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |