search.model.LM: Search for the global maximum of the log-likelihood

Description Usage Arguments Details Value Author(s) Examples

View source: R/search.model.LM.R

Description

Function that searches for the global maximum of the log-likelihood of different models given a vector of possible number of states to try for.

The function is no longer maintained. Please look at lmestSearch function.

Usage

1
2
search.model.LM(version = c("basic","latent","manifest","basic.cont", "latent.cont"),
                kv, ..., nrep = 2, tol1 = 10^-5, tol2 = 10^-10,out_se = FALSE)

Arguments

version

model to be estimated ("basic" = basic LM model (est_lm_basic function); "latent" = LM model with covariates in the distribution of the latent process (est_lm_cov_latent function); "manifest" = LM model with covariates in the measurement model (est_lm_cov_maifest function),"basic.cont" = basic LM model for continuous outcomes (est_lm_basic_cont function); "latent.cont" = LM model for continuous outcomes with covariates in the distribution of the latent process (est_lm_cov_latent_cont function))

kv

vector of possible number of latent states

...

additional arguments to be passed based on the model to be estimated (see details)

nrep

number of repetitions of each random initialization

tol1

tolerance level for checking convergence of the algorithm in the random initializations

tol2

tolerance level for checking convergence of the algorithm in the last deterministic initialization

out_se

TRUE for computing information matrix and standard errors

Details

The function combines deterministic and random initializations strategy to reach the global maximum of the model log-likelihood. It uses one deterministic initialization (start=0) and a number of random initializations (start=1) proportional to the number of latent states. The tolerance level is set equal to 10^-5. Starting from the best solution obtained in this way, a final run is performed (start=2) with a default tolerance level equal to 10^-10.

Arguments in ... depend on the model to be estimated. They match the arguments to be passed to functions est_lm_basic, est_lm_cov_latent, est_lm_cov_manifest, est_lm_basic_cont, or est_lm_cov_latent_cont.

Value

out.single

output of each single model (as from est_lm_basic, est_lm_cov_latent or est_lm_cov_manifest) for each k in kv

aicv

value of AIC index for each k in kv

bicv

value of BIC index for each k in kv

lkv

value of log-likelihood for each k in kv

Author(s)

Francesco Bartolucci, Silvia Pandolfi, University of Perugia (IT), http://www.stat.unipg.it/bartolucci

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 

# example for est_lm_basic
data(data_drug)
data_drug <- as.matrix(data_drug)
S <- data_drug[,1:5]-1
yv <- data_drug[,6]
n <- sum(yv)
# Search Basic LM model

res <- search.model.LM("basic", kv = 1:4, S, yv, mod = 1)
summary(res)


## End(Not run)

Example output

Loading required package: MASS
Loading required package: MultiLCIRT
Loading required package: limSolve
Loading required package: mvtnorm
Loading required package: mmm
Loading required package: gee
Loading required package: mix
***************************************************************************
1 
lktrace =  -895.2043 
lk =  -895.2043 NA NA NA 
aic =  1794.409 NA NA NA 
bic =  1801.345 NA NA NA 
***************************************************************************
2 
------------|-------------|-------------|-------------|-------------|-------------|-------------|
     mod    |      k      |    start    |     step    |     lk      |    lk-lko   | discrepancy |
------------|-------------|-------------|-------------|-------------|-------------|-------------|
          1 |           2 |           0 |           0 |    -816.134 | 
          1 |           2 |           0 |          10 |    -697.974 |    0.104333 |  0.00404913 | 
          1 |           2 |           0 |          19 |    -697.715 |  0.00588594 | 0.000934184 | 
------------|-------------|-------------|-------------|-------------|-------------|-------------|
lktrace =  -697.7145 
lk =  -895.2043 -697.7145 NA NA 
aic =  1794.409 1409.429 NA NA 
bic =  1801.345 1433.705 NA NA 
***************************************************************************
2 1 
------------|-------------|-------------|-------------|-------------|-------------|-------------|
     mod    |      k      |    start    |     step    |     lk      |    lk-lko   | discrepancy |
------------|-------------|-------------|-------------|-------------|-------------|-------------|
          1 |           2 |           1 |           0 |    -2115.66 | 
          1 |           2 |           1 |          10 |    -835.123 |     24.3084 |   0.0710642 | 
          1 |           2 |           1 |          20 |    -698.323 |    0.258181 |  0.00549475 | 
          1 |           2 |           1 |          30 |    -697.717 |  0.00822496 |  0.00103979 | 
          1 |           2 |           1 |          31 |    -697.712 |  0.00582142 | 0.000872805 | 
