通過重新排序 Y 變量來驗證/測試過擬合模型?一位同事描述了另一個軟件包中的測試,該軟件包在分析中隨機重新排列 y 值,然後重新擬合模型以確保其擬合不佳。 有沒有人熟悉這項技術或試圖在 JMP 中自動化它?
比較這兩個擬合演示了該技術,儘管聽起來像創建和測試了許多 y' 列。
dt = New Table( "Untitled 2",
Add Rows( 10 ),
New Column( "x",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Selected,
Set Values( [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] )
),
New Column( "y",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula( :x * 2 + Random Normal( 0, 0.1 ) )
),
New Column( "y'",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula( Col Stored Value( :y, Col Shuffle() ) )
)
);
dt << Fit Model(
Y( :y, :y' ),
Effects( :x ),
Personality( "Standard Least Squares" ),
Emphasis( "Effect Leverage" ),
Run(
:y << {Lack of Fit( 0 ), Plot Actual by Predicted( 0 ),
Plot Residual by Predicted( 0 ), Plot Effect Leverage( 0 )},
:y' << {Lack of Fit( 0 ), Plot Actual by Predicted( 0 ),
Plot Residual by Predicted( 0 ), Plot Effect Leverage( 0 )}
)
);回复:通過重新排序 Y 變量來驗證/測試過擬合模型?標記,
如果我理解你的帖子,我認為引導將是(希望)得出相同結論的另一種方法。 老實說,雖然我對基本模型的引導參數估計沒有好運,但也許我做錯了什麼:-)。 例如,嘗試引導二階模型的參數估計會導致每個可能係數的多列。
我想我找到了一種使用模擬方法自動執行此操作的方法。 不使用平台生成的模擬函數,只需將原始 y 與重新排列的 y' 列交換即可。 但是,我在將該技術應用於分區方法時遇到了麻煩;我懷疑每次模擬都使用相同的樹。
附件是一個腳本,顯示了幾種不同方法的情況,但這裡是基本思想:
Random Reset(1);
dt = New Table( "Untitled 2",
Add Rows( 4 ),
New Column( "x",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Selected,
Set Values( [1, 2, 3, 4] )
),
New Column( "y",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula( :x * 2 + Random Normal( 0, 0.1 ) )
),
New Column( "y'",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula( Col Stored Value( :y, Col Shuffle() ) )
)
);
// ------ Linear Model ------
linmdl = dt << Fit Model(
Y( :y ),
Effects( :x ),
Personality( "Standard Least Squares" ),
Emphasis( "Effect Leverage" ),
Run(
:y << {Lack of Fit( 0 ), Plot Actual by Predicted( 0 ),
Plot Residual by Predicted( 0 ), Plot Effect Leverage( 0 )},
:y' << {Lack of Fit( 0 ), Plot Actual by Predicted( 0 ),
Plot Residual by Predicted( 0 ), Plot Effect Leverage( 0 )}
)
);
linrpt = linmdl << Report;
lindt = linrpt["Summary of Fit"][1][2] << Simulate(
100,
Out( :y ),
In( :y' )
);
lindt[2] << Distribution( Continuous Distribution( Column( :RSquare ) ) );
回复:通過重新排序 Y 變量來驗證/測試過擬合模型?這重採樣法通常用於確定改變自變量水平的影響的顯著性。這種方法經常被用來代替噸test 或 ANOVA,它對數據和模型做出假設,以進行推理。重採樣方法生成經驗分佈而不是假設特定模型。您將樣本統計量與經驗分佈進行比較以獲得磷-價值。
JMP Pro 可以引導程序任何結果,例如參數估計,以確定其重要性。
您不需要第二個因變量(隨機正態偏差)。