+ Reply to Thread
Results 1 to 5 of 5

Thread: calculating % difference

  1. #1
    Points: 867, Level: 15
    Level completed: 67%, Points required for next Level: 33

    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    calculating % difference




    Hi all,
    I need your help in solving this problem, my data looks like this
    I.D Var1
    1 AA
    2 AA
    3 AA
    4 AA
    5 AG
    6 AA
    7 AA
    8 AA
    I want to catch Var with Different letter and i want to express it percentage difference i.e i got one AG and i want to express its percentage out of 8 observations. May be this is simple task but i am new to SAS can any help me with this.
    Thanks

  2. #2
    Omega Contributor
    Points: 38,432, Level: 100
    Level completed: 0%, Points required for next Level: 0
    hlsmith's Avatar
    Location
    Not Ames, IA
    Posts
    7,006
    Thanks
    398
    Thanked 1,186 Times in 1,147 Posts

    Re: calculating % difference

    You could just run:

    Code: 
     
    Proc freq data= ?;
     table var1;
    run;
    Let us know if you were looking for something else.
    Stop cowardice, ban guns!

  3. #3
    Points: 867, Level: 15
    Level completed: 67%, Points required for next Level: 33

    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: calculating % difference

    Thank you very much for your reply, I have eight observations in that only one is different and i want to calculate % difference means like 1 out of 8 like this and i want to apply this to all my 44 vars.
    Thanks

  4. #4
    Omega Contributor
    Points: 38,432, Level: 100
    Level completed: 0%, Points required for next Level: 0
    hlsmith's Avatar
    Location
    Not Ames, IA
    Posts
    7,006
    Thanks
    398
    Thanked 1,186 Times in 1,147 Posts

    Re: calculating % difference

    So you want to calculate the proportions like I referenced but for 44 variables, then calculate the mean of the proportions, correct?
    Stop cowardice, ban guns!

  5. #5
    Points: 867, Level: 15
    Level completed: 67%, Points required for next Level: 33

    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: calculating % difference


    yes i want to do it

+ Reply to Thread

           




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