------------|-------------|-------------|-------------|-------------|-------------|-------------|
lktrace =  -697.7145 -697.7117 
lk =  -895.2043 -697.7117 NA NA 
aic =  1794.409 1409.423 NA NA 
bic =  1801.345 1433.7 NA NA 
***************************************************************************
2 2 
------------|-------------|-------------|-------------|-------------|-------------|-------------|
     mod    |      k      |    start    |     step    |     lk      |    lk-lko   | discrepancy |
------------|-------------|-------------|-------------|-------------|-------------|-------------|
          1 |           2 |           1 |           0 |    -1471.57 | 
          1 |           2 |           1 |          10 |    -697.946 |    0.122543 |   0.0032668 | 
          1 |           2 |           1 |          18 |    -697.714 |  0.00612237 | 0.000962705 | 
------------|-------------|-------------|-------------|-------------|-------------|-------------|
lktrace =  -697.7145 -697.7138 -697.7117 
lk =  -895.2043 -697.7117 NA NA 
aic =  1794.409 1409.423 NA NA 
bic =  1801.345 1433.7 NA NA 
------------|-------------|-------------|-------------|-------------|-------------|-------------|
     mod    |      k      |    start    |     step    |     lk      |    lk-lko   | discrepancy |
------------|-------------|-------------|-------------|-------------|-------------|-------------|
          1 |           2 |           2 |           0 |    -697.712 | 
          1 |           2 |           2 |          10 |    -697.698 | 0.000181409 |  0.00014971 | 
          1 |           2 |           2 |          20 |    -697.698 | 5.88938e-06 | 2.50695e-05 | 
          1 |           2 |           2 |          30 |    -697.698 | 2.25755e-07 | 4.04963e-06 | 
          1 |           2 |           2 |          34 |    -697.698 | 6.66927e-08 | 1.92145e-06 | 
------------|-------------|-------------|-------------|-------------|-------------|-------------|
***************************************************************************
3 
------------|-------------|-------------|-------------|-------------|-------------|-------------|
     mod    |      k      |    start    |     step    |     lk      |    lk-lko   | discrepancy |
------------|-------------|-------------|-------------|-------------|-------------|-------------|
          1 |           3 |           0 |           0 |    -825.611 | 
          1 |           3 |           0 |          10 |      -669.9 |     1.99854 |   0.0265126 | 
          1 |           3 |           0 |          20 |    -661.029 |    0.425886 |   0.0111137 | 
          1 |           3 |           0 |          30 |    -659.057 |   0.0833311 |  0.00484088 | 
          1 |           3 |           0 |          40 |    -658.698 |   0.0149382 |  0.00188596 | 
          1 |           3 |           0 |          46 |    -658.644 |  0.00613782 |  0.00118699 | 
------------|-------------|-------------|-------------|-------------|-------------|-------------|
lktrace =  -658.6439 
lk =  -895.2043 -697.6976 -658.6439 NA 
aic =  1794.409 1409.395 1345.288 NA 
bic =  1801.345 1433.672 1393.841 NA 
***************************************************************************
3 1 
------------|-------------|-------------|-------------|-------------|-------------|-------------|
     mod    |      k      |    start    |     step    |     lk      |    lk-lko   | discrepancy |
------------|-------------|-------------|-------------|-------------|-------------|-------------|
          1 |           3 |           1 |           0 |    -1219.39 | 
          1 |           3 |           1 |          10 |     -723.13 |     39.3142 |    0.108989 | 
          1 |           3 |           1 |          20 |    -658.856 |    0.114551 |  0.00263948 | 
          1 |           3 |           1 |          29 |    -658.643 |  0.00550523 |  0.00043003 | 
------------|-------------|-------------|-------------|-------------|-------------|-------------|
lktrace =  -658.6439 -658.6434 
lk =  -895.2043 -697.6976 -658.6434 NA 
aic =  1794.409 1409.395 1345.287 NA 
bic =  1801.345 1433.672 1393.84 NA 
***************************************************************************
3 2 
------------|-------------|-------------|-------------|-------------|-------------|-------------|
     mod    |      k      |    start    |     step    |     lk      |    lk-lko   | discrepancy |
------------|-------------|-------------|-------------|-------------|-------------|-------------|
          1 |           3 |           1 |           0 |    -1074.83 | 
          1 |           3 |           1 |          10 |    -697.348 |   0.0916801 |  0.00219872 | 
          1 |           3 |           1 |          20 |    -696.545 |   0.0928699 |  0.00429102 | 
          1 |           3 |           1 |          30 |    -695.525 |    0.102905 |   0.0054039 | 
          1 |           3 |           1 |          40 |    -694.552 |   0.0955627 |  0.00531759 | 
          1 |           3 |           1 |          50 |    -693.414 |      0.1417 |  0.00743651 | 
          1 |           3 |           1 |          60 |    -691.087 |    0.348315 |   0.0109394 | 
          1 |           3 |           1 |          70 |    -683.932 |     1.17738 |   0.0137101 | 
          1 |           3 |           1 |          80 |    -667.193 |     1.36591 |    0.025205 | 
          1 |           3 |           1 |          90 |    -660.791 |    0.351412 |   0.0106887 | 
          1 |           3 |           1 |         100 |    -659.244 |   0.0573952 |  0.00478038 | 
          1 |           3 |           1 |         110 |     -659.01 |  0.00886966 |  0.00186368 | 
          1 |           3 |           1 |         112 |    -658.996 |  0.00618677 |  0.00155081 | 
