Thread: SAS help!!

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2010
    Posts
    1
    Rep Power
    0

    SAS help!!


    I am writing a progrom for a generalized modified levine's test without using the option. I am trying to get dij which is each treatment mean minus the median residual of each treatment. I think have most of it, but it is saying that my variable average is uninitialized, which is what i don't understand because I defined it in data two. Any help would be very much appreciated!!!! below is my code with ommitted data

    data conduct;
    input treat obs;
    cards;

    proc glm;
    class treat;
    model obs=treat;
    output out=one r=res p=yhat;
    proc print data=one;
    data two;
    set one;
    average=1*yhat;
    ymed=abs(res);
    proc means median;
    var ymed; by treat;
    output out=two median=med;
    proc print data=two;
    data three; set two;
    dij=abs(average-med);
    proc print data=three;
    run;
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2012
    Posts
    1
    Rep Power
    0

    sas help


    Hi

    I need the coding for the following;

    /*task*/

    data r;
    input info $ 1 - 50;
    cards;
    101 pencils 42
    102 parker pens 21
    103 apple ipod touch n shuffle 09
    104 dell studio laptop 02
    run;

    I need to find the coding for the above.
    want the colums to be named prid priname and prqty.

    prid and prqty ( should be numerical when u check the data file)
    priname should be (character)
    I can get the code if i manipulate the data.

    data o;
    input prid info $4-30 pqrty;
    cards;
    101 pencils 42
    102 parker pens 21
    103 apple ipod touch n shuffle 09
    104 dell studio laptop 02
    run;

    can u help get the code

IMN logo majestic logo threadwatch logo seochat tools logo