+ Reply to Thread
Results 1 to 2 of 2

Thread: slicing and dicing a large dataset

  1. #1
    Points: 3,761, Level: 38
    Level completed: 74%, Points required for next Level: 39

    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    slicing and dicing a large dataset



    I'm new to SAS (and programming in general) so I was hoping someone could help me out.

    I have a ridiculously large data set I am analyzing, and I wanted to pare it down a bit... so I know what I need to do, just not how.

    First, there is a subject ID variable. It is in one of the following formats:

    12345678
    12345678.123
    12345678.123.123

    I am only interested in the subjects with 8 digit codes, so how could I create a dataset that drops the other two types?

    Second, there are a string of variables for a mental test, I only want subjects that actually took the test on all administrations of it, so is there some method to keep records that have data in all of the variables and drop the rest?

    thanks for any help!

  2. #2
    Bhoot
    Points: 1,270, Level: 19
    Level completed: 70%, Points required for next Level: 30

    Posts
    1,758
    Thanks
    40
    Thanked 124 Times in 106 Posts

    1. I guess subjectid is a character variable

    use substr function
    like using condition like
    if/where SUBSTR( subjectid, 9,1 ) ne ''

    or use length function

    2. how many string variables you have? one way is you can write the condition separately ( var1 ne '' and var2 ne '' ...etc)
    Or if all your string variables are of same format ... you can use array and simply the conditions.
    In the long run, we're all dead.

+ Reply to Thread

Similar Threads

  1. What GLM should is use in this dataset?
    By juantamad in forum Regression Analysis
    Replies: 1
    Last Post: 03-05-2011, 03:22 AM
  2. Replies: 3
    Last Post: 09-13-2010, 08:51 PM
  3. Clustering of large, heavy-tailed dataset
    By rdk in forum Statistics
    Replies: 1
    Last Post: 03-26-2010, 10:37 AM
  4. T-Test: How large is large?
    By drekhan in forum Statistical Research
    Replies: 1
    Last Post: 12-18-2009, 02:14 AM
  5. Model dataset
    By jcbsdw in forum Statistics
    Replies: 0
    Last Post: 04-16-2008, 10:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts








Advertise on Talk Stats