我不明白您為什麼在這裡抱怨 JMP 幫助。這並不是我希望在幫助文件中看到的那種問題——它確實與建模選擇和解釋有關。也許我錯了,有人會說有一個明確的準備方法可以做到這一點。
根據我對您問題的理解,您需要對交互效果進行建模:x*group。但這只是決定了兩組之間的斜率是否存在顯著差異。您的問題似乎表明您認為斜率在 x 的某個值處變得相等,而不是 x 的較小值。這讓我覺得是一種非線性的相互作用效應。可以使用帶參數的非線性平台,並獲得一個參數的估計值,該參數指示斜率開始不同的 x 值。你有多少數據?如果您可以分享其中的一些 - 或類似的數據集,那麼我可以更詳細地概述這一點。
我想知道當使用最小二乘法擬合具有 2 個分類組的數據時,x 值 2 斜率顯著不同,x 是連續的,因為擬合變量也是如此。 JMP 在線文檔非常無用。
JMP® Pro 16.2.0
你可以做一個擬合模型並為你的 x 添加一個本地數據過濾器。 然後您可以掃描 x 值,觀察擬合模型報告中的斜率變化。
另一個想法是在 x 上添加自定義分箱,並在擬合模型中使用此變量進行交互。 然後你可以看到斜率是否隨著 X 的自定義 bin 而變化。 有關示例,請參見腳本。
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\Big Class.jmp" );
dt << New Column( "Custom Binning[height]",
Numeric,
"Nominal",
Format( "Best", 12 ),
Formula( If( :height < 61.937, 60.937, :height >= 61.937, 61.937, . ) ),
Value Labels( {"." = "Missing", 60.937 = "< 62", 61.937 = "≥ 62"} ),
Use Value Labels( 1 ),
);
dt << Add Properties to Table(
{New Script(
"Fit Model local datafilter",
Fit Model(
Y( :weight ),
Effects( :sex, :height, :sex * :height ),
Personality( "Standard Least Squares" ),
Emphasis( "Effect Leverage" ),
Run(
:weight << {Summary of Fit( 1 ), Analysis of Variance( 1 ),
Parameter Estimates( 1 ), Scaled Estimates( 0 ), Plot Actual by Predicted( 1 ),
Plot Residual by Predicted( 1 ), Plot Studentized Residuals( 0 ),
Plot Effect Leverage( 1 ), Plot Residual by Normal Quantiles( 0 ),
Box Cox Y Transformation( 0 )}
),
Local Data Filter(
Conditional,
Add Filter( columns( :height ), Where( :height >= 56.994 & :height <= 70 ) )
),
SendToReport(
Dispatch(
{"Response weight", "Whole Model"},
"Actual by Predicted Plot",
OutlineBox,
{Close( 1 )}
),
Dispatch(
{"Response weight", "Whole Model"},
"Effect Summary",
OutlineBox,
{Close( 1 )}
),
Dispatch(
{"Response weight", "Whole Model"},
"Lack Of Fit",
OutlineBox,
{Close( 1 )}
),
Dispatch(
{"Response weight", "Whole Model"},
"Residual by Predicted Plot",
OutlineBox,
{Close( 1 )}
),
Dispatch(
{"Response weight", "Whole Model"},
"Summary of Fit",
OutlineBox,
{Close( 1 )}
),
Dispatch(
{"Response weight", "Whole Model"},
"Analysis of Variance",
OutlineBox,
{Close( 1 )}
),
Dispatch(
{"Response weight", "sex"},
"Least Squares Means Table",
OutlineBox,
{Close( 1 )}
)
)
)
), New Script(
"Fit Least Squares",
Fit Model(
Y( :weight ),
Effects(
:sex, :height, :"Custom Binning[height]"n, :sex * :height,
:sex * :"Custom Binning[height]"n, :height * :"Custom Binning[height]"n
),
Personality( "Standard Least Squares" ),
Emphasis( "Effect Leverage" ),
Run(
:weight << {Summary of Fit( 1 ), Analysis of Variance( 1 ),
Parameter Estimates( 1 ), Scaled Estimates( 0 ), Plot Actual by Predicted( 1 ),
Plot Regression( 0 ), Plot Residual by Predicted( 1 ),
Plot Studentized Residuals( 0 ), Plot Effect Leverage( 1 ),
Plot Residual by Normal Quantiles( 0 ), Box Cox Y Transformation( 0 )}
)
)
)}
);
dt << run script( "Fit Model local datafilter" );