임상 시험 데이터의주기 마커
테이퍼 다운주기를위한 스크립트 솔루션 및 애드 인
일부 시험에서, 대상체는 고용량에서 저용량으로 테이퍼 진 일련의 용량을 받는다. 시험에 따라, 대상체는 여러 세트의 테이퍼 용량을받을 수있다. 사이클을 식별하거나 레이블을 지정하는 것은 현재 수동 작업이나 복잡한 작업이 프로그래밍 방식으로 수행되는 경우 지루한 작업입니다. 이 블로그에서는 사이클 마커 주석을 JMP 테이블에 추가하는 방법에 대해 설명합니다. 이 버전의 솔루션은 누락 된 선량 데이터 및 중복 선량에 강력하도록 스크립팅되었습니다. 스크립트 된 솔루션은 JMP 애드 인에 포함되어 있으며 열 표시기를 추가하기위한 스크립트없는 열 대화 상자 기반 방법을 제공합니다.
names default to here(1);
dt = Current Data Table();
//dt = Open( "cm Subset for Cycle Marker Script Testing 2.jmp" );
cnames = dt << Get Column Names( String );
cd = Column Dialog(
colid = ColList( "Unique Subject ID", max Col( 1 ) ),
colcmd = ColList( "CM Dose", max Col( 1 ) ),
colseq = ColList( "CM Dose Sequence", max Col( 1 ) ),
Text Box(
"Note: Data will be sorted by USUBJID and CMSEQ.
A Cycle Marker column will be added to the end of the data table."
)
);
Eval( cd[1] );
Eval( cd[2] );
Eval( cd[3] );
Show( colid, colcmd, colseq );
cols = Expr( columns() );
subs = Expr(
subset( all rows, private )
//subset( all rows )
);
Insert Into( cols, colid[1] );
Insert Into( cols, colcmd[1] );
Insert Into( cols, colseq[1] );
Insert Into( subs, Eval Expr( cols ) );
Show( subs );
dt ss = subs;
dt ss so = dtss << Sort(
By( colid[1], colseq[1] ),
Order( Ascending, Ascending ),
Output Table( "Sorted cm" ),private
//Output Table( "Sorted cm" )
);
Close( dtss, nosave ); //don't need dtss anymore
//Technically we don't know the actual names of the columns yet
Eval Expr( colid[1] ) << set name( "USUBJID" );
Eval Expr( colcmd[1] ) << set name( "CMDOSE" );
Eval Expr( colseq[1] ) << set name( "CMSEQ" );
checkunique = Expr(
dtssso << New Column( "UniquieCheck", formula( :USUBJID || " " || Char( :CMSEQ ) ) );
dtssso << New Column( "UC_Count", formula( Col Number( :Name( "UniquieCheck" ), :Name( "UniquieCheck" ) ) ) );
);
makecm = Expr(
dtssso << New Column( "Cycle Marker",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula(
If( Row() == 1,
1,
If( :USUBJID != Lag( :USUBJID, 1 ),
1,
If( Is Missing( :CMDOSE ) == 1,
Lag( :Cycle Marker, 1 ),
If( :CMDOSE <= Lag( :CMDOSE, 1 ) | Is Missing( Lag( :CMDOSE, 1 ) == 1 ),
Lag( :Cycle Marker, 1 ),
Lag( :Cycle Marker, 1 ) + 1
)
)
)
)
),
Set Selected,
Set Display Width( 61 )
)
);
checkunique;
update cm with cycle marker=expr(dt <<
Update(
With( dtssso ),
Match Columns( colid[1] = :USUBJID, colseq[1] = :CMSEQ ),
Add Columns from Update Table( :Cycle Marker )
););
If( Col Maximum( dtssso:UC_Count ) > 1,
error=New Window( "ERROR", Text Box( "Duplicated data detected across uniquie subject ID and CM sequence" ),
buttonbox("Acknowledge", error<<CLOSEWINDOW></CLOSEWINDOW>
If( Row() == 1,
1,
If( :USUBJID != Lag( :USUBJID, 1 ),
1,
If( Is Missing( :CMDOSE ) == 1,
Lag( :Cycle Marker, 1 ),
If( :CMDOSE <= Lag( :CMDOSE, 1 ) | Is Missing( Lag( :CMDOSE, 1 ) == 1 ),
Lag( :Cycle Marker, 1 ),
Lag( :Cycle Marker, 1 ) + 1
)
)
)
)