14.2.5.2
Best Overall Response (Confirmation Not Required) by Investigator
Made 2026-10-17 from simulated data.
ONCO-EX
Table 14.2.5.2
Best Overall Response (Confirmation Not Required) by Investigator
Intent-to-Treat Analysis Set
| Standard of Care (N=150) | Clinwrightinib 200 mg (N=150) | |
|---|---|---|
| Best overall response [a] | ||
| Complete response (CR) | 2 (1.3%) | 15 (10.0%) |
| Partial response (PR) | 23 (15.3%) | 50 (33.3%) |
| Stable disease (SD) | 57 (38.0%) | 54 (36.0%) |
| Progressive disease (PD) | 67 (44.7%) | 28 (18.7%) |
| Not evaluable (NE) | 0 (0.0%) | 1 (0.7%) |
| No assessment | 1 (0.7%) | 2 (1.3%) |
| Objective response rate (CR + PR) | 25 (16.7%) | 65 (43.3%) |
| 95% CI [b] | (11.1, 23.6) | (35.3, 51.7) |
| Disease control rate (CR + PR + SD) | 82 (54.7%) | 119 (79.3%) |
| 95% CI [b] | (46.3, 62.8) | (72.0, 85.5) |
[a] RECIST 1.1, by the investigator; responses need no confirmation. Stable disease is at least 6 weeks after the start of treatment.
[b] Exact (Clopper-Pearson) 95% confidence interval.
Percentages are of the subjects in each column (N).
Source: ADRS.
Program: t-14-2-5-2.sas
Program t-14-2-5-2.sas
Version 1, written from Clinwright's patterns, 2026-10-17, checks passed.
/*==== 00-header ====*/
/*----------------------------------------------------------------------------
Output : Table 14.2.5.2 / Best Overall Response (Confirmation Not Required) by Investigator / Intent-to-Treat Analysis Set
Program : t-14-2-5-2.sas Reporting effort : CSR
ADaM : /work/adam (ADSL, ADLBC, ADLBH, ADVS, ADAE, ADEG, ADCM, ADMH, ADEX, ADRS, ADTR, ADTTE)
The header and the report step follow from the shell. The sections between
them make WORK.FINAL, one record per row of the table, in order:
_page the page (1 unless the output is paged); _pagelbl its heading or empty
_ord the row's order; _indent the label's indentation (0 = flush left)
_rowid the uuid of the shell row it shows (WORK._SHELL); one shell row may
have several (a category per value); a blank row's is blank-<n>
_kind label | stat | blank
rowlabel the row's label, as text
col1 Standard of Care|(N=xx)
col2 Clinwrightinib 200 mg|(N=xx)
and set the big N of the column headers:
&_bign1 Standard of Care|(N=xx)
&_bign2 Clinwrightinib 200 mg|(N=xx)
/work/_lib/clinwright.sas has %ls_bign, %ls_count, %ls_stats, %ls_npct, %ls_num.
----------------------------------------------------------------------------*/
libname adam "/work/adam" access=readonly;
%include "/work/_lib/clinwright.sas";
%ls_setup;
/* The shell's rows, in order, with each column's value pattern (_xx1-_xx2). */
data work._shell;
length _page 8 _pagelbl $200 _ord 8 _indent 8 _rowid $36 _kind $5 _var $32 rowlabel $200 _xx1 $40 _xx2 $40;
_page = 1; _pagelbl = '';
_ord=1; _indent=0; _rowid='0e46b051-84ce-45ba-ad9b-f7b0cdd0eab0'; _kind='label'; _var=''; rowlabel='Best overall response [a]'; _xx1=''; _xx2=''; output;
_ord=2; _indent=1; _rowid='4f7d7d5e-2eec-4f7e-bdc0-8a59ac859dea'; _kind='stat'; _var='AVALC'; rowlabel='Complete response (CR)'; _xx1='xx (xx.x%)'; _xx2='xx (xx.x%)'; output;
_ord=3; _indent=1; _rowid='da7686a3-8445-482f-8b06-46e74bdbfb1b'; _kind='stat'; _var='AVALC'; rowlabel='Partial response (PR)'; _xx1='xx (xx.x%)'; _xx2='xx (xx.x%)'; output;
_ord=4; _indent=1; _rowid='986747f8-e1e4-4fdf-adc2-8348c7a9db4f'; _kind='stat'; _var='AVALC'; rowlabel='Stable disease (SD)'; _xx1='xx (xx.x%)'; _xx2='xx (xx.x%)'; output;
_ord=5; _indent=1; _rowid='fdfbc0f5-6881-4b93-9042-1fcaee8cab69'; _kind='stat'; _var='AVALC'; rowlabel='Progressive disease (PD)'; _xx1='xx (xx.x%)'; _xx2='xx (xx.x%)'; output;
_ord=6; _indent=1; _rowid='145ace1c-841c-4073-9da2-1691d8d58e6a'; _kind='stat'; _var='AVALC'; rowlabel='Not evaluable (NE)'; _xx1='xx (xx.x%)'; _xx2='xx (xx.x%)'; output;
_ord=7; _indent=1; _rowid='a7a04abd-1ef9-484a-8358-ca6266387cbd'; _kind='stat'; _var='AVALC'; rowlabel='No assessment'; _xx1='xx (xx.x%)'; _xx2='xx (xx.x%)'; output;
_ord=8; _indent=0; _rowid='blank-8'; _kind='blank'; _var=''; rowlabel=''; _xx1=''; _xx2=''; output;
_ord=9; _indent=0; _rowid='2197a409-eb21-4bf7-b512-19ed8e9c6aa9'; _kind='stat'; _var=''; rowlabel='Objective response rate (CR + PR)'; _xx1='xx (xx.x%)'; _xx2='xx (xx.x%)'; output;
_ord=10; _indent=1; _rowid='ee456a61-0b26-4e11-b6d3-b40ec98b01a0'; _kind='stat'; _var=''; rowlabel='95% CI [b]'; _xx1='(xx.x, xx.x)'; _xx2='(xx.x, xx.x)'; output;
_ord=11; _indent=0; _rowid='blank-11'; _kind='blank'; _var=''; rowlabel=''; _xx1=''; _xx2=''; output;
_ord=12; _indent=0; _rowid='412fdea6-6890-4553-8aa1-f0f243906a8d'; _kind='stat'; _var=''; rowlabel='Disease control rate (CR + PR + SD)'; _xx1='xx (xx.x%)'; _xx2='xx (xx.x%)'; output;
_ord=13; _indent=1; _rowid='cd76b117-7b4e-42ac-a248-b514f2198373'; _kind='stat'; _var=''; rowlabel='95% CI [b]'; _xx1='(xx.x, xx.x)'; _xx2='(xx.x, xx.x)'; output;
run;
/*==== 10-data ====*/
/* Made from the output's analysis: the records of ADRS with PARAMCD = 'BOR' of the subjects of ADSL with ITTFL = 'Y', by TRT01P. */
/* The population's subjects, in each column they count in. */
data work._popc;
set adam.adsl(where=(ittfl = 'Y'));
if trt01p in ('Standard of Care') then do; _col = 1; output; end;
if trt01p in ('Clinwrightinib 200 mg') then do; _col = 2; output; end;
keep usubjid _col;
run;
data work._pop1; set adam.adsl(where=(ittfl = 'Y')); keep usubjid trt01p; run;
proc sort data=work._pop1; by usubjid; run;
/* The records of ADRS with PARAMCD = 'BOR', of the population's subjects, in each column. */
proc sort data=adam.adrs(keep=usubjid trt01p ittfl paramcd avalc where=(PARAMCD = 'BOR')) out=work._rec; by usubjid; run;
data work._an;
merge work._rec(in=_r drop=trt01p) work._pop1(in=_p);
by usubjid;
if _r and _p;
if trt01p in ('Standard of Care') then do; _col = 1; output; end;
if trt01p in ('Clinwrightinib 200 mg') then do; _col = 2; output; end;
run;
data work._cols; do _col = 1 to 2; output; end; run;
%ls_bign(data=work._popc, trt=_col, values=1|2|1|2, names=_lsn1 _lsn2 _bign1 _bign2);
/* Subjects and records per column. */
proc sort data=work._an(keep=usubjid _col) out=work._u; by _col usubjid; run;
data work._c;
set work._u;
by _col usubjid;
retain _n _e;
if first._col then do; _n = 0; _e = 0; end;
_e = _e + 1;
if first.usubjid then _n = _n + 1;
if last._col then output;
keep _col _n _e;
run;
proc transpose data=work._c out=work._tn(drop=_name_) prefix=_n; id _col; var _n; run;
proc transpose data=work._c out=work._te(drop=_name_) prefix=_e; id _col; var _e; run;
data work._z; _z = 1; run;
data work._g0;
merge work._z work._tn work._te;
array _nn{2} _n1-_n2;
array _ee{2} _e1-_e2;
do _i = 1 to 2; _nn{_i} = sum(_nn{_i}, 0); _ee{_i} = sum(_ee{_i}, 0); end;
_tot = sum(of _n1-_n2);
drop _i _z;
run;
/* Complete response (CR): npct of AVALC = CR. */
data work._f; set work._g0; do _col = 1 to 2; output; end; run;
proc sort data=work._an(keep=usubjid _col avalc where=(avalc = 'CR')) out=work._v; by _col usubjid; run;
data work._v;
set work._v;
by _col usubjid;
retain _vn _ve;
if first._col then do; _vn = 0; _ve = 0; end;
_ve = _ve + 1;
if first.usubjid then _vn = _vn + 1;
if last._col then output;
keep _col _vn _ve;
run;
proc sort data=work._an(keep=usubjid _col avalc where=(not missing(avalc))) out=work._d; by _col usubjid; run;
data work._d;
set work._d;
by _col usubjid;
retain _dn _de;
if first._col then do; _dn = 0; _de = 0; end;
_de = _de + 1;
if first.usubjid then _dn = _dn + 1;
if last._col then output;
keep _col _dn _de;
run;
data work._k1;
length _rowid $36 _label _pagelbl $200 _v $200;
merge work._f(in=_in) work._v work._d;
by _col;
if _in;
array _nn{2} _n1-_n2;
array _ee{2} _e1-_e2;
_rowid = '4f7d7d5e-2eec-4f7e-bdc0-8a59ac859dea';
_page = 1;
_pagelbl = '';
_k0 = 2;
_label = '';
_v = strip(ifc(missing(sum(_vn, 0)), '-', %ls_num(sum(_vn, 0), 0))) || ' (' || strip(ifc(missing(ifn(input(symget(cats('_lsn', _col)), 8.) > 0, 100 * sum(_vn, 0) / max(input(symget(cats('_lsn', _col)), 8.), 1), .)), '-', %ls_num(ifn(input(symget(cats('_lsn', _col)), 8.) > 0, 100 * sum(_vn, 0) / max(input(symget(cats('_lsn', _col)), 8.), 1), .), 1))) || '%)';
keep _rowid _label _page _pagelbl _k0 _col _v;
run;
/* Partial response (PR): npct of AVALC = PR. */
data work._f; set work._g0; do _col = 1 to 2; output; end; run;
proc sort data=work._an(keep=usubjid _col avalc where=(avalc = 'PR')) out=work._v; by _col usubjid; run;
data work._v;
set work._v;
by _col usubjid;
retain _vn _ve;
if first._col then do; _vn = 0; _ve = 0; end;
_ve = _ve + 1;
if first.usubjid then _vn = _vn + 1;
if last._col then output;
keep _col _vn _ve;
run;
proc sort data=work._an(keep=usubjid _col avalc where=(not missing(avalc))) out=work._d; by _col usubjid; run;
data work._d;
set work._d;
by _col usubjid;
retain _dn _de;
if first._col then do; _dn = 0; _de = 0; end;
_de = _de + 1;
if first.usubjid then _dn = _dn + 1;
if last._col then output;
keep _col _dn _de;
run;
data work._k2;
length _rowid $36 _label _pagelbl $200 _v $200;
merge work._f(in=_in) work._v work._d;
by _col;
if _in;
array _nn{2} _n1-_n2;
array _ee{2} _e1-_e2;
_rowid = 'da7686a3-8445-482f-8b06-46e74bdbfb1b';
_page = 1;
_pagelbl = '';
_k0 = 3;
_label = '';
_v = strip(ifc(missing(sum(_vn, 0)), '-', %ls_num(sum(_vn, 0), 0))) || ' (' || strip(ifc(missing(ifn(input(symget(cats('_lsn', _col)), 8.) > 0, 100 * sum(_vn, 0) / max(input(symget(cats('_lsn', _col)), 8.), 1), .)), '-', %ls_num(ifn(input(symget(cats('_lsn', _col)), 8.) > 0, 100 * sum(_vn, 0) / max(input(symget(cats('_lsn', _col)), 8.), 1), .), 1))) || '%)';
keep _rowid _label _page _pagelbl _k0 _col _v;
run;
/* Stable disease (SD): npct of AVALC = SD. */
data work._f; set work._g0; do _col = 1 to 2; output; end; run;
proc sort data=work._an(keep=usubjid _col avalc where=(avalc = 'SD')) out=work._v; by _col usubjid; run;
data work._v;
set work._v;
by _col usubjid;
retain _vn _ve;
if first._col then do; _vn = 0; _ve = 0; end;
_ve = _ve + 1;
if first.usubjid then _vn = _vn + 1;
if last._col then output;
keep _col _vn _ve;
run;
proc sort data=work._an(keep=usubjid _col avalc where=(not missing(avalc))) out=work._d; by _col usubjid; run;
data work._d;
set work._d;
by _col usubjid;
retain _dn _de;
if first._col then do; _dn = 0; _de = 0; end;
_de = _de + 1;
if first.usubjid then _dn = _dn + 1;
if last._col then output;
keep _col _dn _de;
run;
data work._k3;
length _rowid $36 _label _pagelbl $200 _v $200;
merge work._f(in=_in) work._v work._d;
by _col;
if _in;
array _nn{2} _n1-_n2;
array _ee{2} _e1-_e2;
_rowid = '986747f8-e1e4-4fdf-adc2-8348c7a9db4f';
_page = 1;
_pagelbl = '';
_k0 = 4;
_label = '';
_v = strip(ifc(missing(sum(_vn, 0)), '-', %ls_num(sum(_vn, 0), 0))) || ' (' || strip(ifc(missing(ifn(input(symget(cats('_lsn', _col)), 8.) > 0, 100 * sum(_vn, 0) / max(input(symget(cats('_lsn', _col)), 8.), 1), .)), '-', %ls_num(ifn(input(symget(cats('_lsn', _col)), 8.) > 0, 100 * sum(_vn, 0) / max(input(symget(cats('_lsn', _col)), 8.), 1), .), 1))) || '%)';
keep _rowid _label _page _pagelbl _k0 _col _v;
run;
/* Progressive disease (PD): npct of AVALC = PD. */
data work._f; set work._g0; do _col = 1 to 2; output; end; run;
proc sort data=work._an(keep=usubjid _col avalc where=(avalc = 'PD')) out=work._v; by _col usubjid; run;
data work._v;
set work._v;
by _col usubjid;
retain _vn _ve;
if first._col then do; _vn = 0; _ve = 0; end;
_ve = _ve + 1;
if first.usubjid then _vn = _vn + 1;
if last._col then output;
keep _col _vn _ve;
run;
proc sort data=work._an(keep=usubjid _col avalc where=(not missing(avalc))) out=work._d; by _col usubjid; run;
data work._d;
set work._d;
by _col usubjid;
retain _dn _de;
if first._col then do; _dn = 0; _de = 0; end;
_de = _de + 1;
if first.usubjid then _dn = _dn + 1;
if last._col then output;
keep _col _dn _de;
run;
data work._k4;
length _rowid $36 _label _pagelbl $200 _v $200;
merge work._f(in=_in) work._v work._d;
by _col;
if _in;
array _nn{2} _n1-_n2;
array _ee{2} _e1-_e2;
_rowid = 'fdfbc0f5-6881-4b93-9042-1fcaee8cab69';
_page = 1;
_pagelbl = '';
_k0 = 5;
_label = '';
_v = strip(ifc(missing(sum(_vn, 0)), '-', %ls_num(sum(_vn, 0), 0))) || ' (' || strip(ifc(missing(ifn(input(symget(cats('_lsn', _col)), 8.) > 0, 100 * sum(_vn, 0) / max(input(symget(cats('_lsn', _col)), 8.), 1), .)), '-', %ls_num(ifn(input(symget(cats('_lsn', _col)), 8.) > 0, 100 * sum(_vn, 0) / max(input(symget(cats('_lsn', _col)), 8.), 1), .), 1))) || '%)';
keep _rowid _label _page _pagelbl _k0 _col _v;
run;
/* Not evaluable (NE): npct of AVALC = NE. */
data work._f; set work._g0; do _col = 1 to 2; output; end; run;
proc sort data=work._an(keep=usubjid _col avalc where=(avalc = 'NE')) out=work._v; by _col usubjid; run;
data work._v;
set work._v;
by _col usubjid;
retain _vn _ve;
if first._col then do; _vn = 0; _ve = 0; end;
_ve = _ve + 1;
if first.usubjid then _vn = _vn + 1;
if last._col then output;
keep _col _vn _ve;
run;
proc sort data=work._an(keep=usubjid _col avalc where=(not missing(avalc))) out=work._d; by _col usubjid; run;
data work._d;
set work._d;
by _col usubjid;
retain _dn _de;
if first._col then do; _dn = 0; _de = 0; end;
_de = _de + 1;
if first.usubjid then _dn = _dn + 1;
if last._col then output;
keep _col _dn _de;
run;
data work._k5;
length _rowid $36 _label _pagelbl $200 _v $200;
merge work._f(in=_in) work._v work._d;
by _col;
if _in;
array _nn{2} _n1-_n2;
array _ee{2} _e1-_e2;
_rowid = '145ace1c-841c-4073-9da2-1691d8d58e6a';
_page = 1;
_pagelbl = '';
_k0 = 6;
_label = '';
_v = strip(ifc(missing(sum(_vn, 0)), '-', %ls_num(sum(_vn, 0), 0))) || ' (' || strip(ifc(missing(ifn(input(symget(cats('_lsn', _col)), 8.) > 0, 100 * sum(_vn, 0) / max(input(symget(cats('_lsn', _col)), 8.), 1), .)), '-', %ls_num(ifn(input(symget(cats('_lsn', _col)), 8.) > 0, 100 * sum(_vn, 0) / max(input(symget(cats('_lsn', _col)), 8.), 1), .), 1))) || '%)';
keep _rowid _label _page _pagelbl _k0 _col _v;
run;
/* No assessment: npct of AVALC = MISSING. */
data work._f; set work._g0; do _col = 1 to 2; output; end; run;
proc sort data=work._an(keep=usubjid _col avalc where=(avalc = 'MISSING')) out=work._v; by _col usubjid; run;
data work._v;
set work._v;
by _col usubjid;
retain _vn _ve;
if first._col then do; _vn = 0; _ve = 0; end;
_ve = _ve + 1;
if first.usubjid then _vn = _vn + 1;
if last._col then output;
keep _col _vn _ve;
run;
proc sort data=work._an(keep=usubjid _col avalc where=(not missing(avalc))) out=work._d; by _col usubjid; run;
data work._d;
set work._d;
by _col usubjid;
retain _dn _de;
if first._col then do; _dn = 0; _de = 0; end;
_de = _de + 1;
if first.usubjid then _dn = _dn + 1;
if last._col then output;
keep _col _dn _de;
run;
data work._k6;
length _rowid $36 _label _pagelbl $200 _v $200;
merge work._f(in=_in) work._v work._d;
by _col;
if _in;
array _nn{2} _n1-_n2;
array _ee{2} _e1-_e2;
_rowid = 'a7a04abd-1ef9-484a-8358-ca6266387cbd';
_page = 1;
_pagelbl = '';
_k0 = 7;
_label = '';
_v = strip(ifc(missing(sum(_vn, 0)), '-', %ls_num(sum(_vn, 0), 0))) || ' (' || strip(ifc(missing(ifn(input(symget(cats('_lsn', _col)), 8.) > 0, 100 * sum(_vn, 0) / max(input(symget(cats('_lsn', _col)), 8.), 1), .)), '-', %ls_num(ifn(input(symget(cats('_lsn', _col)), 8.) > 0, 100 * sum(_vn, 0) / max(input(symget(cats('_lsn', _col)), 8.), 1), .), 1))) || '%)';
keep _rowid _label _page _pagelbl _k0 _col _v;
run;
/* Objective response rate (CR + PR): npct where AVALC in ('CR', 'PR'). */
data work._f; set work._g0; do _col = 1 to 2; output; end; run;
proc sort data=work._an(keep=usubjid _col avalc where=(AVALC in ('CR', 'PR'))) out=work._v; by _col usubjid; run;
data work._v;
set work._v;
by _col usubjid;
retain _vn _ve;
if first._col then do; _vn = 0; _ve = 0; end;
_ve = _ve + 1;
if first.usubjid then _vn = _vn + 1;
if last._col then output;
keep _col _vn _ve;
run;
proc sort data=work._an(keep=usubjid _col avalc where=(1)) out=work._d; by _col usubjid; run;
data work._d;
set work._d;
by _col usubjid;
retain _dn _de;
if first._col then do; _dn = 0; _de = 0; end;
_de = _de + 1;
if first.usubjid then _dn = _dn + 1;
if last._col then output;
keep _col _dn _de;
run;
data work._k7;
length _rowid $36 _label _pagelbl $200 _v $200;
merge work._f(in=_in) work._v work._d;
by _col;
if _in;
array _nn{2} _n1-_n2;
array _ee{2} _e1-_e2;
_rowid = '2197a409-eb21-4bf7-b512-19ed8e9c6aa9';
_page = 1;
_pagelbl = '';
_k0 = 9;
_label = '';
_v = strip(ifc(missing(sum(_vn, 0)), '-', %ls_num(sum(_vn, 0), 0))) || ' (' || strip(ifc(missing(ifn(input(symget(cats('_lsn', _col)), 8.) > 0, 100 * sum(_vn, 0) / max(input(symget(cats('_lsn', _col)), 8.), 1), .)), '-', %ls_num(ifn(input(symget(cats('_lsn', _col)), 8.) > 0, 100 * sum(_vn, 0) / max(input(symget(cats('_lsn', _col)), 8.), 1), .), 1))) || '%)';
keep _rowid _label _page _pagelbl _k0 _col _v;
run;
/* 95% CI [b]: ci_exact where AVALC in ('CR', 'PR'). */
data work._f; set work._g0; do _col = 1 to 2; output; end; run;
proc sort data=work._an(keep=usubjid _col avalc where=(AVALC in ('CR', 'PR'))) out=work._v; by _col usubjid; run;
data work._v;
set work._v;
by _col usubjid;
retain _vn _ve;
if first._col then do; _vn = 0; _ve = 0; end;
_ve = _ve + 1;
if first.usubjid then _vn = _vn + 1;
if last._col then output;
keep _col _vn _ve;
run;
proc sort data=work._an(keep=usubjid _col avalc where=(1)) out=work._d; by _col usubjid; run;
data work._d;
set work._d;
by _col usubjid;
retain _dn _de;
if first._col then do; _dn = 0; _de = 0; end;
_de = _de + 1;
if first.usubjid then _dn = _dn + 1;
if last._col then output;
keep _col _dn _de;
run;
data work._k8;
length _rowid $36 _label _pagelbl $200 _v $200;
merge work._f(in=_in) work._v work._d;
by _col;
if _in;
array _nn{2} _n1-_n2;
array _ee{2} _e1-_e2;
_rowid = 'ee456a61-0b26-4e11-b6d3-b40ec98b01a0';
_page = 1;
_pagelbl = '';
_k0 = 10;
_label = '';
_v = '(' || strip(ifc(missing(100 * ls_cp_lower(sum(_vn, 0), input(symget(cats('_lsn', _col)), 8.), 0.05)), '-', %ls_num(100 * ls_cp_lower(sum(_vn, 0), input(symget(cats('_lsn', _col)), 8.), 0.05), 1))) || ', ' || strip(ifc(missing(100 * ls_cp_upper(sum(_vn, 0), input(symget(cats('_lsn', _col)), 8.), 0.05)), '-', %ls_num(100 * ls_cp_upper(sum(_vn, 0), input(symget(cats('_lsn', _col)), 8.), 0.05), 1))) || ')';
keep _rowid _label _page _pagelbl _k0 _col _v;
run;
/* Disease control rate (CR + PR + SD): npct where AVALC in ('CR', 'PR', 'SD'). */
data work._f; set work._g0; do _col = 1 to 2; output; end; run;
proc sort data=work._an(keep=usubjid _col avalc where=(AVALC in ('CR', 'PR', 'SD'))) out=work._v; by _col usubjid; run;
data work._v;
set work._v;
by _col usubjid;
retain _vn _ve;
if first._col then do; _vn = 0; _ve = 0; end;
_ve = _ve + 1;
if first.usubjid then _vn = _vn + 1;
if last._col then output;
keep _col _vn _ve;
run;
proc sort data=work._an(keep=usubjid _col avalc where=(1)) out=work._d; by _col usubjid; run;
data work._d;
set work._d;
by _col usubjid;
retain _dn _de;
if first._col then do; _dn = 0; _de = 0; end;
_de = _de + 1;
if first.usubjid then _dn = _dn + 1;
if last._col then output;
keep _col _dn _de;
run;
data work._k9;
length _rowid $36 _label _pagelbl $200 _v $200;
merge work._f(in=_in) work._v work._d;
by _col;
if _in;
array _nn{2} _n1-_n2;
array _ee{2} _e1-_e2;
_rowid = '412fdea6-6890-4553-8aa1-f0f243906a8d';
_page = 1;
_pagelbl = '';
_k0 = 12;
_label = '';
_v = strip(ifc(missing(sum(_vn, 0)), '-', %ls_num(sum(_vn, 0), 0))) || ' (' || strip(ifc(missing(ifn(input(symget(cats('_lsn', _col)), 8.) > 0, 100 * sum(_vn, 0) / max(input(symget(cats('_lsn', _col)), 8.), 1), .)), '-', %ls_num(ifn(input(symget(cats('_lsn', _col)), 8.) > 0, 100 * sum(_vn, 0) / max(input(symget(cats('_lsn', _col)), 8.), 1), .), 1))) || '%)';
keep _rowid _label _page _pagelbl _k0 _col _v;
run;
/* 95% CI [b]: ci_exact where AVALC in ('CR', 'PR', 'SD'). */
data work._f; set work._g0; do _col = 1 to 2; output; end; run;
proc sort data=work._an(keep=usubjid _col avalc where=(AVALC in ('CR', 'PR', 'SD'))) out=work._v; by _col usubjid; run;
data work._v;
set work._v;
by _col usubjid;
retain _vn _ve;
if first._col then do; _vn = 0; _ve = 0; end;
_ve = _ve + 1;
if first.usubjid then _vn = _vn + 1;
if last._col then output;
keep _col _vn _ve;
run;
proc sort data=work._an(keep=usubjid _col avalc where=(1)) out=work._d; by _col usubjid; run;
data work._d;
set work._d;
by _col usubjid;
retain _dn _de;
if first._col then do; _dn = 0; _de = 0; end;
_de = _de + 1;
if first.usubjid then _dn = _dn + 1;
if last._col then output;
keep _col _dn _de;
run;
data work._k10;
length _rowid $36 _label _pagelbl $200 _v $200;
merge work._f(in=_in) work._v work._d;
by _col;
if _in;
array _nn{2} _n1-_n2;
array _ee{2} _e1-_e2;
_rowid = 'cd76b117-7b4e-42ac-a248-b514f2198373';
_page = 1;
_pagelbl = '';
_k0 = 13;
_label = '';
_v = '(' || strip(ifc(missing(100 * ls_cp_lower(sum(_vn, 0), input(symget(cats('_lsn', _col)), 8.), 0.05)), '-', %ls_num(100 * ls_cp_lower(sum(_vn, 0), input(symget(cats('_lsn', _col)), 8.), 0.05), 1))) || ', ' || strip(ifc(missing(100 * ls_cp_upper(sum(_vn, 0), input(symget(cats('_lsn', _col)), 8.), 0.05)), '-', %ls_num(100 * ls_cp_upper(sum(_vn, 0), input(symget(cats('_lsn', _col)), 8.), 0.05), 1))) || ')';
keep _rowid _label _page _pagelbl _k0 _col _v;
run;
data work._cells; set work._k1 work._k2 work._k3 work._k4 work._k5 work._k6 work._k7 work._k8 work._k9 work._k10; run;
proc sort data=work._cells; by _page _pagelbl _k0 _rowid _label _col; run;
proc transpose data=work._cells out=work._wide(drop=_name_) prefix=col;
by _page _pagelbl _k0 _rowid _label;
id _col;
var _v;
run;
proc sort data=work._wide; by _rowid; run;
proc sort data=work._shell(drop=_page _pagelbl) out=work._rows; by _rowid; run;
data work._inst;
merge work._wide(in=_w) work._rows(in=_s);
by _rowid;
if _w and _s;
if _label ne '' then rowlabel = _label;
run;
data work._fixed;
set work._shell;
if _rowid not in ('4f7d7d5e-2eec-4f7e-bdc0-8a59ac859dea' 'da7686a3-8445-482f-8b06-46e74bdbfb1b' '986747f8-e1e4-4fdf-adc2-8348c7a9db4f' 'fdfbc0f5-6881-4b93-9042-1fcaee8cab69' '145ace1c-841c-4073-9da2-1691d8d58e6a' 'a7a04abd-1ef9-484a-8358-ca6266387cbd' '2197a409-eb21-4bf7-b512-19ed8e9c6aa9' 'ee456a61-0b26-4e11-b6d3-b40ec98b01a0' '412fdea6-6890-4553-8aa1-f0f243906a8d' 'cd76b117-7b4e-42ac-a248-b514f2198373');
_k0 = _ord;
run;
data work.final;
length col1 col2 $200 _pagelbl $200;
set work._inst work._fixed;
run;
proc sort data=work.final; by _page _k0; run;
data work.final;
set work.final;
_ord = _n_;
keep _page _pagelbl _ord _indent _rowid _kind rowlabel col1 col2;
run;
/*==== 90-report ====*/
/* 90-report: from the shell; the titles, columns, headers and footnotes are not changed here. */
%ls_need(_bign1 _bign2);
%ls_final_check(columns=_page _pagelbl _ord _indent _rowid _kind rowlabel col1 col2);
proc sort data=work.final out=work._report; by _page _ord; run;
data work._report;
set work._report;
/* Two spaces per step of indentation: the label column keeps leading spaces (asis=on). */
if _indent > 0 then rowlabel = repeat(' ', 2 * _indent - 1) || rowlabel;
run;
%let _lspaged = 0;
proc sql noprint; select count(*) into :_lspaged trimmed from work._report where _pagelbl ne ''; quit;
options orientation=portrait;
ods listing close;
ods rtf file="/work/out/t-14-2-5-2.rtf" style=journal;
title1 j=l "ONCO-EX" j=r "Page ~{thispage} of ~{lastpage}";
title2 j=c "Table 14.2.5.2";
title3 j=c "Best Overall Response (Confirmation Not Required) by Investigator";
title4 j=c "Intent-to-Treat Analysis Set";
footnote1 j=l "[a] RECIST 1.1, by the investigator; responses need no confirmation. Stable disease is at least 6 weeks after the start of treatment.";
footnote2 j=l "[b] Exact (Clopper-Pearson) 95% confidence interval.";
footnote3 j=l "Percentages are of the subjects in each column (N).";
footnote4 j=l "Source: ADRS.";
footnote5 j=l "Program: t-14-2-5-2.sas";
%macro _ls_report;
proc report data=work._report nowd split='|' missing style(report)={width=100%};
column _page _pagelbl _ord _indent _kind rowlabel col1 col2;
define _page / order order=internal noprint;
define _pagelbl / order noprint;
define _ord / order order=internal noprint;
define _indent / display noprint;
define _kind / display noprint;
define rowlabel / display "" style(column)={cellwidth=40% asis=on} style(header)={just=l};
define col1 / display "Standard of Care|(N=&_bign1.)" style(column)={cellwidth=30% just=c} style(header)={just=c};
define col2 / display "Clinwrightinib 200 mg|(N=&_bign2.)" style(column)={cellwidth=30% just=c} style(header)={just=c};
%if &_lspaged > 0 %then %do;
compute before _pagelbl / style={just=l};
line _pagelbl $200.;
endcomp;
%end;
break after _page / page;
run;
%mend _ls_report;
%_ls_report;
ods rtf close;
ods listing;
%ls_final_export;