creating a third variable

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

creating a third variable

E. Bernardo
I have two variables X and Y, where X have no missing values while Y have many missing values.  I want to create a third variable Z whose values are the values of Y and the missing values of Y are replace with the values of X.  The data structure looks like below:
 
X     Y        Z
a     f         f
b              b
c     g       g
d              d
e              e
 
Do you know the syntax for this? 
 
Thank you.
Eins
 
 
 
 


Adding more friends is quick and easy.
Import them over to Yahoo! Mail today!
Reply | Threaded
Open this post in threaded view
|

Re: creating a third variable

E. Bernardo


--- On Tue, 3/17/09, Eins Bernardo <[hidden email]> wrote:

From: Eins Bernardo <[hidden email]>
Subject: creating a third variable
To: [hidden email]
Date: Tuesday, 17 March, 2009, 1:41 PM

I have two variables X and Y, where X have no missing values while Y have many missing values.  I want to create a third variable Z whose values are the values of Y and the missing values of Y are replace with the values of X.  The data structure looks like below:
 
X     Y        Z
a     f         f
b              b
c     g       g
d              d
e              e
 
Do you know the syntax for this? 
 
Thank you.
Eins
 
 
 
 


Adding more friends is quick and easy.
Import them over to Yahoo! Mail today!


Bring your friends to the fun.
Invite your friends from Hotmail, Gmail to Yahoo! Mail today!