我不明白您为什么在这里抱怨 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" );