Library: | stats |
See also: | CPC draftman factor pca CPCprop CPCp CPCFGalg Jacobirot |
Quantlet: | FluryStepUp | |
Description: | computes sequentially all possible CPC and CPCp models: Beginning with the proportional model, it steps down to the full CPC model and estimates subsequently all possible CPCp models. Additionally to Chi-Square-Statistics, it provides the Akaike (AIC) and Schwarz (SIC) Information Criteria for model selection. |
Usage: | FluryStepUp(A,N) | |
Input: | ||
A | p x p x k array, consisting of k covariance matrices (p x p) | |
N | k x 1 vector of weights, usually number of observations in group k |
library("stats") ;Input of grouped covariances covar1=#(112.01, 106.64, 52.97)~#(106.64,108.13,54.75)~#(52.97,54.75,33.86) covar2=#(86.08,81.66,40.24)~#(81.66,85.54,42.08)~#(40.24,42.08,26.66) covar3=#(65.4,60.23,24.69)~#(60.23,62.27,23.47)~#(24.69,23.47,16.33) covar4=#(88.66,79.11,41.32)~#(79.11,80.57,38.81)~#(41.32,38.81,23.97) covar=reshape(covar1~covar2~covar3~covar4,#(3,3,4)) ;Sample size n=#(173,141,88,76) FluryStepUp(covar,n)
Contents of _tmp [1,] "proportional Model done" Contents of _tmp [1,] "CPC Model done" Contents of _tmp [1,] "CPCp Model done q = 1" Contents of Output [ 1,] "The Flury StepUp Approach for Model Selection in CPC - Models " [ 2,] "----------------------------------------------------------------------------------------" [ 3,] "----------------------------------------------------------------------------------------" [ 4,] "------Model-----------------------------------------------------------------------------" [ 5,] "Higher Lower Chi2 df p-val AIC Schwarz" [ 6,] "----------------------------------------------------------------------------------------" [ 7,] "Equality Proportionality 0.772 3 0.86 53.9 53.9" [ 8,] "Proportionality CPC 37.626 6 0.00 59.1 71.6" [ 9,] "CPC CPCp( 1) 8.497 3 0.04 33.5 71.0" [10,] "CPCp( 1) Unrelated 6.974 6 0.32 31.0 81.0" [11,] "Unrelated --- 36.0 111.1"