JSL을 사용하여 Fit Curve 플랫폼에서 적합 매개변수를 추출하는 방법에 대한 도움말입니다.저는 JSL 코딩을 시작한 지 얼마 되지 않아 Fit Curve 플랫폼 관련 워크플로우 자동화에 어려움을 겪고 있습니다. 자동화하려는 워크플로우는 다음과 같습니다.
1단계: X, Y, BY 데이터를 입력하여 곡선 지수 2P 모델을 데이터에 맞춥니다. 아래 스크립트 코드가 정상적으로 작동합니다.
2단계: 적합 매개변수(척도 및 성장률, "a"와 "b"로 간단하게 표현되면 더 좋겠지만 )를 각 샘플 ID별로 수집하고, "샘플 ID", "척도" 또는 "a", "성장률" 또는 "b", "데이터 포인트 수"(적합에 사용됨) 열이 있는 새 테이블을 생성합니다.
- 제가 어려움을 겪고 있는 부분은 바로 이겁니다. 적절한 헤더를 사용하여 새 테이블을 만드는 것은 가능하지만(아래 스크립트 참조), 각 샘플 ID에 대한 적합도 값을 추출하여 해당 값을 각 샘플 ID별로 한 행에 채우는 방법을 모르겠습니다. JMP 어시스턴트와 Claude를 사용하여 코딩을 시도해 봤지만, 둘 다 보고서에서 이 정보를 추출하는 데 어려움을 겪었습니다.
3단계: 이 새 표에 "TOS=60에서의 예측값"과 "예측 불확실성"이라는 두 개의 열을 추가하고, 예측에는 지수 2P 공식(y= a*exp(b*x))을 사용하고, 매개변수의 적합 오차를 사용하여 TOS=60에서의 값의 불확실성을 추정합니다.
도움 주셔서 감사합니다.
데이브
New Column( "Conversion at 60 hr", Numeric, Continuous ),
New Column( "Error of Estimate", Numeric, Continuous )
);Fit Curve(
Y( :Conversion ),
X( :TOS ),
Fit Exponential 2P,
By( :Sample ID )
);<BR />results_dt = New Table( "Exponential Fit Results",<BR />Add Rows( 0 ),<BR />New Column( "Sample ID" ),<BR />New Column( "a", Numeric, Continuous ),<BR />New Column( "b", Numeric, Continuous ),<BR /><CODE class="language-jsl">New Column( "Number of Points", Numeric, Continuous ),
자동화 및 스크립팅제목: JSL을 사용하여 Fit Curve 플랫폼에서 적합 매개변수를 추출하는 데 대한 도움말결과 테이블 중 하나를 마우스 오른쪽 버튼으로 클릭하고, 결합된 데이터 테이블로 만드세요.

그리고 생성된 표에서 "데이터 결합 표 만들기"라는 표 스크립트를 가져올 수 있습니다. 이를 통해 어떤 작업을 수행할 수 있는지 잘 알 수 있습니다.
Names Default To Here(1);
rpt = New Window("Bioassay - Fit Curve of Toxicity by log Conc",
Data Table("Bioassay") << Fit Curve(
Y(:Toxicity),
X(:log Conc),
Fit Exponential 2P,
By(:Formulation)
)
);
Wait(0);
rpt["Fit Curve", "Formulation=standard", "Exponential 2P", "Parameter Estimates",
Table Box(1)] << Make Combined Data Table;
rpt << Close Window;

이 표에서 요약, 분할 및 업데이트와 같은 다양한 표 플랫폼을 사용하여 최종 표를 만들 수 있습니다.


제목: JSL을 사용하여 Fit Curve 플랫폼에서 적합 매개변수를 추출하는 데 대한 도움말답변 감사합니다. 저도 그 방법을 고려하고 있었는데, 테이블 전체를 가져와서 필요에 맞게 재구성하는 대신 각 테이블에서 변수만 직접 추출하는 방법이 있을 거라고 생각했습니다. 명확한 설명도 정말 도움이 되었습니다.
제목: JSL을 사용하여 Fit Curve 플랫폼에서 적합 매개변수를 추출하는 데 대한 도움말그렇게 해도 되지만, 보통은 먼저 표 형식으로 변환한 다음 그 다음 단계로 넘어가는 것이 더 쉽습니다.
제목: JSL을 사용하여 Fit Curve 플랫폼에서 적합 매개변수를 추출하는 데 대한 도움말다음은 XPath를 사용하여 보고서 구조를 검색하는 또 다른 접근 방식입니다. 이 방법이 더 쉽다고는 할 수 없지만, 예상치 못한 상황(예: 세 번째 테이블이 더 이상 세 번째 테이블이 아닌 경우)이 발생했을 때 단순히 잘못된 값을 반환하는 대신 명확하게 오류를 발생시켜 더 안정적이라는 것을 알게 되었습니다. 특히 예상치 못한 값이 나타날 경우 오류를 발생시키는 검사를 추가하면 더욱 효과적입니다. 개인적으로는 이 기능이 더 쉬워져야 한다고 생각하기 때문에, 최소한 이러한 기능을 위한 래퍼라도 만들어 주셨으면 하는 바람을 부끄럽지만 말씀드립니다. JSL을 통해 보고서에서 결과를 더 쉽게 가져올 수 있도록 해주세요.
Names Default To Here( 1 );
// Example fit
dt = Open( "$SAMPLE_DATA/Nonlinear Examples/Bioassay.jmp" );
curves = dt << Fit Curve(
Y( :Toxicity ),
X( :log Conc ),
Fit Exponential 2P,
By( :Formulation )
);
// Run this to inspect the report's XML structure — it's the key to
// writing the XPath expressions below. Combine with web searches on
// XPath syntax (//, ancestor::, parent::, text(), etc.) as needed.
curves << Get XML;
// Find the right fit by matching the outline box heading — return the first match
curve = filter each( {c}, curves, length( c << XPath( "/OutlineBox[text()='Formulation=standard']" ) ) > 0 )[1];
// Find columns labeled 'Parameter' inside an outline box called 'Parameter Estimates'
// inside a box called 'Exponential 2P', then find the grandparent TableBox and return
// the first one (there should only be one — you can verify with
// if( N Items( ... ) > 1, throw( ... ) )
// Single XPath split across lines for readability; the || concatenates the fragments.
paramTableRef = (curve << XPath(
"//OutlineBox[text()='Exponential 2P']"
|| "//OutlineBox[text()='Parameter Estimates']"
|| "//StringColBoxHeader[text()='Parameter']"
|| "//ancestor::TableBox"
))[1];
// Alternative approach: you could grab the whole table as a list and parse it directly:
paramTableList = paramTableRef << Get;
Show( paramTableList );
// Sticking with XPath for now: find that StringColBoxHeader again, find its parent, and get
// the parameter names (again, assumes there is only one matching column).
paramNames = (paramTableRef << XPath( "//StringColBoxHeader[text()='Parameter']//parent::StringColBox" ))[1] << Get;
// Now get the estimates
paramEstimates = (paramTableRef << XPath( "//NumberColBoxHeader[text()='Estimate']//parent::NumberColBox" ))[1] << Get;
// Put them in an associative array
arrParamEstimates = Associative Array( paramNames, paramEstimates );
// And now you have the values keyed by parameter name
Show( arrParamEstimates["Growth Rate"], arrParamEstimates["Scale"] );