Statalist


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

Re: st: "if and &" expression in edit


From   Jeph Herrin <[email protected]>
To   [email protected]
Subject   Re: st: "if and &" expression in edit
Date   Wed, 28 Jan 2009 14:07:37 -0500


Try

 edit if plannedsx!=. & modalit==.

or better

 edit if !mi(plannedsx) & mi(modalit)


hth,
Jeph


b. water wrote:
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™ Hotmail®…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/



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