BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
jimbarbour
Meteorite | Level 14

OK, so why are there multiple totals?  What are those totals?  What distinguishes one total from another?

 

How can I know Signs and Symptoms until after I have calculated the averages?

 

How am I determining missing values before I get to this point

 

Can we identify an intermediate step before the table you just posted?  

 

Jim

vnreddy
Quartz | Level 8

A total PP score with a range of 0 to 100 will be derived from taking the average of the symptom and sign scores.

 

Total score can only be derived after deriving the symptoms and signs

 

Missing values can be determined be using the day variable : e.g., for symptom : To obtain a symptom score on a given day, responses to at least 2 of the 5 questions must be available. If more than 3 questions are missing, the symptom score is considered missing.

 

For sign : Responses to at least 3 of the 6 questions must be available in order to obtain a sign score for a given day. If more than 3 questions are missing, the sign score is considered missing.

This can be achieved by using the day variable for each ID we have 1-7 days in week 1 and so on... in my original data i have data more than 50 weeks.

On a daily based every ID will answer some questions (11 questions - 5 belongs to symptoms  and 6 belongs to signs). if they answer only 1 in symptoms then we will flag them as missing for that particular day. 

 

as per the task :

The PP is an 11-item subject-reported instrument that assesses severity of symptoms and subject observed signs commonly associated in plaque psoriasis. It has been shown to be reliable and valid in measuring symptoms and signs of subjects with moderate-to-severe plaque psoriasis in the clinic and has strong psychometric properties in assessing treatment effects in clinical trials. Subjects are asked to rate the severity of each item on an 11-point Numeric Rating Scale ranging from 0 (absent) to 10 (worst imaginable).

A symptom score will be derived by averaging the 5 questions (i.e., itch, pain, stinging, burning, skin tightness) included in the symptom score and multiplying by 10. To obtain a symptom score on a given day, responses to at least 2 of the 5 questions must be available. If more than 3 questions are missing, the symptom score is considered missing.

A sign score will be derived by averaging the 6 questions (i.e., skin dryness, cracking, scaling, shedding or flaking, redness, bleeding) included in the sign score and multiplying by 10. Responses to at least 3 of the 6 questions must be available in order to obtain a sign score for a given day. If more than 3 questions are missing, the sign score is considered missing.

Both symptom and sign scores range from 0 to 100, where 0 represents the least severe symptom/sign and 100 the most severe.

A total PP score with a range of 0 to 100 will be derived from taking the average of the symptom and sign scores.

Trial administered the PP with a 24-hour recall period on a daily basis. To calculate the scores at each visit, the daily scores with 24-hour recall periods over the prior 7 days will be used and the average score to each of the 11 questions will be used as the score at that visit. In case missing data arise during the 7 days prior to the visit, daily scores of at least 4 days out of the 7 can be used. If greater than 3 scores are missing, the average score will be missing. The baseline PP scores are calculated based on the daily diary collected data during the screening period.

 

I believe the intermediate table will be averages on a daily basis, 

To calculate the scores at each visit, the daily scores with 24-hour recall periods over the prior 7 days will be used and the average score to each of the 11 questions will be used as the score at that visit. In case missing data arise during the 7 days prior to the visit, daily scores of at least 4 days out of the 7 can be used. If greater than 3 scores are missing, the average score will be missing. 

This has already been calculated and derived as DAY variable.

 

jimbarbour
Meteorite | Level 14

OK, this is helpful.  I'm still not sure I fully understand, but I'll have to look at it later.  I have to take my daughter somewhere. It's Friday here; I'll check back on this topic on Monday.  

 

Perhaps someone else can lend a hand in the interim.

 

Jim

vnreddy
Quartz | Level 8

could you please give me some tip on how to achieve the missing part based on the PP group and number of days subject answered the questions.

For symptoms subjects should answer at least 2 out of 5 questions on a daily basis.

similarly for sign subjects should answer at least 3 out of 6 questions on a daily basis.

 

jimbarbour
Meteorite | Level 14

@vnreddy wrote:

could you please give me some tip on how to achieve the missing part based on the PP group and number of days subject answered the questions.


Good.  That's a good, concrete goal.

 

Now, with the data that I have, see below, which is an example of missing data?  

 

Jim

 

