Hallo. Ich würde gerne wissen, wie JMP AICc in der Distributionsplattform oder in der Fit Censored-Funktion berechnet? Forschung zu Wiki schlägt vor, dass es dieses Format sein sollte:
AICc = 2k – 2*Ln(maxlikelihood) + (2k^2 + 2k)/(n – k – 1)
wobei n = # Datenpunkt, k = # Anpassungsparameter.
Allerdings in diesem Thema Es werden noch 2 verschiedene Formeln bereitgestellt.
AICc2 = n* Ln (sse/n) + 2 *k + ( 2 *k^ 2 + 2 *k)/(n - k - 1 );
Dabei ist sse die Summe der Quadrate der Residuen zwischen den Daten und der angepassten Verteilung
Und die andere Formel im gleichen Thema:
AICc3 = n* Ln (sse/n) + (n*(n+k))/(nk- 2 );
Ich habe festgestellt, dass keine dieser Formeln miteinander übereinstimmt. Um ihre Konsistenz zu überprüfen, habe ich dieses Skript implementiert:
Names Default to Here(1);
dt = New Table("Test",
Add Rows(100),
New Column("Random Normal Data", Numeric,
Formula(Random Normal(0, 1))
)
);
dt << Run Formulas;
Wait(0.001);
:Random Normal Data << Suppress Eval; //So data doesn't change between computations.
//Compute AICc from Distribution platform
dist = dt << Distribution(Column("Random Normal Data"));
dist << Fit Distribution(Normal(Density Curve(1))); //AICc = +285
//Independently compute AICc using method described here: https://en.wikipedia.org/wiki/Akaike_information_criterion
x_vec = :Random Normal Data << Get Values;
mu = Mean(x_vec);
sig = Stddev(x_vec);
maxlikelihood = Normal Distribution(mu, mu, sig); //e.g. 0.5
k=2;
n=100;
aicc1 = 2*k - 2*Ln(maxlikelihood) + (2*k^2 + 2*k)/(n - k - 1); //AICc = +5.51
Show(aicc1);
//Independently compute AICc using method described in JMP Forum: https://community.jmp.com/t5/Discussions/how-do-you-get-an-r2-and-AICc-value-for-a-custom-nonlinear/m-p/187375/highlight/true#M40622
ord = Rank(x_vec);
xsort = x_vec[ord];
p_vec = (1::n)`/n;
sse = SSQ(p_vec - Normal Distribution(xsort, mu, sig));
aicc2 = n*Ln(sse/n) + 2*k + (2*k^2 + 2*k)/(n - k - 1); //AICc = -763
Show(aicc2);
//Independently compute AICc using Other method described in JMP Forum: https://community.jmp.com/t5/Discussions/how-do-you-get-an-r2-and-AICc-value-for-a-custom-nonlinear/m-p/9715
aicc3 = n*Ln(sse/n) + (n*(n+k))/(n-k-2); //AICc = -661
Show(aicc3);Meine Ergebnisse:
Vertriebsplattform AICc = +285
Formel aus Wiki AICc = +5,51
Formel1 im Beitrag AICc = -763
Formel2 im Beitrag AICc = -661
Da die Ausgangsdaten aus einer Zufallsfunktion generiert werden, können Ihre Ergebnisse etwas variieren. Dennoch sollte klar sein, dass keine dieser Formeln mit den anderen übereinstimmt. Am wichtigsten ist, dass sie mit dem in der Vertriebsplattform angegebenen Wert nicht einverstanden sind.
Weiß jemand, wie die Vertriebsplattform AICc berechnet? Ich benötige das, weil ich einige meiner eigenen Distributionen entwickelt habe und diese gerne mit den in JMP vorhandenen vergleichen würde.
FTR mit JMP Pro 15.2.1 auf einem Mac mit Catalina OS.
Danke.
Die Berechnung von Likelihood und SSE ist falsch, daher sind auch der zweite, dritte und vierte AICc falsch. Die dritte und vierte Formel verwenden unterschiedliche Näherungen der Strafe und stimmen daher nicht überein.
Bitte beachten Sie diese aktuellen Formeln, die mit dem Artikel in Wikipedia übereinstimmen.
Names Default To Here( 1 );
n = 100;
Random Reset( 27513 );
y = J( n, 1, Random Normal() );
dt = New Table( "Test AICc Formula", New Column( "Random Normal Data", Numeric, Continuous, Values( y ) ) );
// Compute AICc with Distribution platform
dist = dt << Distribution( Y( :Random Normal Data ) );
dist << Fit Distribution( Normal( Density Curve( 1 ) ) );
distr = dist << Report;
aiccFromDistribution = distr["Parameter Estimates"][Number Col Box( 4 )] << Get( 2 );
Show( aiccFromDistribution );
dist << Close Window;
// Compute AICc with Fit Least Squares platform
fit = dt << Fit Model(
Y( :Random Normal Data ),
Effects,
Personality( "Standard Least Squares" ),
Emphasis( "Minimal Report" ),
Run(
:Random Normal Data << {Summary of Fit( 1 ), Analysis of Variance( 1 ),
Parameter Estimates( 1 ), Lack of Fit( 0 ), Scaled Estimates( 0 ),
Plot Actual by Predicted( 0 ), Plot Regression( 0 ),
Plot Residual by Predicted( 0 ), Plot Studentized Residuals( 0 ),
Plot Effect Leverage( 0 ), Plot Residual by Normal Quantiles( 0 ),
Box Cox Y Transformation( 0 ), AICc( 1 )}
)
);
fitr = fit << Report;
aiccFromOLS = fitr["Summary of Fit"][NumberColBox(2)] << Get( 1 );
sse = fitr["Analysis of Variance"][NumberColBox(2)] << Get( 2 );
Show( aiccFromOLS );
fit << Close Window;
// Compute AICc using method described in JMP Help (https://www.jmp.com/support/help/en/16.0/#page/jmp/likelihood-aicc-and-bic.shtml#ww293087)
loglikelihood = Summation( i = 1, n, Log( Normal Density( y[i] ) ) );
k = 2;
aiccFromHelp = -2*loglikelihood + 2*k + (2*k*(k+1)/(n-(k+1)));
Show( aiccFromHelp );
//Independently compute AICc using method described in JMP Forum: https://community.jmp.com/t5/Discussions/how-do-you-get-an-r2-and-AICc-value-for-a-custom-nonlinear/m-p/187375/highlight/true#M40622
sse = Sum( (y - Mean( y )) ^ 2 );
aiccFromForum = n*Log( sse/n ) + 2*k + (2*k*(k+1)/(n-(k+1))) + n*Log( 2*Pi() ) + n;
Show( aiccFromForum );Hier ist der direkte Link zur Hilfe zu AIC, den ich durch Auswahl des ? erreicht habe. Tool und klicken Sie dann auf die AIC-Tabelle
Die AIC-Hilfe