04-09-2024
vnreddy
Quartz | Level 8
Member since
11-27-2019
- 104 Posts
- 14 Likes Given
- 0 Solutions
- 2 Likes Received
-
Latest posts by vnreddy
Subject Views Posted 2791 04-07-2024 10:50 AM 2833 04-07-2024 09:14 AM 2834 04-07-2024 09:12 AM 2929 04-06-2024 11:01 PM 1565 03-06-2024 12:03 PM 1593 03-06-2024 11:31 AM 1623 03-06-2024 10:30 AM 1664 03-06-2024 09:42 AM 1506 02-14-2024 01:02 PM 1533 02-14-2024 12:49 PM -
Activity Feed for vnreddy
- Liked Re: Total and Average in Proc report for PaigeMiller. 04-07-2024 03:15 PM
- Posted Re: Total and Average in Proc report on ODS and Base Reporting. 04-07-2024 10:50 AM
- Posted Re: Total and Average in Proc report on ODS and Base Reporting. 04-07-2024 09:14 AM
- Posted Re: Total and Average in Proc report on ODS and Base Reporting. 04-07-2024 09:12 AM
- Posted Total and Average in Proc report on ODS and Base Reporting. 04-06-2024 11:01 PM
- Posted Re: Excel formula in SAS on SAS Programming. 03-06-2024 12:03 PM
- Posted Re: Excel formula in SAS on SAS Programming. 03-06-2024 11:31 AM
- Posted Re: Excel formula in SAS on SAS Programming. 03-06-2024 10:30 AM
- Posted Excel formula in SAS on SAS Programming. 03-06-2024 09:42 AM
- Posted Re: Proc SQL group by is not working on SAS Programming. 02-14-2024 01:02 PM
- Posted Proc SQL group by is not working on SAS Programming. 02-14-2024 12:49 PM
- Posted Re: Proc report how to eliminate zeros and Duplicate date values from reporting on ODS and Base Reporting. 02-08-2024 06:31 AM
- Posted Proc report how to eliminate zeros and Duplicate date values from reporting on ODS and Base Reporting. 02-07-2024 08:18 PM
- Liked Re: MTD % for Kurt_Bremser. 08-04-2023 11:25 AM
- Liked Re: MTD % for Quentin. 08-04-2023 11:25 AM
- Posted Re: MTD % on SAS Programming. 08-04-2023 10:30 AM
- Posted Re: MTD % on SAS Programming. 08-04-2023 09:53 AM
- Posted Re: MTD % on SAS Programming. 08-04-2023 09:20 AM
- Posted Re: MTD % on SAS Programming. 08-04-2023 09:01 AM
- Posted MTD % on SAS Programming. 08-04-2023 08:44 AM
-
Posts I Liked
Subject Likes Author Latest Post 1 1 1 1 1 -
My Liked Posts
Subject Likes Posted 1 08-10-2021 09:01 AM 1 08-04-2021 09:12 AM
07-30-2021
06:44 PM
Hi @jimbarbour
Thanks for the helping me out.
I am expecting output dataset something like below:
PAR - can be derived from TESTCD/TEST variables.
Period - available in data week 1, week 2
CHG - averages of symptoms, signs & total (e.g., if subjects answer less than 2 symptom questions avg. will be blank, just for sample i have created blank)
... View more
07-30-2021
05:52 PM
I need some help in deriving the average of symptoms and sign score based on the requirement.
If i have the average scores of this i can do the rest of it, i have already done this ADAM dataset which has a VISIT week wise data.
Sample data which i provided is the sdtm data from qs dataset which has daily dairy qsdy(day) in the data which i provided.
my challenge is how i can derive the symptoms, signs and total average based on the number of the questions answered in a day
data which i provided looks similar to sdtm qs data
... View more
07-30-2021
05:34 PM
Hi @jimbarbour
Just to show case the final output i have given the screen shot of placebo. I can do that piece by merging this data with the ARM
Yes, we need to impute the missing values, ID, 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. same applies to signs as well.
TEST = questions
Score = answer
Day = days in a week(for e.g., in Day 1 if ID answers only 1 question out of 5 questions then the symptoms average for that day will be missing)
Symptoms, signs, total score are derived from score 0 to 10 answered by ID
... View more
07-30-2021
05:02 PM
Hi @jimbarbour
Yes you are right symptoms and signs are grouped based on the TESTCD
We need to do the average of symptoms if we have atleast 2 questions answered out of 5 (here TEST is the question and SCORE is the answer)
We need to do the average of signs if we have atleast 3 questions answered out of 6 (here TEST is the question and SCORE is the answer)
I am looking for a final output like below: i have the arm details in a separate dataset, my plan is to once i figure out the symptoms and signs averages
then i can merge arm data and create a proc report as shown below.
/*after creating the the average from symptoms, signs and total score, i can use below logic to get the status */
/*CHG is the derived variable - averages of symptoms, signs and total score*/
/*PAR is defined based the CHG value*/
if CHG ne . then do ;
if CHG>=15 then do; PAR='Declined'; PARN=3; end;
else if CHG<=-15 then do; PAR='Improved';PARN=1; end;
else do; PAR='Stable' ;PARN=2;end;
end;
if PAR= '' then do;
PAR='Missing';
PARN=4;
Final output:
Period
Status
Statistic
Pmi xx mg N=xxx
Plast xx mg N=xxx
Placebo N=xxx
Week 1
Improved
n(%)
xx(x.x)
xx(x.x)
x(xx.x)
Stable
n(%)
xx(x.x)
xx(x.x)
x(xx.x)
Declined
n(%)
x(x.x)
x(x.x)
Missing
n(%)
xx
x
X
Week 2
Improved
n(%)
x(x.x)
xx(x.x)
x(x.x)
Stable
n(%)
xx(x.x)
xx(x.x)
x(x.x)
Declined
n(%)
x(x.x)
x(x.x)
Missing
n(%)
xx
Xx
x
... View more
07-30-2021
04:17 PM
Hi @jimbarbour
Sorry for the excel file, below is the datalines I have used as per your suggestion:
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;
... View more
07-30-2021
01:16 PM
Hi Jim, Could you please use this with the excel file that i have attached. PROC IMPORT OUT=WORK.sample DATAFILE="C:\Users\Desktop\test.xlsx" DBMS=EXCEL REPLACE; RANGE="Sheet1$"; GETNAMES=YES; MIXED=YES; SCANTEXT=YES; USEDATE=YES; SCANTIME=YES; run;
... View more
07-30-2021
10:38 AM
could someone help me here .
Symptom
PP01, PP04, PP09, PP10, PP11
Sign
PP02, PP03, PP05, PP06, PP07, PP08
... View more
07-30-2021
08:53 AM
Hi,
could someone help me with below example, i have attached a test data and i have created period from DAY variable, i want to see the data in weeks: week 1, week 2
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.
... View more
07-05-2021
07:51 AM
unfortunately, no luck ended up with new error. ERROR: Required operator not found in expression: &yyyymm. in (200701 200704 200810 200905 200906 200911 200912 201005 201006 201011 201012 201205 201206 201209 201408 201409 201410 201411 201412) |(&yyyymm. >= 201704 & &yyyymm. <= 202008)
... View more
07-05-2021
06:24 AM
Hi,
I am using below code to identiy the yyyymm in old vs new path. I am getting %EVAL error, could someone help me with it.
%macro comp(yyyymm);
%let new_path = /sas/Prod/Data/July21/&yyyymm.;
%if %eval(&yyyymm. IN
200701 200704
200810
200905 200906 200911 200912
201005 201006 201011 201012
201205 201206 201209
201408 201409 201410 201411 201412)|(&yyyymm. >= 201704 & &yyyymm. <= 202008) %then %do;
%let old_path = /sas/Prod/&yyyymm.;
%end;
%else %if &yyyymm. = 200808 | &yyyymm. = 200809 | (&yyyymm. >= 201301 & &yyyymm. <= 201612) | (&yyyymm. >= 201701 & &yyyymm. <= 201703) %then %do;
%let old_path = /sas/Prod/BT/&yyyymm.;
%end;
%else %do;
%let old_path = /sas/Prod/Repair/&yyyymm.;
%end;
LIBNAME N&yyyymm. "&new_path." access=readonly;
LIBNAME O&yyyymm. "&old_path.";
%mend;
%comp(200701);
error :
ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand is required. The condition was:
200701 IN 200701 200704 200810 200905 200906 200911 200912 201005 201006 201011 201012 201205 201206 201209 201408
201409 201410 201411 201412
ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand is required. The condition was:
%eval(&yyyymm. IN 200701 200704 200810 200905 200906 200911 200912 201005 201006 201011 201012 201205 201206 201209
201408 201409 201410 201411 201412)|(&yyyymm. >= 201704 & &yyyymm. <= 202008)
2 The SAS System 11:15 Monday, July 5, 2021
ERROR: The macro COMP will stop executing.
... View more
05-12-2021
05:31 PM
Hi,
I am having difficulty in creating a dynamic last day of the month date9. format by using yyyymm format.
I have created below code, and at present i am manually changing end_date value (e.g., -51, -52, so on). I want to eliminate this and macro should pick the last day of the month from %check(201701 201702)
end_date values in dec_data dataset will in 03JAN2017, 10JAN2017, 31JAN2017 so on format.
%macro check(months);
%let months_count = %sysfunc(countw(&months.,' '));
%do month_ind=1 %to &months_count.;
%let yyyymm = %scan(&months.,&month_ind.,' ');
%let yymm=%substr(&yyyymm.,3,4);
%let year=%substr(&yyyymm.,1,4);
%let month=%substr(&yyyymm.,5,2);
%put &=yyyymm.;
%put &=yymm.;
%put &=year.;
%put &=month.;
%let end_date = %sysfunc(intnx(month,%sysfunc(today()),-51,end), date9.);
%put &=end_date;
libname kc&yymm. "/sas/Prod/Data/&yyyymm.";
data logic_&yymm.;
set kc&yymm..dec_data;
if date ne . and date <= "&end_date"d then IND = 1;
else IND = 0;
run;
%end;
%mend;
%check(201701 201702 201703 201704 201705 201706 201707 201708 201709 201710 201711 201712);
Thank you,
vnreddy
... View more
04-14-2021
12:03 PM
Hi,
Could someone help me how can i use the required_tables macro in where statement.
At present i have used it manually, but in future required tables might changes so i want to use the macro in where statement.
Basically i am trying to see two datasets info.
%let required_tables=
Accoun_tbl Payments_tbl
;
libname lib "/sas/UAT/Data/";
PROC SQL;
create table temp as
SELECT memname,
nobs,
nvar,
filesize
FROM DICTIONARY.TABLES
WHERE MEMTYPE = 'DATA' and memname IN ('Accoun_tbl' , 'Payments_tbl')
AND LIBNAME = "LIB";
QUIT;
Could someone help me with about query.
Thanks,
vnreddy
... View more
04-06-2021
03:52 PM
I just tried : PROC OPTIONS OPTION=XCMD VALUE; RUN; SAS (r) Proprietary Software Release 9.4 TS1M4 Option Value Information For SAS Option XCMD Value: NOXCMD Scope: SAS Session How option value set: Site Administrator Restricted
... View more