DATA TEST ;
INFILE DATALINES DLM="09"X DSD;
input ID $	TESTCD$  TEST:$13-42 SCORE DAY	Period $;
datalines
;
M21136	PP01	SeverityofItch	6	3	Week 1
M21136	PP01	SeverityofItch	6	5	Week 1
M21136	PP01	SeverityofItch	6	6	Week 1
M21136	PP01	SeverityofItch	7	1	Week 1
M21136	PP01	SeverityofItch	7	2	Week 1
M21136	PP01	SeverityofItch	7	4	Week 1
M21136	PP02	SeverityofDryness	5	2	Week 1
M21136	PP02	SeverityofDryness	6	4	Week 1
M21136	PP02	SeverityofDryness	6	6	Week 1
M21136	PP02	SeverityofDryness	7	1	Week 1
M21136	PP02	SeverityofDryness	7	3	Week 1
M21136	PP02	SeverityofDryness	7	5	Week 1
M21136	PP03	SeverityofCracking	5	4	Week 1
M21136	PP03	SeverityofCracking	6	1	Week 1
M21136	PP03	SeverityofCracking	6	2	Week 1
M21136	PP03	SeverityofCracking	6	3	Week 1
M21136	PP03	SeverityofCracking	6	6	Week 1
M21136	PP03	SeverityofCracking	7	5	Week 1
M21136	PP04	SeverityofSkin Tightness	4	4	Week 1
M21136	PP04	SeverityofSkin Tightness	6	1	Week 1
M21136	PP04	SeverityofSkin Tightness	6	6	Week 1
M21136	PP04	SeverityofSkin Tightness	7	2	Week 1
M21136	PP04	SeverityofSkin Tightness	7	3	Week 1
M21136	PP04	SeverityofSkin Tightness	8	5	Week 1
M21136	PP05	SeverityofScaling	5	4	Week 1
M21136	PP05	SeverityofScaling	6	1	Week 1
M21136	PP05	SeverityofScaling	6	2	Week 1
M21136	PP05	SeverityofScaling	6	3	Week 1
M21136	PP05	SeverityofScaling	6	6	Week 1
M21136	PP05	SeverityofScaling	7	5	Week 1
M21136	PP06	SeverityofShredding or Flaking	5	3	Week 1
M21136	PP06	SeverityofShredding or Flaking	5	4	Week 1
M21136	PP06	SeverityofShredding or Flaking	6	1	Week 1
M21136	PP06	SeverityofShredding or Flaking	6	6	Week 1
M21136	PP06	SeverityofShredding or Flaking	7	2	Week 1
M21136	PP06	SeverityofShredding or Flaking	7	5	Week 1
M21136	PP07	SeverityofRedness	5	1	Week 1
M21136	PP07	SeverityofRedness	5	4	Week 1
M21136	PP07	SeverityofRedness	6	2	Week 1
M21136	PP07	SeverityofRedness	6	3	Week 1
M21136	PP07	SeverityofRedness	6	6	Week 1
M21136	PP07	SeverityofRedness	7	5	Week 1
M21136	PP08	SeverityofBleeding	0	1	Week 1
M21136	PP08	SeverityofBleeding	0	3	Week 1
M21136	PP08	SeverityofBleeding	1	2	Week 1
M21136	PP08	SeverityofBleeding	1	6	Week 1
M21136	PP08	SeverityofBleeding	5	4	Week 1
M21136	PP08	SeverityofBleeding	7	5	Week 1
M21136	PP09	SeverityofBurning	5	4	Week 1
M21136	PP09	SeverityofBurning	6	1	Week 1
M21136	PP09	SeverityofBurning	6	5	Week 1
M21136	PP09	SeverityofBurning	6	6	Week 1
M21136	PP09	SeverityofBurning	7	2	Week 1
M21136	PP09	SeverityofBurning	7	3	Week 1
M21136	PP10	SeverityofStinging	5	4	Week 1
M21136	PP10	SeverityofStinging	6	1	Week 1
M21136	PP10	SeverityofStinging	6	2	Week 1
M21136	PP10	SeverityofStinging	6	6	Week 1
M21136	PP10	SeverityofStinging	7	3	Week 1
M21136	PP10	SeverityofStinging	7	5	Week 1
M21136	PP11	SeverityofPain from Psoriasis	5	4	Week 1
M21136	PP11	SeverityofPain from Psoriasis	5	6	Week 1
M21136	PP11	SeverityofPain from Psoriasis	6	1	Week 1
M21136	PP11	SeverityofPain from Psoriasis	6	5	Week 1
M21136	PP11	SeverityofPain from Psoriasis	7	2	Week 1
M21136	PP11	SeverityofPain from Psoriasis	7	3	Week 1
M21136	PP01	SeverityofItch	3	11	Week 2
M21136	PP01	SeverityofItch	4	7	Week 2
M21136	PP01	SeverityofItch	4	9	Week 2
M21136	PP01	SeverityofItch	4	12	Week 2
M21136	PP01	SeverityofItch	4	13	Week 2
M21136	PP01	SeverityofItch	5	10	Week 2
M21136	PP01	SeverityofItch	7	8	Week 2
M21136	PP02	SeverityofDryness	3	12	Week 2
M21136	PP02	SeverityofDryness	4	7	Week 2
M21136	PP02	SeverityofDryness	4	10	Week 2
M21136	PP02	SeverityofDryness	4	11	Week 2
M21136	PP02	SeverityofDryness	4	13	Week 2
M21136	PP02	SeverityofDryness	5	9	Week 2
M21136	PP02	SeverityofDryness	6	8	Week 2
M21136	PP03	SeverityofCracking	3	11	Week 2
M21136	PP03	SeverityofCracking	4	12	Week 2
M21136	PP03	SeverityofCracking	4	13	Week 2
M21136	PP03	SeverityofCracking	5	7	Week 2
M21136	PP03	SeverityofCracking	5	9	Week 2
M21136	PP03	SeverityofCracking	5	10	Week 2
M21136	PP03	SeverityofCracking	7	8	Week 2
M21136	PP04	SeverityofSkin Tightness	4	9	Week 2
M21136	PP04	SeverityofSkin Tightness	4	11	Week 2
M21136	PP04	SeverityofSkin Tightness	4	12	Week 2
M21136	PP04	SeverityofSkin Tightness	4	13	Week 2
M21136	PP04	SeverityofSkin Tightness	5	7	Week 2
M21136	PP04	SeverityofSkin Tightness	5	10	Week 2
M21136	PP04	SeverityofSkin Tightness	6	8	Week 2
M21136	PP05	SeverityofScaling	3	11	Week 2
M21136	PP05	SeverityofScaling	4	7	Week 2
M21136	PP05	SeverityofScaling	4	12	Week 2
M21136	PP05	SeverityofScaling	4	13	Week 2
M21136	PP05	SeverityofScaling	5	9	Week 2
M21136	PP05	SeverityofScaling	6	10	Week 2
M21136	PP05	SeverityofScaling	7	8	Week 2
M21136	PP06	SeverityofShredding or Flaking	4	10	Week 2
M21136	PP06	SeverityofShredding or Flaking	4	11	Week 2
M21136	PP06	SeverityofShredding or Flaking	4	12	Week 2
M21136	PP06	SeverityofShredding or Flaking	4	13	Week 2
M21136	PP06	SeverityofShredding or Flaking	5	7	Week 2
M21136	PP06	SeverityofShredding or Flaking	5	9	Week 2
M21136	PP06	SeverityofShredding or Flaking	6	8	Week 2
M21136	PP07	SeverityofRedness	3	11	Week 2
M21136	PP07	SeverityofRedness	3	13	Week 2
M21136	PP07	SeverityofRedness	4	7	Week 2
M21136	PP07	SeverityofRedness	4	12	Week 2
M21136	PP07	SeverityofRedness	5	9	Week 2
M21136	PP07	SeverityofRedness	5	10	Week 2
M21136	PP07	SeverityofRedness	7	8	Week 2
M21136	PP08	SeverityofBleeding	0	7	Week 2
M21136	PP08	SeverityofBleeding	0	8	Week 2
M21136	PP08	SeverityofBleeding	0	9	Week 2
M21136	PP08	SeverityofBleeding	0	10	Week 2
M21136	PP08	SeverityofBleeding	0	11	Week 2
M21136	PP08	SeverityofBleeding	0	12	Week 2
M21136	PP08	SeverityofBleeding	0	13	Week 2
M21136	PP09	SeverityofBurning	1	10	Week 2
M21136	PP09	SeverityofBurning	4	9	Week 2
M21136	PP09	SeverityofBurning	4	11	Week 2
M21136	PP09	SeverityofBurning	4	12	Week 2
M21136	PP09	SeverityofBurning	4	13	Week 2
M21136	PP09	SeverityofBurning	5	7	Week 2
M21136	PP09	SeverityofBurning	7	8	Week 2
M21136	PP10	SeverityofStinging	2	10	Week 2
M21136	PP10	SeverityofStinging	3	11	Week 2
M21136	PP10	SeverityofStinging	4	7	Week 2
M21136	PP10	SeverityofStinging	4	9	Week 2
M21136	PP10	SeverityofStinging	4	12	Week 2
M21136	PP10	SeverityofStinging	4	13	Week 2
M21136	PP10	SeverityofStinging	6	8	Week 2
M21136	PP11	SeverityofPain from Psoriasis	3	10	Week 2
M21136	PP11	SeverityofPain from Psoriasis	4	7	Week 2
M21136	PP11	SeverityofPain from Psoriasis	4	9	Week 2
M21136	PP11	SeverityofPain from Psoriasis	4	11	Week 2
M21136	PP11	SeverityofPain from Psoriasis	4	13	Week 2
M21136	PP11	SeverityofPain from Psoriasis	5	12	Week 2
M21136	PP11	SeverityofPain from Psoriasis	6	8	Week 2
;
run;
vnreddy
Quartz | Level 8
/*Week 2, 'PP01','PP04','PP09','PP10' is missing that means symptoms average for week 2 should be missing*/
/*out of 5 questions only 1 question was answered*/

