LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (January 2003)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 28 Jan 2003 13:30:04 +0100
Reply-To:     pventura@asnefequifax.es
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Pere-Joan Ventura <pventura@asnefequifax.es>
Subject:      AW: convert STATA dofile into SPSS syntax
Content-type: text/plain; charset=iso-8859-1

Hello Silke,

Try with the following syntax.

compute emath3=emath1. do if (sysmiss(emath1)). compute emath3=emath2. else if (~sysmiss(emath1) & ~sysmiss(emath2)). compute emath3=((emath1+emath2)/2). else. compute emath3=emath1. end if. variable label emath3 "Overall grade received from entrance mathematics test (relevant score)". exec.

The equivalences with missing commands are:

Stata SPSS ----- ----- ==. sysmiss(var) or missing(var) (if you have defined a misiing value) ~=. or !=. ~sysmiss(var) or ~missing(var)

Also the Stata statements of generate (first) and replace (after generate) can be supplied with the DO IF () / END IF syntax.

Regards.

''~`` ( o o ) +------------------.oooO--(_)--Oooo.-------------+ | | | Pere-Joan Ventura (pventura@asnefequifax.es) | | EQUIFAX IBERICA | | Tel. 93 493 03 00 (ext. 399) | | Fax 93 493 03 50 | | .oooO | | ( ) Oooo. | +---------------------) (----( )---------------+ (_) ) / (_/

----- Remitido por Pere Joan Ventura Herrero/ASNEF_EQUIFAX con fecha 28/01/2003 13:27 -----

Gese S <silke.gese@ebs. Para: SPSSX-L@LISTSERV.UGA.EDU de> cc: Enviado por: Asunto: AW: convert STATA dofile into SPSS syntax "SPSSX(r) Discussion" <SPSSX-L@LISTSER V.UGA.EDU>

28/01/2003 13:09 Por favor, responda a Gese S

Thanks a lot for your answer! I have got another question. How can I convert the following STATA command into SPSS:

gen emath3=emath1 replace emath3=emath2 if emath1==. replace emath3=((emath1+emath2)/2) if emath1~=. & emath2~=. label variable emath3 "Overall grade received from entrance mathematics test (relevant score)"

My main problem is, that I do not understand the commands for missing data and non-missing data in both programs.

Thanks a lot! Silke

-----Ursprungliche Nachricht----- Von: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU]Im Auftrag von John Hendrickx Gesendet: Dienstag, 28. Januar 2003 11:11 An: SPSSX-L@LISTSERV.UGA.EDU Betreff: Re: convert STATA dofile into SPSS syntax

--- Gese S <silke.gese@ebs.de> wrote: > Hello List! > > Does anyone know how to convert the following STATA syntax into > SPSS? > > * generate the AGE variable * > * > gen AGE=98-yob if mob<10 & mob~=. > replace AGE=98-yob-1 if mob>9 & mob~=. > label variable AGE "age of student (in number of years)" > * if (mob<10) age=98-yob. if (mob>9) age=98-yob-1. variable label age "age of student (in number of years)".

The Stata syntax " & mob~=." adds the condition that mob is not missing but that's not necessary in SPSS.

Hope this helps, John Hendrickx

> > Thanks in advance! > Silke

__________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com

********** EQUIFAX IBERICA ********** Albasanz, 16 - 28037 MADRID Tlfno:917687600; Fax:917687700 At. Cliente: 902126000 http://www.equifax.es *************************************

________________________________________________________________________ Este mensaje se dirige exclusivamente a su destinatario y puede contener información privilegiada o confidencial. Si no es vd. el destinatario indicado, queda notificado de que la utilización, divulgación y/o copia sin autorización está prohibida en virtud de la legislación vigente.Si ha recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente por esta misma vía y proceda a su destrucción. ________________________________________________________________________ This message is intended exclusively for its addresses and may contain information that is CONFIDENTIAL & protected by professional privileges If you are not the intended recipient you are hereby notified that any dissemination, copy or disclosure of this communication is strictly prohibited by law. If this message has been received in error, please immediately notify us via e-mail and delete it. ________________________________________________________________________


Back to: Top of message | Previous page | Main SPSSX-L page