bw,
Empty quotes only signify missing if a variable is a string. Your variables are both numeric (float and byte). Missing values for numeric variables are usually stored as a period, but there are multiple missing values, I believe .a .b .c, etc. See -help missing-.
Specifically, you probably want:
-edit if !missing(plannedsx) & missing(modalit)-
-edit if- works for me in Stata 10. Not sure about Stat 8.
Hope this helps.
Howie
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of b. water
Sent: Wednesday, January 28, 2009 1:53 PM
To: [email protected]
Subject: st: "if and &" expression in edit
Dear all,
Stata 8.2,
I wanted to do this:
edit if plannedsx!="" & modalit==""
i.e. i wanted to edit those where plannedsx are not missing but where modality are missing
and received this message:
type mismatch
r(109);
The variables descriptions are:
storage display value
variable name type format label variable label
-------------------------------------------------------------------------------
plannedsx float %9.0g planndsx
modalit byte %1.0f electrosx
Questions are:
1. How I can achieve what I wanted to do?
2. I would appreciate confirmation of this situation: I tried another edit with if and & using another conditions and variables, these few attempts returned the same type mismatch error r(109) - so I presumed edit with if and & is not a legal syntax.
Thank you for advice & help,
bw
_________________________________________________________________
Windows Live(tm) Hotmail(r)...more than just e-mail.
http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t2_hm_justgotbetter_howitworks_012009
*
* 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/