DATA TEST ; INFILE DATALINES DLM="09"X DSD; input ID $ TESTCD$ TEST:$13-42 SCORE DAY Period $; datalines ; M21136 PP01 SeverityofItch 6 3 Week 1 M21136 PP01 SeverityofItch 6 5 Week 1 M21136 PP01 SeverityofItch 6 6 Week 1 M21136 PP01 SeverityofItch 7 1 Week 1 M21136 PP01 SeverityofItch 7 2 Week 1 M21136 PP01 SeverityofItch 7 4 Week 1 M21136 PP02 SeverityofDryness 5 2 Week 1 M21136 PP02 SeverityofDryness 6 4 Week 1 M21136 PP02 SeverityofDryness 6 6 Week 1 M21136 PP02 SeverityofDryness 7 1 Week 1 M21136 PP02 SeverityofDryness 7 3 Week 1 M21136 PP02 SeverityofDryness 7 5 Week 1 M21136 PP03 SeverityofCracking 5 4 Week 1 M21136 PP03 SeverityofCracking 6 1 Week 1 M21136 PP03 SeverityofCracking 6 2 Week 1 M21136 PP03 SeverityofCracking 6 3 Week 1 M21136 PP03 SeverityofCracking 6 6 Week 1 M21136 PP03 SeverityofCracking 7 5 Week 1 M21136 PP04 SeverityofSkin Tightness 4 4 Week 1 M21136 PP04 SeverityofSkin Tightness 6 1 Week 1 M21136 PP04 SeverityofSkin Tightness 6 6 Week 1 M21136 PP04 SeverityofSkin Tightness 7 2 Week 1 M21136 PP04 SeverityofSkin Tightness 7 3 Week 1 M21136 PP04 SeverityofSkin Tightness 8 5 Week 1 M21136 PP05 SeverityofScaling 5 4 Week 1 M21136 PP05 SeverityofScaling 6 1 Week 1 M21136 PP05 SeverityofScaling 6 2 Week 1 M21136 PP05 SeverityofScaling 6 3 Week 1 M21136 PP05 SeverityofScaling 6 6 Week 1 M21136 PP05 SeverityofScaling 7 5 Week 1 M21136 PP06 SeverityofShredding or Flaking 5 3 Week 1 M21136 PP06 SeverityofShredding or Flaking 5 4 Week 1 M21136 PP06 SeverityofShredding or Flaking 6 1 Week 1 M21136 PP06 SeverityofShredding or Flaking 6 6 Week 1 M21136 PP06 SeverityofShredding or Flaking 7 2 Week 1 M21136 PP06 SeverityofShredding or Flaking 7 5 Week 1 M21136 PP07 SeverityofRedness 5 1 Week 1 M21136 PP07 SeverityofRedness 5 4 Week 1 M21136 PP07 SeverityofRedness 6 2 Week 1 M21136 PP07 SeverityofRedness 6 3 Week 1 M21136 PP07 SeverityofRedness 6 6 Week 1 M21136 PP07 SeverityofRedness 7 5 Week 1 M21136 PP08 SeverityofBleeding 0 1 Week 1 M21136 PP08 SeverityofBleeding 0 3 Week 1 M21136 PP08 SeverityofBleeding 1 2 Week 1 M21136 PP08 SeverityofBleeding 1 6 Week 1 M21136 PP08 SeverityofBleeding 5 4 Week 1 M21136 PP08 SeverityofBleeding 7 5 Week 1 M21136 PP09 SeverityofBurning 5 4 Week 1 M21136 PP09 SeverityofBurning 6 1 Week 1 M21136 PP09 SeverityofBurning 6 5 Week 1 M21136 PP09 SeverityofBurning 6 6 Week 1 M21136 PP09 SeverityofBurning 7 2 Week 1 M21136 PP09 SeverityofBurning 7 3 Week 1 M21136 PP10 SeverityofStinging 5 4 Week 1 M21136 PP10 SeverityofStinging 6 1 Week 1 M21136 PP10 SeverityofStinging 6 2 Week 1 M21136 PP10 SeverityofStinging 6 6 Week 1 M21136 PP10 SeverityofStinging 7 3 Week 1 M21136 PP10 SeverityofStinging 7 5 Week 1 M21136 PP11 SeverityofPain from Psoriasis 5 4 Week 1 M21136 PP11 SeverityofPain from Psoriasis 5 6 Week 1 M21136 PP11 SeverityofPain from Psoriasis 6 1 Week 1 M21136 PP11 SeverityofPain from Psoriasis 6 5 Week 1 M21136 PP11 SeverityofPain from Psoriasis 7 2 Week 1 M21136 PP11 SeverityofPain from Psoriasis 7 3 Week 1 M21136 PP02 SeverityofDryness 3 12 Week 2 M21136 PP02 SeverityofDryness 4 7 Week 2 M21136 PP02 SeverityofDryness 4 10 Week 2 M21136 PP02 SeverityofDryness 4 11 Week 2 M21136 PP02 SeverityofDryness 4 13 Week 2 M21136 PP02 SeverityofDryness 5 9 Week 2 M21136 PP02 SeverityofDryness 6 8 Week 2 M21136 PP03 SeverityofCracking 3 11 Week 2 M21136 PP03 SeverityofCracking 4 12 Week 2 M21136 PP03 SeverityofCracking 4 13 Week 2 M21136 PP03 SeverityofCracking 5 7 Week 2 M21136 PP03 SeverityofCracking 5 9 Week 2 M21136 PP03 SeverityofCracking 5 10 Week 2 M21136 PP03 SeverityofCracking 7 8 Week 2 M21136 PP05 SeverityofScaling 3 11 Week 2 M21136 PP05 SeverityofScaling 4 7 Week 2 M21136 PP05 SeverityofScaling 4 12 Week 2 M21136 PP05 SeverityofScaling 4 13 Week 2 M21136 PP05 SeverityofScaling 5 9 Week 2 M21136 PP05 SeverityofScaling 6 10 Week 2 M21136 PP05 SeverityofScaling 7 8 Week 2 M21136 PP06 SeverityofShredding or Flaking 4 10 Week 2 M21136 PP06 SeverityofShredding or Flaking 4 11 Week 2 M21136 PP06 SeverityofShredding or Flaking 4 12 Week 2 M21136 PP06 SeverityofShredding or Flaking 4 13 Week 2 M21136 PP06 SeverityofShredding or Flaking 5 7 Week 2 M21136 PP06 SeverityofShredding or Flaking 5 9 Week 2 M21136 PP06 SeverityofShredding or Flaking 6 8 Week 2 M21136 PP07 SeverityofRedness 3 11 Week 2 M21136 PP07 SeverityofRedness 3 13 Week 2 M21136 PP07 SeverityofRedness 4 7 Week 2 M21136 PP07 SeverityofRedness 4 12 Week 2 M21136 PP07 SeverityofRedness 5 9 Week 2 M21136 PP07 SeverityofRedness 5 10 Week 2 M21136 PP07 SeverityofRedness 7 8 Week 2 M21136 PP08 SeverityofBleeding 0 7 Week 2 M21136 PP08 SeverityofBleeding 0 8 Week 2 M21136 PP08 SeverityofBleeding 0 9 Week 2 M21136 PP08 SeverityofBleeding 0 10 Week 2 M21136 PP08 SeverityofBleeding 0 11 Week 2 M21136 PP08 SeverityofBleeding 0 12 Week 2 M21136 PP08 SeverityofBleeding 0 13 Week 2 M21136 PP11 SeverityofPain from Psoriasis 3 10 Week 2 M21136 PP11 SeverityofPain from Psoriasis 4 7 Week 2 M21136 PP11 SeverityofPain from Psoriasis 4 9 Week 2 M21136 PP11 SeverityofPain from Psoriasis 4 11 Week 2 M21136 PP11 SeverityofPain from Psoriasis 4 13 Week 2 M21136 PP11 SeverityofPain from Psoriasis 5 12 Week 2 M21136 PP11 SeverityofPain from Psoriasis 6 8 Week 2 ; run;
jimbarbour
Meteorite | Level 14

