RE: Cases into Variables

Reply
N/A
Posts: 0

RE: Cases into Variables

I am a graduate student and currently I switch hit between using SPSS and SAS. OF course I prefer SAS because it is more flexible but the ability to use both programs can come in handy. Currently I am trying to find a function in SAS that SPSS has called "Cases to variables (casetovars is the syntax)". The case to variables function is exactly what it says, I can define parameters for SPSS to move cases into a new variable. Does anyone know the name of this function in SAS so I can start reading about it and learn how to use it? Or is this something that SPSS can do but SAS cannot? I find that hard to believe but anything is possible. Thank you.



---Jonathan Gallimore
Family and Consumer Studies
University of Utah
SAS Super FREQ
Posts: 8,869

Re: RE: Cases into Variables

Posted in reply to deleted_user
Hi:
I'm not exactly sure what "casestovars" does. If you're talking about recoding or creating value labels, then you probably want PROC FORMAT.

If you're talking about "reshaping" data (for example you have 3 observations or rows each with a measurement and you want to turn the 3 obs into 1 obs with 3 variables -- MEAS1, MEAS2, MEAS3, then you're probably looking at PROC TRANSPOSE to get started. You can also rearrange data and reshape it using a DATA step program usually with ARRAYS.

Here are some (non documentation) places to read about
PROC TRANSPOSE:
http://analytics.ncsu.edu/sesug/2005/TU12_05.PDF
http://www2.sas.com/proceedings/sugi29/267-29.pdf
http://www2.sas.com/proceedings/forum2007/046-2007.pdf
http://www.valsug.org/Meetings/2004/jan/TransposeDShannon.pdf
http://www.nesug.info/Proceedings/nesug07/bb/bb01.pdf
http://www.ats.ucla.edu/stat/sas/modules/ltow_transpose.htm

PROC FORMAT:
http://www2.sas.com/proceedings/sugi31/084-31.pdf
http://www.lexjansen.com/pharmasug/2006/tutorials/tu02.pdf
http://www2.sas.com/proceedings/sugi25/25/aa/25p002.pdf
http://www.sas.cc.vt.edu/faqlib/formats.html

cynthia
Ask a Question
Discussion stats
  • 1 reply
  • 178 views
  • 0 likes
  • 2 in conversation