Data Management and Analysis Processes in Proc

creating the example data n.w
1 / 9
Embed
Share

Learn about the step-by-step data management and analysis processes in PROC, including creating example data, selecting samples, assigning IDs, examining data sets, and more.

  • Data Management
  • Analysis Processes
  • PROC
  • Data Sorting
  • Examining Results

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Creating the Example Data

  2. The full data set proc proc contents contents data=fram.fram40;run run;

  3. Select a sample of specified size keeping only the variables desired. /*select a random sample of size 15*/ proc proc surveyselect surveyselect data=fram.fram40(keep=spf1-spf5) out=ftmp method=srs sampsize=15 15 seed=54321 54321 ; run run;

  4. Assign an id to each observation /*assign a meaningless id*/ data data ftmp; length id 8 8; set ftmp; id=_n_; run run;

  5. Examine the data set proc proc print print data=ftmp;run run;

  6. Changing the descriptor portion PROC DATASETS /*get rid of labels and formats*/ proc proc datasets datasets lib=work memtype=data; modify ftmp; attrib _all_ label=' '; attrib _all_ format=; quit quit;

  7. Sort the data in random order /*do a random sort on data*/ data data ftmp; set ftmp; call streaminit(5764313 ranx=rand("uniform"); id=_n_; run run; 5764313); proc proc sort sort data=ftmp;by ranx;run run;

  8. Create 5 separate files /*create a separate file for each of the exams*/ data data sbp1(keep=id spf1 rename=(spf1=sbp)) sbp2 (keep=id spf2 rename=(spf2=sbp)) sbp3 (keep=id spf3 rename=(spf3=sbp)) sbp4 (keep=id spf4 rename=(spf4=sbp)) sbp5 (keep=id spf5 rename=(spf5=sbp)) ; set ftmp; output sbp1; output sbp2; output sbp3; output sbp4; output sbp5; run run;

  9. Examine Results proc proc contents contents data=sbp1;run proc proc contents contents data=sbp2;run proc proc contents contents data=sbp3;run proc proc contents contents data=sbp4;run proc proc contents contents data=sbp5;run run; run; run; run; run;

Related


More Related Content