OK.  Sorry to take so long, but we were busy this week at work.  What I've done is written a program that will remove all of the weeks with too many missing tests.  If there are more than 3 missing tests, I remove that week for that ID.  If a score is 0, I consider that to be missing.  In other words, 0 is missing.  I hope I've understood that correctly.  

 

Assuming that 0 is the same as missing, then not only are 'PP01','PP04','PP09','PP10' missing for Week 2 but also 'PP08'.

 

The final result is a dataset with all weeks that are "missing" removed.  

 

Here is the program:

/*Week 2, 'PP01','PP04','PP09','PP10' is missing that means symptoms average for week 2 should be missing*/
/*out of 5 questions only 1 question was answered*/
/*also 'PP08' is missing because all the scores are 0*/
DATA TEST ; INFILE DATALINES DLM="09"X DSD; INPUT $ TESTCD$ TEST:$13-42 SCORE DAY Period $; datalines ; M21136 PP01 SeverityofItch 6 3 Week 1 M21136 PP01 SeverityofItch 6 5 Week 1 M21136 PP01 SeverityofItch 6 6 Week 1 M21136 PP01 SeverityofItch 7 1 Week 1 M21136 PP01 SeverityofItch 7 2 Week 1 M21136 PP01 SeverityofItch 7 4 Week 1 M21136 PP02 SeverityofDryness 5 2 Week 1 M21136 PP02 SeverityofDryness 6 4 Week 1 M21136 PP02 SeverityofDryness 6 6 Week 1 M21136 PP02 SeverityofDryness 7 1 Week 1 M21136 PP02 SeverityofDryness 7 3 Week 1 M21136 PP02 SeverityofDryness 7 5 Week 1 M21136 PP03 SeverityofCracking 5 4 Week 1 M21136 PP03 SeverityofCracking 6 1 Week 1 M21136 PP03 SeverityofCracking 6 2 Week 1 M21136 PP03 SeverityofCracking 6 3 Week 1 M21136 PP03 SeverityofCracking 6 6 Week 1 M21136 PP03 SeverityofCracking 7 5 Week 1 M21136 PP04 SeverityofSkin Tightness 4 4 Week 1 M21136 PP04 SeverityofSkin Tightness 6 1 Week 1 M21136 PP04 SeverityofSkin Tightness 6 6 Week 1 M21136 PP04 SeverityofSkin Tightness 7 2 Week 1 M21136 PP04 SeverityofSkin Tightness 7 3 Week 1 M21136 PP04 SeverityofSkin Tightness 8 5 Week 1 M21136 PP05 SeverityofScaling 5 4 Week 1 M21136 PP05 SeverityofScaling 6 1 Week 1 M21136 PP05 SeverityofScaling 6 2 Week 1 M21136 PP05 SeverityofScaling 6 3 Week 1 M21136 PP05 SeverityofScaling 6 6 Week 1 M21136 PP05 SeverityofScaling 7 5 Week 1 M21136 PP06 SeverityofShredding or Flaking 5 3 Week 1 M21136 PP06 SeverityofShredding or Flaking 5 4 Week 1 M21136 PP06 SeverityofShredding or Flaking 6 1 Week 1 M21136 PP06 SeverityofShredding or Flaking 6 6 Week 1 M21136 PP06 SeverityofShredding or Flaking 7 2 Week 1 M21136 PP06 SeverityofShredding or Flaking 7 5 Week 1 M21136 PP07 SeverityofRedness 5 1 Week 1 M21136 PP07 SeverityofRedness 5 4 Week 1 M21136 PP07 SeverityofRedness 6 2 Week 1 M21136 PP07 SeverityofRedness 6 3 Week 1 M21136 PP07 SeverityofRedness 6 6 Week 1 M21136 PP07 SeverityofRedness 7 5 Week 1 M21136 PP08 SeverityofBleeding 0 1 Week 1 M21136 PP08 SeverityofBleeding 0 3 Week 1 M21136 PP08 SeverityofBleeding 1 2 Week 1 M21136 PP08 SeverityofBleeding 1 6 Week 1 M21136 PP08 SeverityofBleeding 5 4 Week 1 M21136 PP08 SeverityofBleeding 7 5 Week 1 M21136 PP09 SeverityofBurning 5 4 Week 1 M21136 PP09 SeverityofBurning 6 1 Week 1 M21136 PP09 SeverityofBurning 6 5 Week 1 M21136 PP09 SeverityofBurning 6 6 Week 1 M21136 PP09 SeverityofBurning 7 2 Week 1 M21136 PP09 SeverityofBurning 7 3 Week 1 M21136 PP10 SeverityofStinging 5 4 Week 1 M21136 PP10 SeverityofStinging 6 1 Week 1 M21136 PP10 SeverityofStinging 6 2 Week 1 M21136 PP10 SeverityofStinging 6 6 Week 1 M21136 PP10 SeverityofStinging 7 3 Week 1 M21136 PP10 SeverityofStinging 7 5 Week 1 M21136 PP11 SeverityofPain from Psoriasis 5 4 Week 1 M21136 PP11 SeverityofPain from Psoriasis 5 6 Week 1 M21136 PP11 SeverityofPain from Psoriasis 6 1 Week 1 M21136 PP11 SeverityofPain from Psoriasis 6 5 Week 1 M21136 PP11 SeverityofPain from Psoriasis 7 2 Week 1 M21136 PP11 SeverityofPain from Psoriasis 7 3 Week 1 M21136 PP02 SeverityofDryness 3 12 Week 2 M21136 PP02 SeverityofDryness 4 7 Week 2 M21136 PP02 SeverityofDryness 4 10 Week 2 M21136 PP02 SeverityofDryness 4 11 Week 2 M21136 PP02 SeverityofDryness 4 13 Week 2 M21136 PP02 SeverityofDryness 5 9 Week 2 M21136 PP02 SeverityofDryness 6 8 Week 2 M21136 PP03 SeverityofCracking 3 11 Week 2 M21136 PP03 SeverityofCracking 4 12 Week 2 M21136 PP03 SeverityofCracking 4 13 Week 2 M21136 PP03 SeverityofCracking 5 7 Week 2 M21136 PP03 SeverityofCracking 5 9 Week 2 M21136 PP03 SeverityofCracking 5 10 Week 2 M21136 PP03 SeverityofCracking 7 8 Week 2 M21136 PP05 SeverityofScaling 3 11 Week 2 M21136 PP05 SeverityofScaling 4 7 Week 2 M21136 PP05 SeverityofScaling 4 12 Week 2 M21136 PP05 SeverityofScaling 4 13 Week 2 M21136 PP05 SeverityofScaling 5 9 Week 2 M21136 PP05 SeverityofScaling 6 10 Week 2 M21136 PP05 SeverityofScaling 7 8 Week 2 M21136 PP06 SeverityofShredding or Flaking 4 10 Week 2 M21136 PP06 SeverityofShredding or Flaking 4 11 Week 2 M21136 PP06 SeverityofShredding or Flaking 4 12 Week 2 M21136 PP06 SeverityofShredding or Flaking 4 13 Week 2 M21136 PP06 SeverityofShredding or Flaking 5 7 Week 2 M21136 PP06 SeverityofShredding or Flaking 5 9 Week 2 M21136 PP06 SeverityofShredding or Flaking 6 8 Week 2 M21136 PP07 SeverityofRedness 3 11 Week 2 M21136 PP07 SeverityofRedness 3 13 Week 2 M21136 PP07 SeverityofRedness 4 7 Week 2 M21136 PP07 SeverityofRedness 4 12 Week 2 M21136 PP07 SeverityofRedness 5 9 Week 2 M21136 PP07 SeverityofRedness 5 10 Week 2 M21136 PP07 SeverityofRedness 7 8 Week 2 M21136 PP08 SeverityofBleeding 0 7 Week 2 M21136 PP08 SeverityofBleeding 0 8 Week 2 M21136 PP08 SeverityofBleeding 0 9 Week 2 M21136 PP08 SeverityofBleeding 0 10 Week 2 M21136 PP08 SeverityofBleeding 0 11 Week 2 M21136 PP08 SeverityofBleeding 0 12 Week 2 M21136 PP08 SeverityofBleeding 0 13 Week 2 M21136 PP11 SeverityofPain from Psoriasis 3 10 Week 2 M21136 PP11 SeverityofPain from Psoriasis 4 7 Week 2 M21136 PP11 SeverityofPain from Psoriasis 4 9 Week 2 M21136 PP11 SeverityofPain from Psoriasis 4 11 Week 2 M21136 PP11 SeverityofPain from Psoriasis 4 13 Week 2 M21136 PP11 SeverityofPain from Psoriasis 5 12 Week 2 M21136 PP11 SeverityofPain from Psoriasis 6 8 Week 2 ; RUN; PROC SQL NOPRINT; SELECT COUNT(DISTINCT TestCd) INTO : Nbr_of_Tests TRIMMED FROM TEST ; QUIT; %PUT NOTE: &=Nbr_of_Tests; DATA Valid_Weeks (KEEP=ID Period Missing_Tests Nbr_of_Tests_Taken); RETAIN PP01 - PP&Nbr_of_Tests 0; ARRAY PP_Cnt {*} PP01 - PP&Nbr_of_Tests _TEMPORARY_; SET TEST; BY ID Period NOTSORTED; IF UPCASE(TestCD) = 'PP01' AND Score > 0 THEN PP01 = 1; ELSE IF UPCASE(TestCD) = 'PP02' AND Score > 0 THEN PP02 = 1; ELSE IF UPCASE(TestCD) = 'PP03' AND Score > 0 THEN PP03 = 1; ELSE IF UPCASE(TestCD) = 'PP04' AND Score > 0 THEN PP04 = 1; ELSE IF UPCASE(TestCD) = 'PP05' AND Score > 0 THEN PP05 = 1; ELSE IF UPCASE(TestCD) = 'PP06' AND Score > 0 THEN PP06 = 1; ELSE IF UPCASE(TestCD) = 'PP07' AND Score > 0 THEN PP07 = 1; ELSE IF UPCASE(TestCD) = 'PP08' AND Score > 0 THEN PP08 = 1; ELSE IF UPCASE(TestCD) = 'PP09' AND Score > 0 THEN PP09 = 1; ELSE IF UPCASE(TestCD) = 'PP10' AND Score > 0 THEN PP10 = 1; ELSE IF UPCASE(TestCD) = 'PP11' AND Score > 0 THEN PP11 = 1; IF LAST.Period THEN DO; Nbr_of_Tests_Taken = SUM(of PP01 - PP11); Missing_Tests = &Nbr_of_Tests - Nbr_of_Tests_Taken; DO i = 1 TO &Nbr_of_Tests; PP_Cnt {i} = 0; END; IF Missing_Tests > 3 THEN DELETE; ELSE OUTPUT; END; ELSE DO; DELETE; END; RUN; PROC SQL; CREATE TABLE Test_Not_Missing AS SELECT * FROM TEST WHERE CATS(ID, Period) IN ( SELECT CATS(ID, Period) FROM Valid_Weeks); ; QUIT;

I hope this is what you need,

 

Jim

vnreddy
Quartz | Level 8

thank you.

jimbarbour
Meteorite | Level 14

You're welcome.  I'm glad this helped!!   👍

 

Jim

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 23 replies
  • 2221 views
  • 3 likes
  • 3 in conversation