Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

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

From |
"Martin Weiss" <martin.weiss1@gmx.de> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
st: RE: RE: Creating an X,Y variable from X and Y columns |

Date |
Tue, 24 Aug 2010 22:36:06 +0200 |

<> What is not possible, btw, is the variable name "X,Y"... HTH Martin -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Martin Weiss Sent: Dienstag, 24. August 2010 22:33 To: statalist@hsphsun2.harvard.edu Subject: st: RE: Creating an X,Y variable from X and Y columns <> It is certainly possible via concatenation of strings, but what is this variable good for? *********** clear* inp byte(X Y) 1 0 0 0 1 1 1 1 1 1 end gen str5 mynewvar=string(X)+","+string(Y) list, noo *********** HTH Martin -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Martin Pszczola Sent: Dienstag, 24. August 2010 22:28 To: statalist@hsphsun2.harvard.edu Subject: st: Creating an X,Y variable from X and Y columns Hi; I am wondering if it is possible to take two columns of values (X and Y) and combine them into one, new variable that is X, Y? For example, say I have 5 variables for X and Y each. X=1 0 1 1 1 Y=0 0 1 1 1 and I want to create a new variable X,Y= 1,0 0,0 1,1 1,1 1,1. Any help would be appreciated. Thank you. Martin * * 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/ * * 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/

**References**:**st: Creating an X,Y variable from X and Y columns***From:*Martin Pszczola <martinpsz@gmail.com>

**st: RE: Creating an X,Y variable from X and Y columns***From:*"Martin Weiss" <martin.weiss1@gmx.de>

- Prev by Date:
**st: RE: repeated time values problem -svar** - Next by Date:
**st: non linear equation difficulties with nl function evaluation program** - Previous by thread:
**st: RE: Creating an X,Y variable from X and Y columns** - Next by thread:
**st: non linear equation difficulties with nl function evaluation program** - Index(es):