BookmarkSubscribeRSS Feed
CrisJ
Calcite | Level 5

The dataset to use is the PW_typing.csv file. It is measurements of subjects' typing speeds as they all enter in the same password. They typed the password multiple times per session and completed multiple sessions. More information found in the PDF titled Final Project Background.

You are assigned one subject (listed in the Student Assignments for the Data Subject ID module). Do not modify the original .csv file. Instead, whatever you do in your .SAS file I should be able to replicate using my .csv file.

For this project, be sure to annotate your code file. Include in your SAS comments any other resources you have used, such as books, links to websites like SAS manuals or stack exchange - style help boards, etc.

Use a MACRO to assign your subject number and refer to it throughout the .SAS file. DO NOT print out the entire dataset OR your subject's dataset. This will probably crash your application. Plus, there's a lot of observations and I do not want to trawl through all of them for each student.

  1. Step 1: Means Procedure:
    1. For your given subject, produce a table of means for each session index.
    2. Note that using 'rep' does not make sense, since a rep is one password entered.
    3. Include a proper personalized title for these tables, including the Subject ID.
  2. Plotting Component

    1. Create a set of box-plots that make sense for this data. Choose two variables that are not subject/sessions/reps.

    2. Be sure to include proper titles including the Subject ID and your chosen variables.

    3. Consider that you are using a single subject. How are you going to handle the sessions and reps?

    4. As text printed out in your SAS results, please explain, in full sentences, what subject you used and how you handled the sessions and reps. Discuss what the plots are telling you.

  3. Testing Procedure
    1. Perform a t-test between two of the sessions where you choose the single variable. Make sure this variable is different than the boxplot variables.
    2. Be sure to include a personalized title listing the subject, the sessions used, and the variable used.
    3. Do NOT use Subject, sessionIndex, or Rep for these variables.
    4. As text printed out in your SAS results, please explain, in full sentences, what subject you used, the sessions used, and the variable used. Then, explain why I asked you not to use the previous 3 variables.
5 REPLIES 5
CrisJ
Calcite | Level 5

I have ID and Data. 

Please help me.

The dataset to use is the PW_typing.csv file. It is measurements of subjects' typing speeds as they all enter in the same password. They typed the password multiple times per session and completed multiple sessions. More information found in the PDF titled Final Project Background.

You are assigned one subject (listed in the Student Assignments for the Data Subject ID module). Do not modify the original .csv file. Instead, whatever you do in your .SAS file I should be able to replicate using my .csv file.

For this project, be sure to annotate your code file. Include in your SAS comments any other resources you have used, such as books, links to websites like SAS manuals or stack exchange - style help boards, etc.

Use a MACRO to assign your subject number and refer to it throughout the .SAS file. DO NOT print out the entire dataset OR your subject's dataset. This will probably crash your application. Plus, there's a lot of observations and I do not want to trawl through all of them for each student.

student.

    1. Step 1: Means Procedure:
      1. For your given subject, produce a table of means for each session index.
      2. Note that using 'rep' does not make sense, since a rep is one password entered.
      3. Include a proper personalized title for these tables, including the Subject ID.
    2. Plotting Component

      1. Create a set of box-plots that make sense for this data. Choose two variables that are not subject/sessions/reps.

      2. Be sure to include proper titles including the Subject ID and your chosen variables.

      3. Consider that you are using a single subject. How are you going to handle the sessions and reps?

      4. As text printed out in your SAS results, please explain, in full sentences, what subject you used and how you handled the sessions and reps. Discuss what the plots are telling you.

    3. Testing Procedure
      1. Perform a t-test between two of the sessions where you choose the single variable. Make sure this variable is different than the boxplot variables.
      2. Be sure to include a personalized title listing the subject, the sessions used, and the variable used.
      3. Do NOT use Subject, sessionIndex, or Rep for these variables.
      4. As text printed out in your SAS results, please explain, in full sentences, what subject you used, the sessions used, and the variable used. Then, explain why I asked you not to use the previous 3 variables.
mkeintz
PROC Star

For the moment, put aside the requirement to "Use a MACRO to assign your subject number and refer to it throughout the .SAS file."

 

Let's say you chose subject 32 (if there is one).   How would you program task 1.1 ("produce a table of means for each session index.")?  What would you expect the result of 1.1 to look like?

--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------
CrisJ
Calcite | Level 5
proc means data=subject32_data mean;
var variable_of_interest; 
class session_index;  
run;
CrisJ
Calcite | Level 5

Dear All, I wrote the code for this task:

Means Procedure:

  1. For your given subject, produce a table of means for each session index.
  2. Note that using 'rep' does not make sense, since a rep is one password entered.
  3. Include a proper personalized title for these tables, including the Subject ID.
options validvarname=V7;
proc import out = aa
datafile = "PW_typing.csv"
dbms = csv
replace;
getnames = YES;
run;


proc print data = aa(obs = 5);
run;
proc means data = aa;
run;

proc means data = aa;
var H_Period;
run;
proc means data = aa;
var H_I;
run;

 

But when I run it, it did not work. Please help me to figure out what I am missing.

Kurt_Bremser
Super User

I combined your post into one thread. Please do not post the same question multiple times.

 

Whenever your code "does not work" (a phrase which, on its own, tells us next to nothing), describe in detail where the result does not meet your expectations, and post the complete (all code and messages) log of the failing step.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 1261 views
  • 0 likes
  • 3 in conversation