BookmarkSubscribeRSS Feed
kiranp
Calcite | Level 5

Example from Analysis of Clinical trials using SAS, part 6 Interim Data Monitoring

Trying to re-run PROGRAM 6.10 Conditional power tests at the first interim look in Case study 3
using following code:

proc seqdesign altref=0.09;
design method=errfuncobf
nstages=2
info=cum(0.24 1)
alt=upper
stop=reject
alpha=0.1
beta=0.2;
samplesize model(ceiladjdesign=include)
=twosamplefreq(nullprop=0.70 test=prop ref=avgprop);
ods output adjustedboundary=obf_boundary;
run;

data sevsep1;
input _stage_ treatment nobs nsurv;
datalines;
1 1 55 33
1 0 45 29
run;

proc genmod data=sevsep1;
model nsurv/nobs= treatment / dist=bin link=identity;
ods output nobs=ntotal parameterestimates=parmest;
run;

data ntotal;
set ntotal;
nobs= n;
if (label='Number of Trials');
keep nobs;
run;

data parms;
set parmest;
if parameter='treatment';
_scale_='MLE';
keep _scale_ parameter estimate;
run;

data parms;
_stage_=1;
merge ntotal parms;
run;

proc seqtest boundary=obf_boundary
parms(testvar=treatment infovar=nobs)=parms
boundaryadj=errfuncobf
boundarykey=alpha
nstages=2
order=stagewise
condpower(type=finalstage);
run;

I get an error message running the very last SEQTEST statement and I can't figure out what is wrong.

"ERROR: The parameter variable (Effect, Parm, Parameter, or Variable) in the PARMS= data set does not contain the test variable specified in
the TESTVAR= option."

Can someone help me out? Many thanks in advance.

2 REPLIES 2
Patrick
Opal | Level 21

I know nothing about the procs you are using but just based on your code and the error message it looks to me that you've got a variable parameter in your parms data set but you then use the value of this variable instead of its name in proc seqtest.

 

Just based on how things look like I'd expect instead of using the variable value treatment....

parms(testvar=treatment infovar=nobs)=parms

...SAS expects you to use the name of the variable you've created in the parms file - parameter...

parms(testvar=parameter infovar=nobs)=parms

 

StatDave
SAS Super FREQ

You don't need to include the number of trials in the data going into SEQTEST. That information is contained in the standard error, which you do need to include. So, you can replace you code between GENMOD and SEQTEST with just the following.

data parms;
set parmest;
if parameter='treatment';
_scale_='MLE';
_stage_=1;
keep _stage_ _scale_ parameter estimate stderr;
run;

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1045 views
  • 1 like
  • 3 in conversation