------------|-------------|-------------|-------------|-------------|-------------|-------------|
lktrace =  -658.996 -658.6439 -658.6434 
lk =  -895.2043 -697.6976 -658.6434 NA 
aic =  1794.409 1409.395 1345.287 NA 
bic =  1801.345 1433.672 1393.84 NA 
***************************************************************************
3 3 
------------|-------------|-------------|-------------|-------------|-------------|-------------|
     mod    |      k      |    start    |     step    |     lk      |    lk-lko   | discrepancy |
------------|-------------|-------------|-------------|-------------|-------------|-------------|
          1 |           3 |           1 |           0 |    -1179.92 | 
          1 |           3 |           1 |          10 |    -824.403 |     19.5535 |   0.0531002 | 
          1 |           3 |           1 |          20 |    -672.095 |     3.36804 |   0.0476505 | 
          1 |           3 |           1 |          30 |    -659.248 |    0.146084 |  0.00869487 | 
          1 |           3 |           1 |          40 |    -658.718 |   0.0187549 |  0.00257681 | 
          1 |           3 |           1 |          47 |    -658.647 |  0.00599974 |  0.00126076 | 
------------|-------------|-------------|-------------|-------------|-------------|-------------|
lktrace =  -658.996 -658.6469 -658.6439 -658.6434 
lk =  -895.2043 -697.6976 -658.6434 NA 
aic =  1794.409 1409.395 1345.287 NA 
bic =  1801.345 1433.672 1393.84 NA 
***************************************************************************
3 4 
------------|-------------|-------------|-------------|-------------|-------------|-------------|
     mod    |      k      |    start    |     step    |     lk      |    lk-lko   | discrepancy |
------------|-------------|-------------|-------------|-------------|-------------|-------------|
          1 |           3 |           1 |           0 |    -1125.05 | 
          1 |           3 |           1 |          10 |    -712.888 |     13.9185 |   0.0692036 | 
          1 |           3 |           1 |          20 |    -672.425 |     4.43446 |   0.0521064 | 
          1 |           3 |           1 |          30 |    -659.539 |    0.164072 |  0.00562564 | 
          1 |           3 |           1 |          40 |    -658.816 |   0.0323496 |  0.00310184 | 
          1 |           3 |           1 |          50 |    -658.662 |   0.0073427 |  0.00139618 | 
          1 |           3 |           1 |          51 |    -658.655 |  0.00640393 |  0.00128897 | 
------------|-------------|-------------|-------------|-------------|-------------|-------------|
lktrace =  -658.996 -658.6551 -658.6469 -658.6439 -658.6434 
lk =  -895.2043 -697.6976 -658.6434 NA 
aic =  1794.409 1409.395 1345.287 NA 
bic =  1801.345 1433.672 1393.84 NA 
------------|-------------|-------------|-------------|-------------|-------------|-------------|
     mod    |      k      |    start    |     step    |     lk      |    lk-lko   | discrepancy |
