線形最小二乗モデル適合のパラメータ推定テーブルから傾きと切片を抽出し、ファイルに保存する必要があるコードが動作せず、原因を特定できません。どなたか助けていただければ幸いです。よろしくお願いします。
dt = Open("C:\Users\trcampbell\Desktop\MASTER ECOLI\2025\2024.xlsx");
obj = Fit model(
Y( :LOGECOLI ),
Effects( :LOGTURB),
Personality( "Standard Least Squares" ),
Emphasis( "Effect Leverage" ),
Run(:LOGECOLI )) ;
// Extract slope and intercept
reportObj = obj << Report;
paramTable = reportObj( "Parameter Estimates" );
// Extract values from Parameter Estimates table
intercept = paramTable[estimate(1)]; //1st column
slope = paramTable[estimate(2)]; //2nd column
// Create a new data table to store the results
results = New Table( "Fit Results",
Add Column( "Parameter", Character, Set Values( {"Slope", "Intercept"} ) ),
Add Column( "Value", Numeric, Set Values( {slope, intercept} ) )
);
// Save the results to an Excel spreadsheet
results << Export( "C:\\Users\\trcampbell\\Desktop\\MASTER ECOLI\\2025\\validation results\\test xxx.xlsx");
自動化とスクリプトRe: 線形最小二乗モデル適合のパラメータ推定テーブルから傾きと切片を抽出し、ファイルに保存する必要がありますこんにちは翻訳者 、
詳細を移行するために「データ テーブルにする」機能を利用するようにスクリプトを変更しましたが、スクリプトの課題があった場所にもパラメータ テーブルを変更して、テーブルの特定の見積もりセクションをターゲットにするように追加しました。これを行う方法を見つけるには、右クリックして [プロパティ] を選択し、見積もりセクションを強調表示してオブジェクトへのパスを見つけるのが最適です。
ここでは、動作をテストするためにサンプル データ フォルダーを使用しました。
dt=Open("$SAMPLE_DATA/Tablet Production.jmp");
obj = Fit model(
Y( :Dissolution ),
Effects( :Mill Time),
Personality( "Standard Least Squares" ),
Emphasis( "Effect Leverage" ),
Run(:Dissolution )) ;
// Extract slope and intercept
reportObj = obj << Report;
paramTable = ReportObj["Response Dissolution","Whole Model","Parameter Estimates",TableBox(1)]; //Change the report to target the table that needs saving
/*In the old method you had, you could instead make param table this to target the specific estimate column, just change the Y name:
paramTable = reportObj["Response Dissolution","Whole Model","Parameter Estimates",NumberColBox("Estimate")];*/
// Extract values from Parameter Estimates table
/*intercept = paramTable[1]; //1st column - grab the first item [corrected from what you had]
slope = paramTable[2]; //2nd column - grab the second item*/
dtnew=paramTable<<MAKE into="" data="https://community.jmp.com/" table=""></MAKE>Re: 線形最小二乗モデル適合のパラメータ推定テーブルから傾きと切片を抽出し、ファイルに保存する必要がありますありがとう、ベン。
次のエラーが発生します:

Re: 線形最小二乗モデル適合のパラメータ推定テーブルから傾きと切片を抽出し、ファイルに保存する必要があります
同じコードが私にも使える
dt=Open("$SAMPLE_DATA/Tablet Production.jmp");
obj = Fit model(Y( :Dissolution ),Effects( :Mill Time),Personality( "Standard Least Squares" ),Emphasis( "Effect Leverage" ),Run(:Dissolution )) ;
rpt=obj<<REPORT></REPORT>
<P>古いバージョンの JMP を使用している可能性があります。<BR />別のプラットフォームを使ってみてはいかがでしょうか</P>
<BR />
<P>yをxでフィット</P>
<CODE class=" language-jsl">Names Default To Here( 1 );
rpt = New Window( "Tablet Production - Fit Y by X of Dissolution by Mill Time",
Data Table( "Tablet Production.jmp" ) <<
Bivariate(Y( :Dissolution ),X( :Mill Time ),
Fit Line( {Line Color( {230, 159, 0} )} )
)
);
rpt["Bivariate Fit of Dissolution By Mill Time", "Linear Fit", "Parameter Estimates",
Table Box( 1 )] << Make Into Data Table;
またはこれ
曲線に合わせる
Names Default To Here( 1 );
rpt = New Window( "Tablet Production - Fit Curve of Dissolution by Mill Time",
Data Table( "Tablet Production.jmp" ) <<
Fit Curve( Y( :Dissolution ), X( :Mill Time ), Fit Linear ));
rpt["Fit Curve", "Linear", "Parameter Estimates", Table Box( 1 )] <<
Make Into Data Table;
Re: 線形最小二乗モデル適合のパラメータ推定テーブルから傾きと切片を抽出し、ファイルに保存する必要があります参照を探すときに検討したい小さな変更の 1 つは、最初のアウトライン ボックス参照から列名 (この場合は「Dissolution」) を削除することです。これにより、参照がより堅牢になります。アウトライン ボックスを無視するか、列の代わりにワイルドカード「?」を使用できます。
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Drug.jmp");
fm = dt << Fit Model(
Y(:y),
Effects(:Drug, :x),
Personality(Standard Least Squares),
Run Model()
);
rep = Report(fm);
// tb_param_estimates1 = rep["Whole Model", "Parameter Estimates", TableBox(1)];
tb_param_estimates2 = rep["Response ?", "Whole Model", "Parameter Estimates", TableBox(1)];
通常はアウトラインボックスも追加しますが、これは好みの問題です
rep[OutlineBox("Response ?"), OutlineBox("Whole Model"), OutlineBox("Parameter Estimates"), TableBox(1)];Re: 線形最小二乗モデル適合のパラメータ推定テーブルから傾きと切片を抽出し、ファイルに保存する必要があります本当にありがとう!
Re: 線形最小二乗モデル適合のパラメータ推定テーブルから傾きと切片を抽出し、ファイルに保存する必要がありますありがとう、Jarmo!! 本当に感謝しています!