안녕하세요,
저는 시간 경과에 따라 여러 제품 그룹을 조건화했지만 초기 조건이 동일한 일부 데이터의 추세를 분석하려고 합니다. 같은 열에 여러 다른 범주에 적용할 수 있는 하나의 범주가 있을 수 있습니다. 즉, 아래의 각 줄을 초기 조건 그룹에 연결하려고 합니다.
</CODE></PRE></LINGO-BODY><LINGO-LABS id="lingo-labs-813112" slang="en-US" mode="CREATE"><LINGO-LABEL>기본 데이터 분석 및 모델링</LINGO-LABEL><LINGO-LABEL>데이터 탐색 및 시각화</LINGO-LABEL></LINGO-LABS><LINGO-SUB id="lingo-sub-813122" slang="en-US" mode="CREATE">Re: 동일한 초기 조건을 가진 여러 그룹 플로팅</LINGO-SUB><LINGO-BODY id="lingo-body-813122" slang="en-US" mode="CREATE"><P>귀하의 데이터는 어떻게 구성되어 있나요?</P></LINGO-BODY><LINGO-SUB id="lingo-sub-813123" slang="en-US" mode="CREATE">Re: 동일한 초기 조건을 가진 여러 그룹 플로팅</LINGO-SUB><LINGO-BODY id="lingo-body-813123" slang="en-US" mode="CREATE"><P>그래프 작성을 위해, 각 그룹에 대해 대조군 데이터를 복제하여 표시하려는 경향이 있습니다.</P></LINGO-BODY><LINGO-SUB id="lingo-sub-813247" slang="en-US" mode="CREATE">Re: 동일한 초기 조건을 가진 여러 그룹 플로팅</LINGO-SUB><LINGO-BODY id="lingo-body-813247" slang="en-US" mode="CREATE"><P><A href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687" target="_blank">@txnelson</A> 에 동의합니다. 또한 선을 표시하려면 그룹당 <STRONG>하나의 데이터 포인트를 데이터 세트에 중앙값(또는 평균)과 함께 추가하는</STRONG> 것으로 충분합니다.<BR /><BR /> 반면에 이런 일이 이루어져야 한다는 것은 놀라운 일입니다.<BR /> 각 그룹에는 여러 시간 단계에 대한 데이터가 있으므로 0h 데이터도 사용할 수 있어야 하며, <U>별도</U> 의 "0h 데이터 세트"는 사용할 수 없습니다.</P><P>- 0h 데이터를 그룹별 실행과 별도로 가져오는 경우, 그룹의 0h 데이터가 0h 데이터 세트의 0h 데이터와 일치한다는 것을 어떻게 보장할 수 있습니까?<BR /> - 그룹이 0h 데이터 세트의 하위 집합인 경우, 그들이 구별 불가능하다는 것을 어떻게 보장합니까? 최악의 경우: 그룹 30/35는 샘플의 하위 20%에 해당하고, 조건 50/50은 상위 20%에 해당합니다.</P></LINGO-BODY><LINGO-SUB id="lingo-sub-813439" slang="en-US" mode="UPDATE">Re: 동일한 초기 조건을 가진 여러 그룹 플로팅</LINGO-SUB><LINGO-BODY id="lingo-body-813439" slang="en-US" mode="UPDATE"><P>여러 저장 조건에서 안정성 데이터를 위한 꽤 일반적인 데이터 준비 단계입니다. 아래에 설명된 대로 이를 수행하는 일반적인 절차는 다음과 같습니다.</P><OL><LI>저장 조건을 별도의 표에 요약합니다.</LI><LI>원래 표의 마지막에 있는 해당 조건을 충족하고 해당 행의 시간 지점을 초기 시간 지점으로 설정합니다.</LI><LI>시작 시점의 평균 반응을 계산하고 그 값을 위에 붙여넣은 모든 행에 사용합니다.</LI><LI>데이터 표에서 원래의 초기 시간점을 삭제하거나 숨기거나 제외합니다.</LI></OL><P>최근에 이 작업을 자동화하는 데 도움이 되는 스크립트를 우연히 완성했습니다(어떤 보장이나 품질보증도 제공하지 않습니다).</P><P> </P><PRE><CODE class=" language-jsl">Names Default To Here( 1 );
// utility to replicate stability condition labels and variables at time Zero for each stabilty condition
dt = Current Data Table();
timelistdisplay = 0;
nw = New Window( "Replicate Initial Time Point Results Across Conditions",
hb = H List Box(
pb_1 = Panel Box( "Select Columns", clb_1 = Col List Box( all ) ),
pb_2 = Panel Box( "Case Column into Role",
lub_variables = Lineup Box( N Col( 2 ),
Button Box( "Time Column",
Try(
clb_time << append( clb_1 << get selected );
c_time_name = (clb_time << get items)[1];
);
c_time = Column( dt, c_time_name );
time_list = Associative Array( As List( (c_time << get values) ) ) << get keys;
For Each( {s, i}, time_list, time_list[i] = Char( s ) );
If( !timelistdisplay,
pb_2 << Append(
hb_timelist = H List Box( Text Box( "Initial Time Point to Replicate" ), combox = Combo Box( {} ) )
);
timelistdisplay = 1;
);
combox << set items( time_list );
),
clb_time = Col List Box( "numeric", Max Items( 1 ), nlines( 1 ), minItems( 1 ) ),
Button Box( "Stability Condition Columns", clb_stabcond << append( clb_1 << get selected ) ),
clb_stabcond = Col List Box( Min Items( 1 ), nLines( 4 ) ),
Button Box( "Response Columns", clb_response << append( clb_1 << get selected ) ),
clb_response = Col List Box( minItems( 1 ), nlines( 5 ) ),
)
),
pb_3 = Panel Box( "Actions",
V List Box(
Button Box( "OK",
responsecols = clb_response << get items;
// check that all boxes are populated and if so, then do actions
If(
N Items( clb_time << get items ) & N Items( clb_stabcond << get items ) &
N Items( clb_response << get items ),
// make list of column references for the stability condition columns
dt << clear select;
Eval(
Substitute(
Expr(
dt << select where( As Column( dt, c_time_name ) != vvv )
),
Expr( vvv ),
Num( combox << get selected )
)
);
dt_sub = dt << Subset( Selected Rows( 1 ), Selected columns only( 0 ) );
stab_cond_col_list = {};
For Each( {s, i}, clb_stabcond << get items, Insert Into( stab_cond_col_list, Column( dt, s ) ) );
dt_summary = dt_sub << Summary(
Group( stab_cond_col_list ),
Freq( "None" ),
Weight( "None" ),
Link to original data table( 0 ),
output table name( "Stability Conditions" )
);
dt_summary << delete columns( :N Rows );
Close( dt_sub, nosave );
cnew = dt_summary << New Column();
cnew << set name( c_time_name );
timezero = Num( combox << get selected );
cnew << Set Values( J( N Row( dt_summary ), 1, timezero ) );
dt << clear select;
// get the results for time zero
Eval(
Substitute(
Expr(
dt << select where( As Column( dt, c_time_name ) == vvv )
),
Expr( vvv ),
Num( combox << get selected )
)
);
// add those to the summary table of conditions
For Each( {rc}, responsecols,
val = Mean( Column( dt, rc )[dt << get selected rows] );
c = dt_summary << New Column( rc );
c << set values( J( N Rows( dt_summary ), 1, val ) );
);
// hide and exclude the initial values results in the first table
dt << hide and exclude;
dt << clear select;
// now concatenate the summary table onto the original table.
dt << Concatenate( dt_summary, Append to first table );
close(dt_summary, nosave);
nw<<CLOSE window=""></CLOSE>Example: (also attached)
<SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MathStatChem_1-1731704006225.png" style="width: 999px;"><span class="lia-inline-image-display-wrapper" image-alt="MathStatChem_1-1731704006225.png" style="width: 999px;"><img src="https://us.v-cdn.net/6038925/uploads/images/70256i4E461D2F9CFB7556/MathStatChem_1-1731704006225.png" role="button" title="MathStatChem_1-1731704006225.png" alt="MathStatChem_1-1731704006225.png" /></span></SPAN>
Dialog:
<SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MathStatChem_2-1731704075831.png" style="width: 999px;"><span class="lia-inline-image-display-wrapper" image-alt="MathStatChem_2-1731704075831.png" style="width: 999px;"><img src="https://us.v-cdn.net/6038925/uploads/images/70257i6FDA957D441996BE/MathStatChem_2-1731704075831.png" role="button" title="MathStatChem_2-1731704075831.png" alt="MathStatChem_2-1731704075831.png" /></span></SPAN>
Result:
<SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MathStatChem_3-1731704134924.png" style="width: 999px;"><span class="lia-inline-image-display-wrapper" image-alt="MathStatChem_3-1731704134924.png" style="width: 999px;"><img src="https://us.v-cdn.net/6038925/uploads/images/70258i63CBC9328FC01167/MathStatChem_3-1731704134924.png" role="button" title="MathStatChem_3-1731704134924.png" alt="MathStatChem_3-1731704134924.png" /></span></SPAN>