------------|-------------|-------------|-------------|-------------|-------------|-------------|
          1 |           3 |           2 |           0 |    -658.643 | 
          1 |           3 |           2 |          10 |    -658.617 |  0.00154119 | 0.000277612 | 
          1 |           3 |           2 |          20 |    -658.607 | 0.000709856 | 0.000219579 | 
          1 |           3 |           2 |          30 |    -658.601 | 0.000385531 | 0.000159546 | 
          1 |           3 |           2 |          40 |    -658.599 | 0.000233214 | 0.000121666 | 
          1 |           3 |           2 |          50 |    -658.597 | 0.000151235 | 9.73729e-05 | 
          1 |           3 |           2 |          60 |    -658.595 | 0.000102359 |  7.6552e-05 | 
          1 |           3 |           2 |          70 |    -658.595 | 7.12123e-05 | 5.95255e-05 | 
          1 |           3 |           2 |          80 |    -658.594 | 5.05163e-05 | 4.59486e-05 | 
          1 |           3 |           2 |          90 |    -658.594 | 3.63745e-05 | 3.52902e-05 | 
          1 |           3 |           2 |         100 |    -658.593 | 2.65074e-05 | 2.70095e-05 | 
          1 |           3 |           2 |         110 |    -658.593 | 1.95062e-05 | 2.06218e-05 | 
          1 |           3 |           2 |         120 |    -658.593 | 1.44679e-05 |  1.5719e-05 | 
          1 |           3 |           2 |         130 |    -658.593 | 1.07992e-05 |  1.1969e-05 | 
          1 |           3 |           2 |         140 |    -658.593 | 8.10136e-06 | 9.10747e-06 | 
          1 |           3 |           2 |         150 |    -658.593 | 6.10157e-06 | 6.92748e-06 | 
          1 |           3 |           2 |         160 |    -658.593 | 4.60959e-06 | 5.26843e-06 | 
          1 |           3 |           2 |         170 |    -658.593 | 3.49075e-06 |  4.0066e-06 | 
          1 |           3 |           2 |         180 |    -658.593 | 2.64833e-06 | 3.04723e-06 | 
          1 |           3 |           2 |         190 |    -658.592 | 2.01205e-06 |  2.3179e-06 | 
          1 |           3 |           2 |         200 |    -658.592 |  1.5303e-06 | 1.76345e-06 | 
          1 |           3 |           2 |         210 |    -658.592 | 1.16485e-06 |  1.3419e-06 | 
          1 |           3 |           2 |         220 |    -658.592 | 8.87234e-07 | 1.02134e-06 | 
          1 |           3 |           2 |         230 |    -658.592 | 6.76107e-07 |  7.7753e-07 | 
          1 |           3 |           2 |         240 |    -658.592 | 5.15408e-07 | 5.92044e-07 | 
          1 |           3 |           2 |         250 |    -658.592 | 3.93015e-07 | 4.50898e-07 | 
          1 |           3 |           2 |         260 |    -658.592 |  2.9975e-07 | 3.43468e-07 | 
          1 |           3 |           2 |         270 |    -658.592 | 2.28654e-07 | 2.61681e-07 | 
          1 |           3 |           2 |         280 |    -658.592 | 1.74442e-07 | 1.99403e-07 | 
          1 |           3 |           2 |         290 |    -658.592 | 1.33096e-07 | 1.51969e-07 | 
          1 |           3 |           2 |         300 |    -658.592 | 1.01557e-07 | 1.15836e-07 | 
          1 |           3 |           2 |         310 |    -658.592 | 7.74965e-08 | 8.83047e-08 | 
          1 |           3 |           2 |         317 |    -658.592 | 6.41344e-08 | 7.30321e-08 | 
------------|-------------|-------------|-------------|-------------|-------------|-------------|
***************************************************************************
4 
------------|-------------|-------------|-------------|-------------|-------------|-------------|
     mod    |      k      |    start    |     step    |     lk      |    lk-lko   | discrepancy |
------------|-------------|-------------|-------------|-------------|-------------|-------------|
          1 |           4 |           0 |           0 |    -840.256 | 
          1 |           4 |           0 |          10 |     -659.91 |    0.168664 |  0.00629013 | 
          1 |           4 |           0 |          20 |    -658.963 |   0.0535591 |  0.00391873 | 
          1 |           4 |           0 |          30 |    -658.689 |   0.0142206 |  0.00176973 | 
          1 |           4 |           0 |          38 |    -658.618 |  0.00609158 | 0.000972571 | 
------------|-------------|-------------|-------------|-------------|-------------|-------------|
lktrace =  -658.618 
lk =  -895.2043 -697.6976 -658.5924 -658.618 
aic =  1794.409 1409.395 1345.185 1363.236 
bic =  1801.345 1433.672 1393.738 1443.001 
***************************************************************************
4 1 
------------|-------------|-------------|-------------|-------------|-------------|-------------|
     mod    |      k      |    start    |     step    |     lk      |    lk-lko   | discrepancy |
------------|-------------|-------------|-------------|-------------|-------------|-------------|
          1 |           4 |           1 |           0 |    -1729.41 | 
          1 |           4 |           1 |          10 |    -671.972 |     3.30918 |    0.050569 | 
          1 |           4 |           1 |          20 |    -659.829 |    0.242082 |   0.0109196 | 
          1 |           4 |           1 |          30 |    -658.946 |   0.0299069 |  0.00324286 | 
          1 |           4 |           1 |          40 |    -658.788 |   0.0110832 |  0.00110173 | 
          1 |           4 |           1 |          50 |    -658.674 |   0.0125561 | 0.000497757 | 
          1 |           4 |           1 |          60 |    -658.535 |   0.0140871 | 0.000731932 | 
          1 |           4 |           1 |          70 |    -658.413 |   0.0102356 | 0.000835724 | 
          1 |           4 |           1 |          79 |    -658.341 |  0.00643745 |  0.00083819 | 
