print.fem: The print function for 'fem' objects.

Description Usage Arguments See Also Examples

View source: R/print.fem.R

Description

This function summarizes 'fem' objects. It in particular indicates which DLM model has been chosen and displays the loading matrix 'U' if the original dimension is smaller than 10.

Usage

1
2
 ## S3 method for class 'fem'
print(x,...)

Arguments

x

The fem object.

...

Additional options to pass to the summary function.

See Also

fem, sfem, fem.ari, plot.fem

Examples

1
2
3
4
5
data(iris)
res = fem(iris[,-5],K=3,model='DkBk',method='reg')
res
plot(res)
fem.ari(res,as.numeric(iris[,5]))

Example output

Loading required package: MASS
Loading required package: elasticnet
Loading required package: lars
Loaded lars 1.2

$K
[1] 3

$cls
  [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
 [38] 1 1 1 1 1 1 1 1 1 1 1 1 1 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
 [75] 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 2 3 2 2 2 2 3 2 2 2 2
[112] 2 2 3 2 2 2 2 2 3 2 3 2 3 2 2 3 3 2 2 2 2 2 3 2 2 2 2 3 2 2 2 3 2 2 2 3 2
[149] 2 3

$P
                [,1]         [,2]         [,3]
  [1,]  1.000000e+00 2.788826e-56 9.906673e-19
  [2,]  1.000000e+00 1.927462e-51 5.212226e-16
  [3,]  1.000000e+00 1.418224e-54 1.733394e-18
  [4,]  1.000000e+00 3.748457e-50 3.698333e-16
  [5,]  1.000000e+00 5.527517e-57 1.444431e-19
  [6,]  1.000000e+00 5.525988e-51 3.116070e-17
  [7,]  1.000000e+00 2.473290e-52 1.342418e-18
  [8,]  1.000000e+00 1.440159e-53 2.016771e-17
  [9,]  1.000000e+00 1.928199e-49 7.338376e-16
 [10,]  1.000000e+00 5.014040e-52 1.611569e-15
 [11,]  1.000000e+00 1.624947e-56 4.598053e-18
 [12,]  1.000000e+00 1.663981e-51 8.112795e-17
 [13,]  1.000000e+00 1.245841e-52 5.719737e-16
 [14,]  1.000000e+00 1.770194e-56 3.933305e-19
 [15,]  1.000000e+00 2.206475e-64 5.056150e-21
 [16,]  1.000000e+00 2.319354e-58 3.863187e-21
 [17,]  1.000000e+00 6.257855e-58 2.377688e-21
 [18,]  1.000000e+00 1.425703e-54 8.633273e-19
 [19,]  1.000000e+00 2.726938e-52 8.728004e-16
 [20,]  1.000000e+00 3.487735e-55 1.601557e-19
 [21,]  1.000000e+00 2.735722e-50 2.394879e-14
 [22,]  1.000000e+00 2.401109e-52 1.056852e-18
 [23,]  1.000000e+00 1.564182e-62 8.402541e-24
 [24,]  1.000000e+00 6.025719e-44 4.510963e-14
 [25,]  1.000000e+00 2.426660e-46 6.579386e-14
 [26,]  1.000000e+00 3.377469e-48 4.879086e-14
 [27,]  1.000000e+00 3.164197e-48 3.604463e-16
 [28,]  1.000000e+00 1.165916e-54 1.617740e-17
 [29,]  1.000000e+00 1.794752e-55 7.992793e-18
 [30,]  1.000000e+00 1.349570e-49 9.163281e-16
 [31,]  1.000000e+00 6.549428e-49 4.784720e-15
 [32,]  1.000000e+00 1.131772e-50 1.701181e-16
 [33,]  1.000000e+00 2.975009e-61 1.014152e-20
 [34,]  1.000000e+00 1.754814e-62 1.291090e-21
 [35,]  1.000000e+00 9.955448e-51 8.941895e-16
 [36,]  1.000000e+00 8.966597e-57 7.579543e-19
 [37,]  1.000000e+00 3.768573e-58 2.859126e-18
 [38,]  1.000000e+00 2.066492e-58 1.386628e-19
 [39,]  1.000000e+00 6.231352e-52 2.322716e-17
 [40,]  1.000000e+00 1.098012e-53 3.481892e-17
 [41,]  1.000000e+00 4.939162e-56 6.695435e-20
 [42,]  1.000000e+00 5.822448e-44 1.660638e-12
 [43,]  1.000000e+00 1.219635e-53 1.323242e-18
 [44,]  1.000000e+00 4.473225e-44 2.771250e-15
 [45,]  1.000000e+00 4.210300e-46 4.858292e-15
 [46,]  1.000000e+00 1.066478e-49 3.780113e-16
 [47,]  1.000000e+00 2.625852e-55 1.510585e-18
 [48,]  1.000000e+00 1.148280e-52 1.136042e-17
 [49,]  1.000000e+00 1.796865e-56 2.070448e-18
 [50,]  1.000000e+00 2.269271e-54 1.005289e-17
 [51,]  7.466519e-38 4.555652e-05 9.999544e-01
 [52,]  1.287638e-37 2.125839e-05 9.999787e-01
 [53,]  6.212214e-43 2.982471e-03 9.970175e-01
 [54,]  1.559087e-28 1.271034e-07 9.999999e-01
 [55,]  6.782680e-39 2.460652e-04 9.997539e-01
 [56,]  6.979068e-34 5.844889e-06 9.999942e-01
 [57,]  8.116217e-44 6.136573e-04 9.993863e-01
 [58,]  4.123136e-15 4.409309e-13 1.000000e+00
 [59,]  4.596042e-34 1.903162e-05 9.999810e-01
 [60,]  3.639840e-31 5.471707e-08 9.999999e-01
 [61,]  4.856775e-18 4.136222e-11 1.000000e+00
 [62,]  7.859382e-35 1.981463e-06 9.999980e-01
 [63,]  6.107091e-22 2.168686e-08 1.000000e+00
 [64,]  3.097948e-38 1.402607e-04 9.998597e-01
 [65,]  2.271362e-22 2.159049e-10 1.000000e+00
 [66,]  1.789622e-33 1.787754e-06 9.999982e-01
 [67,]  2.357331e-40 3.710540e-05 9.999629e-01
 [68,]  5.187249e-22 1.959803e-09 1.000000e+00
 [69,]  2.313726e-38 8.250216e-04 9.991750e-01
 [70,]  4.897588e-22 1.509697e-09 1.000000e+00
 [71,]  2.627864e-54 2.266173e-02 9.773383e-01
 [72,]  1.940585e-26 1.550239e-08 1.000000e+00
 [73,]  2.512821e-43 2.308068e-02 9.769193e-01
 [74,]  2.363629e-33 3.544743e-05 9.999646e-01
 [75,]  5.141516e-30 3.648708e-07 9.999996e-01
 [76,]  1.605624e-33 2.907510e-06 9.999971e-01
 [77,]  3.891482e-39 1.508963e-03 9.984910e-01
 [78,]  3.313140e-50 7.641208e-02 9.235879e-01
 [79,]  1.279224e-38 4.712015e-05 9.999529e-01
 [80,]  4.045664e-15 8.102959e-13 1.000000e+00
 [81,]  3.131087e-21 7.139653e-10 1.000000e+00
 [82,]  4.083032e-18 5.302518e-11 1.000000e+00
 [83,]  1.720276e-23 1.955353e-09 1.000000e+00
 [84,]  3.141959e-50 7.197913e-02 9.280209e-01
 [85,]  1.766530e-41 3.651279e-05 9.999635e-01
 [86,]  4.500448e-42 1.150900e-04 9.998849e-01
 [87,]  4.237457e-40 2.569356e-04 9.997431e-01
 [88,]  5.144868e-32 4.489127e-05 9.999551e-01
 [89,]  9.010053e-29 3.829497e-08 1.000000e+00
 [90,]  2.828699e-28 5.858002e-08 9.999999e-01
 [91,]  1.092831e-30 1.383085e-06 9.999986e-01
 [92,]  7.514760e-37 3.147883e-05 9.999685e-01
 [93,]  6.912665e-25 1.104389e-08 1.000000e+00
 [94,]  5.100231e-15 6.163381e-13 1.000000e+00
 [95,]  2.769030e-30 2.766307e-07 9.999997e-01
 [96,]  3.197654e-27 2.358680e-08 1.000000e+00
 [97,]  7.994761e-30 1.409945e-07 9.999999e-01
 [98,]  4.027045e-30 3.855468e-07 9.999996e-01
 [99,]  6.085100e-13 3.551544e-14 1.000000e+00
[100,]  1.402541e-28 6.309330e-08 9.999999e-01
[101,] 9.554168e-110 9.999152e-01 8.477723e-05
[102,]  6.440203e-63 2.230915e-01 7.769085e-01
[103,]  1.664254e-81 9.998660e-01 1.340096e-04
[104,]  2.793847e-65 9.606694e-01 3.933065e-02
[105,]  2.417375e-86 9.987683e-01 1.231709e-03
[106,]  2.152435e-95 1.000000e+00 4.684002e-08
[107,]  1.137892e-52 2.003418e-04 9.997997e-01
[108,]  2.055925e-78 9.999989e-01 1.094760e-06
[109,]  4.116773e-68 9.995890e-01 4.110166e-04
[110,] 2.306996e-107 9.999984e-01 1.646860e-06
[111,]  2.495243e-64 7.520411e-01 2.479589e-01
[112,]  3.987540e-63 8.472731e-01 1.527269e-01
[113,]  1.347003e-74 9.940356e-01 5.964420e-03
[114,]  3.064583e-66 1.582999e-01 8.417001e-01
[115,]  3.436360e-89 9.426878e-01 5.731215e-02
[116,]  8.170517e-84 9.952996e-01 4.700354e-03
[117,]  6.866179e-63 9.342337e-01 6.576630e-02
[118,] 3.698492e-104 9.999999e-01 6.700436e-08
[119,] 1.742131e-108 1.000000e+00 1.528036e-09
[120,]  1.932695e-45 1.340789e-01 8.659211e-01
[121,]  2.716376e-88 9.997063e-01 2.936915e-04
[122,]  3.997558e-66 1.306693e-01 8.693307e-01
[123,]  6.985496e-94 1.000000e+00 2.630859e-09
[124,]  4.119346e-53 7.579002e-02 9.242100e-01
[125,]  9.978700e-80 9.983411e-01 1.658878e-03
[126,]  3.113059e-72 9.998389e-01 1.610626e-04
[127,]  3.585961e-52 2.613061e-02 9.738694e-01
[128,]  2.228705e-54 4.684611e-02 9.531539e-01
[129,]  1.314814e-77 9.905612e-01 9.438822e-03
[130,]  6.337064e-62 9.990252e-01 9.747762e-04
[131,]  1.227293e-77 9.999956e-01 4.444573e-06
[132,]  1.901663e-89 9.999987e-01 1.316892e-06
[133,]  2.038727e-82 9.934656e-01 6.534354e-03
[134,]  3.106855e-46 5.341447e-02 9.465855e-01
[135,]  3.416662e-52 9.573632e-01 4.263677e-02
[136,]  2.752844e-93 9.999977e-01 2.288402e-06
[137,]  5.807372e-97 9.997153e-01 2.847114e-04
[138,]  2.451768e-63 9.054559e-01 9.454414e-02
[139,]  2.025164e-53 2.052275e-02 9.794772e-01
[140,]  1.322305e-72 9.903830e-01 9.616993e-03
[141,]  2.387134e-92 9.995251e-01 4.749495e-04
[142,]  9.728915e-77 9.910496e-01 8.950354e-03
[143,]  6.440203e-63 2.230915e-01 7.769085e-01
[144,]  1.325115e-92 9.998659e-01 1.341306e-04
[145,] 5.604903e-101 9.999331e-01 6.690244e-05
[146,]  2.984949e-79 9.909169e-01 9.083113e-03
[147,]  2.904267e-58 3.288126e-01 6.711874e-01
[148,]  1.118578e-65 8.400482e-01 1.599518e-01
[149,]  3.038415e-88 9.982557e-01 1.744346e-03
[150,]  1.354894e-58 1.490884e-01 8.509116e-01

$U
                     U1         U2
Sepal.Length -0.1986526 -0.2047387
Sepal.Width  -0.5770794  0.4434397
Petal.Length  0.6246384 -0.2957369
Petal.Width   0.4871790  0.8209647

$aic
[1] -347.8418

$mean
           [,1]        [,2]
[1,] -1.9396155  0.26477922
[2,]  1.4983918 -0.01622198
[3,]  0.6637551 -0.12441198

$my
         [,1]     [,2]     [,3]     [,4]
[1,] 5.006000 3.428000 1.462000 0.246000
[2,] 6.795925 3.051250 5.744160 2.096170
[3,] 5.936853 2.762841 4.395581 1.420127

$prop
[1] 0.3333333 0.2523242 0.4143425

$D
, , 1

           [,1]         [,2] [,3] [,4]
[1,] 0.07388013 -0.028631344    0    0
[2,] 0.07030361 -0.035872347    0    0
[3,] 0.13307907  0.009456085    0    0

, , 2

             [,1]       [,2] [,3] [,4]
[1,] -0.028631344 0.02483299    0    0
[2,] -0.035872347 0.13211695    0    0
[3,]  0.009456085 0.04304652    0    0

, , 3

     [,1] [,2]      [,3] [,4]
[1,]    0    0 0.1052455    0
[2,]    0    0 0.2517964    0
[3,]    0    0 0.2466069    0

, , 4

     [,1] [,2] [,3]      [,4]
[1,]    0    0    0 0.1052455
[2,]    0    0    0 0.2517964
[3,]    0    0    0 0.2466069


$model
[1] "DkBk"

$bic
[1] -385.4748

$icl
[1] 2221.31

$loglik
 [1] -328.6729 -325.3182 -323.9792 -323.3642 -323.1172 -323.0100 -322.9544
 [8] -322.9208 -322.8986 -322.8832 -322.8722 -322.8642 -322.8583 -322.8540
[15] -322.8508 -322.8484 -322.8467 -322.8453 -322.8443 -322.8436 -322.8430
[22] -322.8426 -322.8423 -322.8420 -322.8418

$ll
[1] -322.8418

$method
[1] "reg"

$crit
[1] "icl"

$plot
$plot$bic
          [,1]
[1,] -385.4748

$plot$aic
          [,1]
[1,] -347.8418

$plot$icl
        [,1]
[1,] 2221.31

$plot$K
[1] 3

$plot$models
[1] "DkBk"


$call
fem(Y = iris[, -5], K = 3, model = "DkBk", method = "reg")

attr(,"class")
[1] "fem"
[1] 0.7733799

FisherEM documentation built on Oct. 11, 2018, 5:03 p.m.