------------|-------------|-------------|-------------|-------------|-------------|-------------|
lktrace =  -658.618 -658.3408 
lk =  -895.2043 -697.6976 -658.5924 -658.3408 
aic =  1794.409 1409.395 1345.185 1362.682 
bic =  1801.345 1433.672 1393.738 1442.447 
***************************************************************************
4 2 
------------|-------------|-------------|-------------|-------------|-------------|-------------|
     mod    |      k      |    start    |     step    |     lk      |    lk-lko   | discrepancy |
------------|-------------|-------------|-------------|-------------|-------------|-------------|
          1 |           4 |           1 |           0 |    -1140.83 | 
          1 |           4 |           1 |          10 |    -695.161 |    0.406811 |   0.0108206 | 
          1 |           4 |           1 |          20 |    -690.301 |    0.828808 |   0.0170439 | 
          1 |           4 |           1 |          30 |    -668.303 |     2.83709 |   0.0354246 | 
          1 |           4 |           1 |          40 |     -659.87 |    0.252099 |   0.0110467 | 
          1 |           4 |           1 |          50 |    -658.835 |   0.0356827 |  0.00387822 | 
          1 |           4 |           1 |          60 |    -658.681 |  0.00710409 |  0.00135483 | 
          1 |           4 |           1 |          61 |    -658.675 |  0.00630932 |  0.00123346 | 
------------|-------------|-------------|-------------|-------------|-------------|-------------|
lktrace =  -658.6748 -658.618 -658.3408 
lk =  -895.2043 -697.6976 -658.5924 -658.3408 
aic =  1794.409 1409.395 1345.185 1362.682 
bic =  1801.345 1433.672 1393.738 1442.447 
***************************************************************************
4 3 
------------|-------------|-------------|-------------|-------------|-------------|-------------|
     mod    |      k      |    start    |     step    |     lk      |    lk-lko   | discrepancy |
------------|-------------|-------------|-------------|-------------|-------------|-------------|
          1 |           4 |           1 |           0 |     -1994.5 | 
          1 |           4 |           1 |          10 |      -686.7 |     3.95252 |   0.0578034 | 
          1 |           4 |           1 |          20 |    -660.412 |    0.339566 |    0.011829 | 
          1 |           4 |           1 |          30 |    -659.012 |   0.0563549 |  0.00362908 | 
          1 |           4 |           1 |          40 |    -658.734 |   0.0150297 |  0.00127084 | 
          1 |           4 |           1 |          50 |    -658.638 |   0.0068318 | 0.000647271 | 
          1 |           4 |           1 |          51 |    -658.631 |  0.00644767 | 0.000621058 | 
------------|-------------|-------------|-------------|-------------|-------------|-------------|
lktrace =  -658.6748 -658.6314 -658.618 -658.3408 
lk =  -895.2043 -697.6976 -658.5924 -658.3408 
aic =  1794.409 1409.395 1345.185 1362.682 
bic =  1801.345 1433.672 1393.738 1442.447 
***************************************************************************
4 4 
------------|-------------|-------------|-------------|-------------|-------------|-------------|
     mod    |      k      |    start    |     step    |     lk      |    lk-lko   | discrepancy |
------------|-------------|-------------|-------------|-------------|-------------|-------------|
          1 |           4 |           1 |           0 |    -1200.36 | 
          1 |           4 |           1 |          10 |      -846.5 |     17.3542 |   0.0509761 | 
          1 |           4 |           1 |          20 |    -661.526 |     1.06346 |   0.0163774 | 
          1 |           4 |           1 |          30 |    -658.944 |   0.0720866 |  0.00539726 | 
          1 |           4 |           1 |          40 |    -658.654 |   0.0123288 |   0.0016907 | 
          1 |           4 |           1 |          46 |    -658.604 |   0.0062994 | 0.000929414 | 
------------|-------------|-------------|-------------|-------------|-------------|-------------|
lktrace =  -658.6748 -658.6314 -658.618 -658.6045 -658.3408 
lk =  -895.2043 -697.6976 -658.5924 -658.3408 
aic =  1794.409 1409.395 1345.185 1362.682 
bic =  1801.345 1433.672 1393.738 1442.447 
***************************************************************************
4 5 
------------|-------------|-------------|-------------|-------------|-------------|-------------|
     mod    |      k      |    start    |     step    |     lk      |    lk-lko   | discrepancy |
------------|-------------|-------------|-------------|-------------|-------------|-------------|
          1 |           4 |           1 |           0 |    -1198.51 | 
          1 |           4 |           1 |          10 |    -679.408 |      3.2964 |   0.0401547 | 
          1 |           4 |           1 |          20 |    -660.191 |    0.221687 |  0.00669223 | 
          1 |           4 |           1 |          30 |    -659.107 |   0.0558938 |  0.00398363 | 
          1 |           4 |           1 |          40 |    -658.798 |   0.0179147 |  0.00214391 | 
          1 |           4 |           1 |          50 |    -658.685 |  0.00783929 |   0.0011594 | 
          1 |           4 |           1 |          53 |    -658.664 |  0.00651336 | 0.000975848 | 
------------|-------------|-------------|-------------|-------------|-------------|-------------|
lktrace =  -658.6748 -658.6638 -658.6314 -658.618 -658.6045 -658.3408 
lk =  -895.2043 -697.6976 -658.5924 -658.3408 
aic =  1794.409 1409.395 1345.185 1362.682 
bic =  1801.345 1433.672 1393.738 1442.447 
***************************************************************************
4 6 
------------|-------------|-------------|-------------|-------------|-------------|-------------|
     mod    |      k      |    start    |     step    |     lk      |    lk-lko   | discrepancy |
------------|-------------|-------------|-------------|-------------|-------------|-------------|
          1 |           4 |           1 |           0 |    -1212.07 | 
          1 |           4 |           1 |          10 |    -703.583 |     6.39971 |   0.0525718 | 
          1 |           4 |           1 |          20 |    -692.557 |      1.3728 |    0.028271 | 
          1 |           4 |           1 |          30 |    -664.004 |      1.3868 |   0.0206473 | 
          1 |           4 |           1 |          40 |    -660.025 |    0.167281 |  0.00658925 | 
          1 |           4 |           1 |          50 |     -659.02 |   0.0645476 |  0.00454632 | 
          1 |           4 |           1 |          60 |    -658.598 |   0.0288051 |  0.00282552 | 
          1 |           4 |           1 |          70 |      -658.4 |   0.0141731 |  0.00172101 | 
          1 |           4 |           1 |          80 |    -658.298 |  0.00771784 |  0.00117498 | 
          1 |           4 |           1 |          83 |    -658.277 |  0.00655077 |   0.0010627 | 
------------|-------------|-------------|-------------|-------------|-------------|-------------|
lktrace =  -658.6748 -658.6638 -658.6314 -658.618 -658.6045 -658.3408 -658.2773 
lk =  -895.2043 -697.6976 -658.5924 -658.2773 
aic =  1794.409 1409.395 1345.185 1362.555 
bic =  1801.345 1433.672 1393.738 1442.32 
------------|-------------|-------------|-------------|-------------|-------------|-------------|
     mod    |      k      |    start    |     step    |     lk      |    lk-lko   | discrepancy |
------------|-------------|-------------|-------------|-------------|-------------|-------------|
          1 |           4 |           2 |           0 |    -658.277 | 
          1 |           4 |           2 |          10 |    -658.227 |  0.00400528 | 0.000782029 | 
          1 |           4 |           2 |          20 |    -658.195 |  0.00264024 | 0.000592944 | 
          1 |           4 |           2 |          30 |    -658.173 |  0.00186366 | 0.000559502 | 
          1 |           4 |           2 |          40 |    -658.158 |  0.00140378 | 0.000538859 | 
          1 |           4 |           2 |          50 |    -658.145 |  0.00112272 | 0.000521281 | 
          1 |           4 |           2 |          60 |    -658.135 |  0.00094511 | 0.000505817 | 
          1 |           4 |           2 |          70 |    -658.126 | 0.000828171 | 0.000491842 | 
          1 |           4 |           2 |          80 |    -658.118 | 0.000747298 | 0.000478952 | 
          1 |           4 |           2 |          90 |    -658.111 | 0.000688239 | 0.000466884 | 
          1 |           4 |           2 |         100 |    -658.105 | 0.000642666 | 0.000455454 | 
          1 |           4 |           2 |         110 |    -658.098 | 0.000605649 | 0.000444531 | 
          1 |           4 |           2 |         120 |    -658.093 | 0.000574225 | 0.000434017 | 
          1 |           4 |           2 |         130 |    -658.087 | 0.000546583 | 0.000424241 | 
          1 |           4 |           2 |         140 |    -658.082 | 0.000521601 | 0.000415935 | 
          1 |           4 |           2 |         150 |    -658.077 | 0.000498572 |  0.00040745 | 
          1 |           4 |           2 |         160 |    -658.072 | 0.000477046 | 0.000398848 | 
          1 |           4 |           2 |         170 |    -658.067 | 0.000456728 | 0.000390182 | 
          1 |           4 |           2 |         180 |    -658.063 | 0.000437428 | 0.000381494 | 
          1 |           4 |           2 |         190 |    -658.058 | 0.000419016 | 0.000372819 | 
          1 |           4 |           2 |         200 |    -658.054 | 0.000401404 | 0.000364185 | 
          1 |           4 |           2 |         210 |     -658.05 | 0.000384531 | 0.000355617 | 
          1 |           4 |           2 |         220 |    -658.047 | 0.000368349 | 0.000347133 | 
          1 |           4 |           2 |         230 |    -658.043 | 0.000352827 | 0.000338752 | 
          1 |           4 |           2 |         240 |    -658.039 | 0.000337935 | 0.000330486 | 
          1 |           4 |           2 |         250 |    -658.036 | 0.000323653 | 0.000322348 | 
          1 |           4 |           2 |         260 |    -658.033 |  0.00030996 | 0.000314347 | 
          1 |           4 |           2 |         270 |     -658.03 | 0.000296838 | 0.000306492 | 
          1 |           4 |           2 |         280 |    -658.027 | 0.000284272 | 0.000298789 | 
          1 |           4 |           2 |         290 |    -658.024 | 0.000272245 | 0.000291244 | 
          1 |           4 |           2 |         300 |    -658.022 | 0.000260741 |  0.00028386 | 
          1 |           4 |           2 |         310 |    -658.019 | 0.000249744 | 0.000276642 | 
          1 |           4 |           2 |         320 |    -658.017 |  0.00023924 | 0.000269592 | 
          1 |           4 |           2 |         330 |    -658.014 | 0.000229213 | 0.000262712 | 
          1 |           4 |           2 |         340 |    -658.012 | 0.000219647 | 0.000256002 | 
          1 |           4 |           2 |         350 |     -658.01 | 0.000210526 | 0.000249463 | 
          1 |           4 |           2 |         360 |    -658.008 | 0.000201835 | 0.000243095 | 
          1 |           4 |           2 |         370 |    -658.006 | 0.000193559 | 0.000236897 | 
          1 |           4 |           2 |         380 |    -658.004 | 0.000185682 | 0.000230868 | 
          1 |           4 |           2 |         390 |    -658.002 | 0.000178188 | 0.000225007 | 
          1 |           4 |           2 |         400 |        -658 | 0.000171064 | 0.000219311 | 
          1 |           4 |           2 |         410 |    -657.999 | 0.000164293 | 0.000213779 | 
          1 |           4 |           2 |         420 |    -657.997 | 0.000157861 | 0.000208409 | 
          1 |           4 |           2 |         430 |    -657.996 | 0.000151754 | 0.000203196 | 
          1 |           4 |           2 |         440 |    -657.994 | 0.000145958 |  0.00019814 | 
          1 |           4 |           2 |         450 |    -657.993 |  0.00014046 | 0.000193236 | 
          1 |           4 |           2 |         460 |    -657.991 | 0.000135244 | 0.000188482 | 
          1 |           4 |           2 |         470 |     -657.99 |   0.0001303 | 0.000183874 | 
          1 |           4 |           2 |         480 |    -657.989 | 0.000125614 |  0.00017941 | 
          1 |           4 |           2 |         490 |    -657.988 | 0.000121175 | 0.000175085 | 
          1 |           4 |           2 |         500 |    -657.986 |  0.00011697 | 0.000170896 | 
          1 |           4 |           2 |         510 |    -657.985 | 0.000112987 |  0.00016684 | 
          1 |           4 |           2 |         520 |    -657.984 | 0.000109217 | 0.000162913 | 
          1 |           4 |           2 |         530 |    -657.983 | 0.000105649 | 0.000159112 | 
          1 |           4 |           2 |         540 |    -657.982 | 0.000102272 | 0.000155434 | 
          1 |           4 |           2 |         550 |    -657.981 | 9.90777e-05 | 0.000151874 | 
          1 |           4 |           2 |         560 |     -657.98 | 9.60555e-05 |  0.00014843 | 
          1 |           4 |           2 |         570 |    -657.979 | 9.31971e-05 | 0.000145098 | 
          1 |           4 |           2 |         580 |    -657.978 | 9.04938e-05 | 0.000141875 | 
          1 |           4 |           2 |         590 |    -657.977 | 8.79377e-05 | 0.000138757 | 
          1 |           4 |           2 |         600 |    -657.976 | 8.55208e-05 | 0.000135741 | 
          1 |           4 |           2 |         610 |    -657.976 | 8.32359e-05 | 0.000132825 | 
          1 |           4 |           2 |         620 |    -657.975 | 8.10757e-05 | 0.000130004 | 
          1 |           4 |           2 |         630 |    -657.974 | 7.90335e-05 | 0.000127276 | 
          1 |           4 |           2 |         640 |    -657.973 |  7.7103e-05 | 0.000124638 | 
          1 |           4 |           2 |         650 |    -657.972 | 7.52779e-05 | 0.000122087 | 
          1 |           4 |           2 |         660 |    -657.972 | 7.35524e-05 | 0.000119619 | 
          1 |           4 |           2 |         670 |    -657.971 | 7.19211e-05 | 0.000117234 | 
          1 |           4 |           2 |         680 |     -657.97 | 7.03785e-05 | 0.000114926 | 
          1 |           4 |           2 |         690 |    -657.969 | 6.89197e-05 | 0.000112695 | 
          1 |           4 |           2 |         700 |    -657.969 | 6.75399e-05 | 0.000110537 | 
          1 |           4 |           2 |         710 |    -657.968 | 6.62346e-05 |  0.00010845 | 
          1 |           4 |           2 |         720 |    -657.967 | 6.49994e-05 | 0.000106431 | 
          1 |           4 |           2 |         730 |    -657.967 | 6.38303e-05 | 0.000104479 | 
          1 |           4 |           2 |         740 |    -657.966 | 6.27233e-05 |  0.00010259 | 
          1 |           4 |           2 |         750 |    -657.966 | 6.16748e-05 | 0.000100763 | 
          1 |           4 |           2 |         760 |    -657.965 | 6.06812e-05 | 9.89948e-05 | 
          1 |           4 |           2 |         770 |    -657.964 | 5.97392e-05 | 9.72842e-05 | 
          1 |           4 |           2 |         780 |    -657.964 | 5.88457e-05 | 9.56289e-05 | 
          1 |           4 |           2 |         790 |    -657.963 | 5.79977e-05 | 9.40269e-05 | 
          1 |           4 |           2 |         800 |    -657.963 | 5.71922e-05 | 9.24762e-05 | 
          1 |           4 |           2 |         810 |    -657.962 | 5.64266e-05 | 9.09751e-05 | 
          1 |           4 |           2 |         820 |    -657.961 | 5.56984e-05 | 8.95217e-05 | 
          1 |           4 |           2 |         830 |    -657.961 |  5.5005e-05 | 8.81143e-05 | 
          1 |           4 |           2 |         840 |     -657.96 | 5.43442e-05 | 8.67512e-05 | 
          1 |           4 |           2 |         850 |     -657.96 | 5.37138e-05 | 8.54307e-05 | 
          1 |           4 |           2 |         860 |    -657.959 | 5.31117e-05 | 8.41513e-05 | 
          1 |           4 |           2 |         870 |    -657.959 |  5.2536e-05 | 8.29114e-05 | 
          1 |           4 |           2 |         880 |    -657.958 | 5.19847e-05 | 8.17095e-05 | 
          1 |           4 |           2 |         890 |    -657.958 | 5.14561e-05 | 8.05443e-05 | 
          1 |           4 |           2 |         900 |    -657.957 | 5.09485e-05 | 7.94142e-05 | 
          1 |           4 |           2 |         910 |    -657.957 | 5.04604e-05 |  7.8318e-05 | 
          1 |           4 |           2 |         920 |    -657.956 | 4.99903e-05 | 7.72543e-05 | 
          1 |           4 |           2 |         930 |    -657.956 | 4.95368e-05 | 7.62218e-05 | 
          1 |           4 |           2 |         940 |    -657.955 | 4.90985e-05 | 7.52194e-05 | 
          1 |           4 |           2 |         950 |    -657.955 | 4.86742e-05 | 7.42457e-05 | 
          1 |           4 |           2 |         960 |    -657.954 | 4.82628e-05 | 7.32998e-05 | 
          1 |           4 |           2 |         970 |    -657.954 | 4.78632e-05 | 7.23804e-05 | 
          1 |           4 |           2 |         980 |    -657.953 | 4.74744e-05 | 7.14865e-05 | 
          1 |           4 |           2 |         990 |    -657.953 | 4.70956e-05 | 7.06171e-05 | 
          1 |           4 |           2 |        1000 |    -657.952 | 4.67259e-05 | 6.97711e-05 | 
          1 |           4 |           2 |        1000 |    -657.952 | 4.67259e-05 | 6.97711e-05 | 
------------|-------------|-------------|-------------|-------------|-------------|-------------|
Call:
search.model.LM(version = "basic", kv = 1:4, S, yv, mod = 1)
     states        lk np      AIC      BIC
[1,]      1 -895.2043  2 1794.409 1801.345
[2,]      2 -697.6976  7 1409.395 1433.672
[3,]      3 -658.5924 14 1345.185 1393.738
[4,]      4 -657.9524 23 1361.905 1441.670

LMest documentation built on Oct. 10, 2021, 1:09 a.m.