Skip to contents

This function takes a set of model specifications for the three sub-models of a mixture model and generates a simulation from this model specification

Usage

mixglmSimulation(
  numSims,
  stateValModels,
  stateProbModels,
  statePrecModels,
  inputData,
  numStates = NULL,
  stateValError = gaussian,
  coefficientValues = NULL
)

Arguments

numSims

The number of simulations to draw from the mixture model.

stateValModels

A formula describing the regression relationship between the mean of the response variable and the covariates for all mixture components, or a list of formulas with each element giving the regression relationship between the mean of the response variable and the covariates for each mixture component (ordered according to intercept of the mixture component on the y-axis). The response variable must be given on the left-hand side of the formula.

stateProbModels

A formula describing the regression relationship between the probability of the existence of mixture components and the covariates, or a list of formulas with each element giving the regression relationship between the probability of the existence of a mixture component and its covariates (ordered according to intercept of the mixture component on the y-axis).

statePrecModels

A formula describing the regression relationship between the variances in the mixture components and the covariates, or a list of formulas with each mixture component giving the regression relationship between the variance in the mixture component and the covariates for each mixture component (ordered according to intercept of the mixture component on the y-axis).

inputData

A data frame containing the covariate information and the response variable.

numStates

An integer scalar containing the number of components in the mixture. If any of the stateValModels, stateProbModels, or statePrecModels parameters is a list then numStates can be omitted and is therefore set to the length of the list.

stateValError

A description of the error distribution and link function to be used in the model describing the ecosystem state value. This can be from the family specification or character scalar with the following possible values: "gaussian", "gamma", "beta", or "negbinomial".

coefficientValues

A list containing the values of the coefficients to use in the simulation.

Value

A list containg a vector of simulated values for each stochastic node. In addition the following elements are appended to the list:

linStateVal

A matrix containing the predicted response variable values at each row of the input covariate data.frame. Each column represents the predicted response variable value for each mixture component

linStatePrec

A matrix containing the predicted precision of the response variable at each row of the input covariate data.frame. Each column represents the predicted precision of the response variable value for each mixture component

linStateProb

A matrix containing the probability of each mixture component existing at each row of the input covariate data.frame. Each column represents the probability of each mixture component existing

Details

Used parametrization of gamma, beta, and negbinomial distribution using mean and precision is internally reparametrized into typical shape and rate parametrization for gamma, two shape parameters for beta, and size and probability parameters for negbinomial. For all these distributions, their parameters are constrained (e.g. shape parameters of the beta distribution have to be positive). Consequently, not all combinations of mean and precision can be used. Generally to get legitimate coefficient values: Standardize your predictors and start with low coefficient values (for beta distribution, increase precision).

Author

Joseph D. Chipperfield, joechip90@googlemail.com

Examples

{
dat <- data.frame(x = rnorm(200), y = rnorm(200))
cfValues <- list(
  "intercept_stateVal" = c(-1.0, 0.5, 0.5),
  "x_stateVal" = c(-0.05, 0.05, 0.1),
  "intercept_stateProb" = c(NA, -1.0, 1.0),
  "intercept_statePrec" = c(0.5, 1.0, 1.5)
 )
 mixglmSimulation(
   numSims = 1,
   stateValModels = y ~ x,
   stateProbModels = ~ 1,
   statePrecModels = ~ 1,
   inputData = dat,
   numStates = 2,
   stateValError = gaussian,
   coefficientValues = cfValues
 )
}
#> Defining model
#> Building model
#> Setting data and initial values
#> Running calculate on model
#>   [Note] Any error reports that follow may simply reflect missing values in model variables.
#> Checking model sizes and dimensions
#> $y
#>                [,1]
#>   [1,] -1.540332926
#>   [2,] -1.552510805
#>   [3,]  0.061055405
#>   [4,] -0.413153540
#>   [5,] -0.577510070
#>   [6,] -0.291855573
#>   [7,] -0.069579857
#>   [8,] -0.635539113
#>   [9,] -0.288837248
#>  [10,] -3.392129271
#>  [11,] -0.082946921
#>  [12,] -1.623224050
#>  [13,] -1.044544160
#>  [14,] -0.250840398
#>  [15,] -1.045139763
#>  [16,] -0.129806245
#>  [17,] -0.566100177
#>  [18,] -1.931530194
#>  [19,] -0.316501245
#>  [20,] -1.637602744
#>  [21,] -1.168441885
#>  [22,] -2.060794700
#>  [23,] -0.854671530
#>  [24,] -1.204630304
#>  [25,] -0.411399782
#>  [26,]  0.220513393
#>  [27,] -1.249394122
#>  [28,] -0.745659693
#>  [29,] -1.857314762
#>  [30,] -1.077649404
#>  [31,] -0.270741099
#>  [32,] -1.282676499
#>  [33,] -0.138113190
#>  [34,] -0.111537008
#>  [35,] -2.366603440
#>  [36,] -0.985179659
#>  [37,] -1.327301462
#>  [38,] -0.856413362
#>  [39,] -1.921900194
#>  [40,] -0.498261346
#>  [41,] -0.636508356
#>  [42,] -1.692390086
#>  [43,]  0.036355176
#>  [44,] -1.386378524
#>  [45,] -1.786636227
#>  [46,] -0.199320523
#>  [47,] -0.397059571
#>  [48,] -0.535025361
#>  [49,] -1.732419991
#>  [50,]  0.170172696
#>  [51,] -1.044735066
#>  [52,] -0.419867224
#>  [53,] -1.003806949
#>  [54,] -0.836027440
#>  [55,] -1.862384962
#>  [56,] -2.080593924
#>  [57,] -0.665059914
#>  [58,] -1.104462434
#>  [59,]  0.998762212
#>  [60,]  0.006434390
#>  [61,] -1.161553433
#>  [62,] -0.714389389
#>  [63,] -1.497291060
#>  [64,] -1.084262411
#>  [65,] -0.424204441
#>  [66,] -0.252295884
#>  [67,]  0.134273586
#>  [68,]  1.141173716
#>  [69,] -1.364506511
#>  [70,] -1.221370017
#>  [71,] -1.362197304
#>  [72,] -0.385775643
#>  [73,] -0.532044123
#>  [74,] -1.599468350
#>  [75,] -1.669801678
#>  [76,] -0.157671356
#>  [77,] -1.243351727
#>  [78,] -0.368954807
#>  [79,] -1.489157692
#>  [80,] -1.646757068
#>  [81,] -0.722503123
#>  [82,] -0.835074452
#>  [83,] -0.136466310
#>  [84,] -0.305535444
#>  [85,] -1.142076540
#>  [86,] -0.344429090
#>  [87,] -0.673849748
#>  [88,] -1.086492888
#>  [89,] -1.091821166
#>  [90,] -1.221146583
#>  [91,] -0.819594023
#>  [92,] -0.107837892
#>  [93,]  0.494216249
#>  [94,] -1.592580669
#>  [95,] -1.005269045
#>  [96,] -0.222493616
#>  [97,] -0.404194894
#>  [98,] -0.898347569
#>  [99,]  0.338996765
#> [100,] -1.448637544
#> [101,]  0.342499559
#> [102,] -2.244575623
#> [103,] -0.371980819
#> [104,] -1.776151536
#> [105,] -0.648591808
#> [106,] -0.592450756
#> [107,] -0.350463385
#> [108,] -2.044774903
#> [109,] -0.106101915
#> [110,]  0.007825212
#> [111,] -1.088117925
#> [112,] -1.724698730
#> [113,] -1.311444796
#> [114,] -0.798212306
#> [115,]  0.289908330
#> [116,] -0.882496637
#> [117,] -1.352057069
#> [118,] -0.505479646
#> [119,]  0.335098907
#> [120,] -1.470596817
#> [121,] -0.209087438
#> [122,] -1.047178611
#> [123,] -0.452049556
#> [124,] -1.115102274
#> [125,] -0.403574449
#> [126,] -0.390381096
#> [127,] -0.506535184
#> [128,] -0.452860604
#> [129,] -3.458903384
#> [130,] -1.398382147
#> [131,] -1.933545456
#> [132,] -0.581388106
#> [133,] -0.389226214
#> [134,] -1.909285747
#> [135,]  0.230928030
#> [136,] -1.381305075
#> [137,] -2.182922287
#> [138,]  0.048959630
#> [139,] -0.595523729
#> [140,] -2.200917654
#> [141,] -0.086244112
#> [142,]  0.217217573
#> [143,] -1.139248807
#> [144,] -1.794052423
#> [145,] -1.083875037
#> [146,] -1.313443394
#> [147,] -0.787750344
#> [148,] -1.882994794
#> [149,]  0.106777081
#> [150,] -0.260158736
#> [151,] -0.843539367
#> [152,] -2.171955810
#> [153,] -1.852070624
#> [154,] -0.385477582
#> [155,] -0.835823638
#> [156,] -0.928589326
#> [157,] -1.497147690
#> [158,] -0.729502368
#> [159,] -0.178995952
#> [160,] -0.268712766
#> [161,] -0.192565732
#> [162,] -0.636324645
#> [163,] -0.724326515
#> [164,] -0.382467083
#> [165,] -0.539508857
#> [166,] -0.569200355
#> [167,] -1.037804605
#> [168,]  0.114374268
#> [169,] -1.998737138
#> [170,] -1.164983944
#> [171,] -1.708440746
#> [172,] -0.918600050
#> [173,] -3.248055276
#> [174,] -2.674057664
#> [175,] -1.007108564
#> [176,] -1.488495220
#> [177,] -1.037732233
#> [178,] -1.440576254
#> [179,] -0.206626999
#> [180,] -2.195886954
#> [181,] -2.476149837
#> [182,] -1.614300647
#> [183,] -0.713034482
#> [184,]  0.695512813
#> [185,] -0.458539183
#> [186,] -0.417292591
#> [187,] -1.901354851
#> [188,] -1.622070952
#> [189,] -0.144351023
#> [190,] -2.135294748
#> [191,] -0.161683542
#> [192,] -0.773939711
#> [193,] -2.188339392
#> [194,] -0.323227349
#> [195,] -0.866485003
#> [196,] -0.440893517
#> [197,] -0.575607003
#> [198,] -1.473765848
#> [199,] -2.244032008
#> [200,] -0.648028548
#> 
#> $linStateVal
#>              [,1]       [,2]
#>   [1,] -0.9997214 -0.5002786
#>   [2,] -1.0310776 -0.4689224
#>   [3,] -1.0574206 -0.4425794
#>   [4,] -0.9089091 -0.5910909
#>   [5,] -0.9876337 -0.5123663
#>   [6,] -0.9877900 -0.5122100
#>   [7,] -0.9858647 -0.5141353
#>   [8,] -0.9723150 -0.5276850
#>   [9,] -1.0314491 -0.4685509
#>  [10,] -1.1032512 -0.3967488
#>  [11,] -0.9184505 -0.5815495
#>  [12,] -1.0256213 -0.4743787
#>  [13,] -0.9068494 -0.5931506
#>  [14,] -0.9738994 -0.5261006
#>  [15,] -0.9973699 -0.5026301
#>  [16,] -1.0271498 -0.4728502
#>  [17,] -0.9542963 -0.5457037
#>  [18,] -1.0234077 -0.4765923
#>  [19,] -1.0181476 -0.4818524
#>  [20,] -0.9347728 -0.5652272
#>  [21,] -1.0368888 -0.4631112
#>  [22,] -1.0944252 -0.4055748
#>  [23,] -0.9951277 -0.5048723
#>  [24,] -0.9532076 -0.5467924
#>  [25,] -0.9992025 -0.5007975
#>  [26,] -0.9586606 -0.5413394
#>  [27,] -0.9243800 -0.5756200
#>  [28,] -1.0467682 -0.4532318
#>  [29,] -1.0088244 -0.4911756
#>  [30,] -1.0121843 -0.4878157
#>  [31,] -1.0811774 -0.4188226
#>  [32,] -1.0056019 -0.4943981
#>  [33,] -0.9933001 -0.5066999
#>  [34,] -0.9044956 -0.5955044
#>  [35,] -0.9860381 -0.5139619
#>  [36,] -0.9843277 -0.5156723
#>  [37,] -1.0533654 -0.4466346
#>  [38,] -1.0035017 -0.4964983
#>  [39,] -0.9680438 -0.5319562
#>  [40,] -0.9975018 -0.5024982
#>  [41,] -0.9874258 -0.5125742
#>  [42,] -1.0222399 -0.4777601
#>  [43,] -1.1377709 -0.3622291
#>  [44,] -1.0023266 -0.4976734
#>  [45,] -1.0288855 -0.4711145
#>  [46,] -1.0059097 -0.4940903
#>  [47,] -0.9044140 -0.5955860
#>  [48,] -1.0431043 -0.4568957
#>  [49,] -0.9878382 -0.5121618
#>  [50,] -0.9896956 -0.5103044
#>  [51,] -1.0009589 -0.4990411
#>  [52,] -1.0014780 -0.4985220
#>  [53,] -1.0274914 -0.4725086
#>  [54,] -0.8862943 -0.6137057
#>  [55,] -1.1341279 -0.3658721
#>  [56,] -0.9819389 -0.5180611
#>  [57,] -1.0106678 -0.4893322
#>  [58,] -1.0537173 -0.4462827
#>  [59,] -0.9667456 -0.5332544
#>  [60,] -1.0556976 -0.4443024
#>  [61,] -0.9877052 -0.5122948
#>  [62,] -0.9411218 -0.5588782
#>  [63,] -0.9512075 -0.5487925
#>  [64,] -1.0532529 -0.4467471
#>  [65,] -1.0065835 -0.4934165
#>  [66,] -1.0244314 -0.4755686
#>  [67,] -0.9150275 -0.5849725
#>  [68,] -0.9264632 -0.5735368
#>  [69,] -1.0142075 -0.4857925
#>  [70,] -1.0668660 -0.4331340
#>  [71,] -1.0118348 -0.4881652
#>  [72,] -1.0659147 -0.4340853
#>  [73,] -1.0261955 -0.4738045
#>  [74,] -1.0303374 -0.4696626
#>  [75,] -0.9945032 -0.5054968
#>  [76,] -1.0086091 -0.4913909
#>  [77,] -0.9954836 -0.5045164
#>  [78,] -1.0962172 -0.4037828
#>  [79,] -1.0649196 -0.4350804
#>  [80,] -1.0374396 -0.4625604
#>  [81,] -1.0278112 -0.4721888
#>  [82,] -0.9725871 -0.5274129
#>  [83,] -1.0555267 -0.4444733
#>  [84,] -0.8693833 -0.6306167
#>  [85,] -0.9922153 -0.5077847
#>  [86,] -1.0216945 -0.4783055
#>  [87,] -0.9809024 -0.5190976
#>  [88,] -1.0212094 -0.4787906
#>  [89,] -1.0531551 -0.4468449
#>  [90,] -1.0524356 -0.4475644
#>  [91,] -0.9980949 -0.5019051
#>  [92,] -1.0243074 -0.4756926
#>  [93,] -1.0836441 -0.4163559
#>  [94,] -0.9822819 -0.5177181
#>  [95,] -1.0473174 -0.4526826
#>  [96,] -1.0658413 -0.4341587
#>  [97,] -0.9851680 -0.5148320
#>  [98,] -0.9806393 -0.5193607
#>  [99,] -0.9607284 -0.5392716
#> [100,] -0.9471632 -0.5528368
#> [101,] -0.9602229 -0.5397771
#> [102,] -0.9121862 -0.5878138
#> [103,] -0.9654731 -0.5345269
#> [104,] -0.9720729 -0.5279271
#> [105,] -0.9731668 -0.5268332
#> [106,] -1.0113564 -0.4886436
#> [107,] -1.0489227 -0.4510773
#> [108,] -0.9895559 -0.5104441
#> [109,] -0.9300295 -0.5699705
#> [110,] -1.0129269 -0.4870731
#> [111,] -0.9779100 -0.5220900
#> [112,] -1.0284300 -0.4715700
#> [113,] -1.1063425 -0.3936575
#> [114,] -1.0212429 -0.4787571
#> [115,] -0.9157859 -0.5842141
#> [116,] -1.0124701 -0.4875299
#> [117,] -1.0536419 -0.4463581
#> [118,] -1.1019685 -0.3980315
#> [119,] -1.0224727 -0.4775273
#> [120,] -1.0695907 -0.4304093
#> [121,] -1.0213283 -0.4786717
#> [122,] -1.0053792 -0.4946208
#> [123,] -1.0011147 -0.4988853
#> [124,] -1.0301806 -0.4698194
#> [125,] -0.9868675 -0.5131325
#> [126,] -0.9735868 -0.5264132
#> [127,] -1.0096075 -0.4903925
#> [128,] -0.9426900 -0.5573100
#> [129,] -1.0423092 -0.4576908
#> [130,] -1.0040860 -0.4959140
#> [131,] -0.9347441 -0.5652559
#> [132,] -0.9527544 -0.5472456
#> [133,] -1.0227171 -0.4772829
#> [134,] -0.9572399 -0.5427601
#> [135,] -0.9856552 -0.5143448
#> [136,] -1.0447481 -0.4552519
#> [137,] -1.0033652 -0.4966348
#> [138,] -0.9918662 -0.5081338
#> [139,] -0.9586345 -0.5413655
#> [140,] -1.0938253 -0.4061747
#> [141,] -1.0383220 -0.4616780
#> [142,] -1.0489978 -0.4510022
#> [143,] -1.0660890 -0.4339110
#> [144,] -0.9440145 -0.5559855
#> [145,] -1.0257300 -0.4742700
#> [146,] -0.9245450 -0.5754550
#> [147,] -1.0766371 -0.4233629
#> [148,] -1.0214574 -0.4785426
#> [149,] -1.0061052 -0.4938948
#> [150,] -0.9430994 -0.5569006
#> [151,] -0.9720992 -0.5279008
#> [152,] -1.0526269 -0.4473731
#> [153,] -1.0338842 -0.4661158
#> [154,] -1.0019250 -0.4980750
#> [155,] -0.9821809 -0.5178191
#> [156,] -1.0391422 -0.4608578
#> [157,] -1.0402206 -0.4597794
#> [158,] -0.9049970 -0.5950030
#> [159,] -1.0467892 -0.4532108
#> [160,] -0.9845474 -0.5154526
#> [161,] -1.0131533 -0.4868467
#> [162,] -0.9104704 -0.5895296
#> [163,] -0.9605871 -0.5394129
#> [164,] -0.9433489 -0.5566511
#> [165,] -1.0181826 -0.4818174
#> [166,] -0.9857056 -0.5142944
#> [167,] -1.0258835 -0.4741165
#> [168,] -0.9948546 -0.5051454
#> [169,] -0.9512965 -0.5487035
#> [170,] -1.0635336 -0.4364664
#> [171,] -1.0480432 -0.4519568
#> [172,] -1.0384361 -0.4615639
#> [173,] -1.0517965 -0.4482035
#> [174,] -0.9763056 -0.5236944
#> [175,] -0.9362333 -0.5637667
#> [176,] -0.9847190 -0.5152810
#> [177,] -1.1105885 -0.3894115
#> [178,] -0.9479166 -0.5520834
#> [179,] -0.9426738 -0.5573262
#> [180,] -0.9162336 -0.5837664
#> [181,] -1.0762969 -0.4237031
#> [182,] -1.0277093 -0.4722907
#> [183,] -1.0996555 -0.4003445
#> [184,] -0.9922940 -0.5077060
#> [185,] -1.1282204 -0.3717796
#> [186,] -1.0531000 -0.4469000
#> [187,] -1.0571347 -0.4428653
#> [188,] -1.0561919 -0.4438081
#> [189,] -0.9801499 -0.5198501
#> [190,] -0.9588369 -0.5411631
#> [191,] -0.9710558 -0.5289442
#> [192,] -1.0881895 -0.4118105
#> [193,] -1.0066496 -0.4933504
#> [194,] -1.0188250 -0.4811750
#> [195,] -1.0569354 -0.4430646
#> [196,] -1.0620632 -0.4379368
#> [197,] -1.0306045 -0.4693955
#> [198,] -0.9785310 -0.5214690
#> [199,] -1.0680231 -0.4319769
#> [200,] -0.9964571 -0.5035429
#> 
#> $linStatePrec
#>            [,1]     [,2]
#>   [1,] 1.648721 2.718282
#>   [2,] 1.648721 2.718282
#>   [3,] 1.648721 2.718282
#>   [4,] 1.648721 2.718282
#>   [5,] 1.648721 2.718282
#>   [6,] 1.648721 2.718282
#>   [7,] 1.648721 2.718282
#>   [8,] 1.648721 2.718282
#>   [9,] 1.648721 2.718282
#>  [10,] 1.648721 2.718282
#>  [11,] 1.648721 2.718282
#>  [12,] 1.648721 2.718282
#>  [13,] 1.648721 2.718282
#>  [14,] 1.648721 2.718282
#>  [15,] 1.648721 2.718282
#>  [16,] 1.648721 2.718282
#>  [17,] 1.648721 2.718282
#>  [18,] 1.648721 2.718282
#>  [19,] 1.648721 2.718282
#>  [20,] 1.648721 2.718282
#>  [21,] 1.648721 2.718282
#>  [22,] 1.648721 2.718282
#>  [23,] 1.648721 2.718282
#>  [24,] 1.648721 2.718282
#>  [25,] 1.648721 2.718282
#>  [26,] 1.648721 2.718282
#>  [27,] 1.648721 2.718282
#>  [28,] 1.648721 2.718282
#>  [29,] 1.648721 2.718282
#>  [30,] 1.648721 2.718282
#>  [31,] 1.648721 2.718282
#>  [32,] 1.648721 2.718282
#>  [33,] 1.648721 2.718282
#>  [34,] 1.648721 2.718282
#>  [35,] 1.648721 2.718282
#>  [36,] 1.648721 2.718282
#>  [37,] 1.648721 2.718282
#>  [38,] 1.648721 2.718282
#>  [39,] 1.648721 2.718282
#>  [40,] 1.648721 2.718282
#>  [41,] 1.648721 2.718282
#>  [42,] 1.648721 2.718282
#>  [43,] 1.648721 2.718282
#>  [44,] 1.648721 2.718282
#>  [45,] 1.648721 2.718282
#>  [46,] 1.648721 2.718282
#>  [47,] 1.648721 2.718282
#>  [48,] 1.648721 2.718282
#>  [49,] 1.648721 2.718282
#>  [50,] 1.648721 2.718282
#>  [51,] 1.648721 2.718282
#>  [52,] 1.648721 2.718282
#>  [53,] 1.648721 2.718282
#>  [54,] 1.648721 2.718282
#>  [55,] 1.648721 2.718282
#>  [56,] 1.648721 2.718282
#>  [57,] 1.648721 2.718282
#>  [58,] 1.648721 2.718282
#>  [59,] 1.648721 2.718282
#>  [60,] 1.648721 2.718282
#>  [61,] 1.648721 2.718282
#>  [62,] 1.648721 2.718282
#>  [63,] 1.648721 2.718282
#>  [64,] 1.648721 2.718282
#>  [65,] 1.648721 2.718282
#>  [66,] 1.648721 2.718282
#>  [67,] 1.648721 2.718282
#>  [68,] 1.648721 2.718282
#>  [69,] 1.648721 2.718282
#>  [70,] 1.648721 2.718282
#>  [71,] 1.648721 2.718282
#>  [72,] 1.648721 2.718282
#>  [73,] 1.648721 2.718282
#>  [74,] 1.648721 2.718282
#>  [75,] 1.648721 2.718282
#>  [76,] 1.648721 2.718282
#>  [77,] 1.648721 2.718282
#>  [78,] 1.648721 2.718282
#>  [79,] 1.648721 2.718282
#>  [80,] 1.648721 2.718282
#>  [81,] 1.648721 2.718282
#>  [82,] 1.648721 2.718282
#>  [83,] 1.648721 2.718282
#>  [84,] 1.648721 2.718282
#>  [85,] 1.648721 2.718282
#>  [86,] 1.648721 2.718282
#>  [87,] 1.648721 2.718282
#>  [88,] 1.648721 2.718282
#>  [89,] 1.648721 2.718282
#>  [90,] 1.648721 2.718282
#>  [91,] 1.648721 2.718282
#>  [92,] 1.648721 2.718282
#>  [93,] 1.648721 2.718282
#>  [94,] 1.648721 2.718282
#>  [95,] 1.648721 2.718282
#>  [96,] 1.648721 2.718282
#>  [97,] 1.648721 2.718282
#>  [98,] 1.648721 2.718282
#>  [99,] 1.648721 2.718282
#> [100,] 1.648721 2.718282
#> [101,] 1.648721 2.718282
#> [102,] 1.648721 2.718282
#> [103,] 1.648721 2.718282
#> [104,] 1.648721 2.718282
#> [105,] 1.648721 2.718282
#> [106,] 1.648721 2.718282
#> [107,] 1.648721 2.718282
#> [108,] 1.648721 2.718282
#> [109,] 1.648721 2.718282
#> [110,] 1.648721 2.718282
#> [111,] 1.648721 2.718282
#> [112,] 1.648721 2.718282
#> [113,] 1.648721 2.718282
#> [114,] 1.648721 2.718282
#> [115,] 1.648721 2.718282
#> [116,] 1.648721 2.718282
#> [117,] 1.648721 2.718282
#> [118,] 1.648721 2.718282
#> [119,] 1.648721 2.718282
#> [120,] 1.648721 2.718282
#> [121,] 1.648721 2.718282
#> [122,] 1.648721 2.718282
#> [123,] 1.648721 2.718282
#> [124,] 1.648721 2.718282
#> [125,] 1.648721 2.718282
#> [126,] 1.648721 2.718282
#> [127,] 1.648721 2.718282
#> [128,] 1.648721 2.718282
#> [129,] 1.648721 2.718282
#> [130,] 1.648721 2.718282
#> [131,] 1.648721 2.718282
#> [132,] 1.648721 2.718282
#> [133,] 1.648721 2.718282
#> [134,] 1.648721 2.718282
#> [135,] 1.648721 2.718282
#> [136,] 1.648721 2.718282
#> [137,] 1.648721 2.718282
#> [138,] 1.648721 2.718282
#> [139,] 1.648721 2.718282
#> [140,] 1.648721 2.718282
#> [141,] 1.648721 2.718282
#> [142,] 1.648721 2.718282
#> [143,] 1.648721 2.718282
#> [144,] 1.648721 2.718282
#> [145,] 1.648721 2.718282
#> [146,] 1.648721 2.718282
#> [147,] 1.648721 2.718282
#> [148,] 1.648721 2.718282
#> [149,] 1.648721 2.718282
#> [150,] 1.648721 2.718282
#> [151,] 1.648721 2.718282
#> [152,] 1.648721 2.718282
#> [153,] 1.648721 2.718282
#> [154,] 1.648721 2.718282
#> [155,] 1.648721 2.718282
#> [156,] 1.648721 2.718282
#> [157,] 1.648721 2.718282
#> [158,] 1.648721 2.718282
#> [159,] 1.648721 2.718282
#> [160,] 1.648721 2.718282
#> [161,] 1.648721 2.718282
#> [162,] 1.648721 2.718282
#> [163,] 1.648721 2.718282
#> [164,] 1.648721 2.718282
#> [165,] 1.648721 2.718282
#> [166,] 1.648721 2.718282
#> [167,] 1.648721 2.718282
#> [168,] 1.648721 2.718282
#> [169,] 1.648721 2.718282
#> [170,] 1.648721 2.718282
#> [171,] 1.648721 2.718282
#> [172,] 1.648721 2.718282
#> [173,] 1.648721 2.718282
#> [174,] 1.648721 2.718282
#> [175,] 1.648721 2.718282
#> [176,] 1.648721 2.718282
#> [177,] 1.648721 2.718282
#> [178,] 1.648721 2.718282
#> [179,] 1.648721 2.718282
#> [180,] 1.648721 2.718282
#> [181,] 1.648721 2.718282
#> [182,] 1.648721 2.718282
#> [183,] 1.648721 2.718282
#> [184,] 1.648721 2.718282
#> [185,] 1.648721 2.718282
#> [186,] 1.648721 2.718282
#> [187,] 1.648721 2.718282
#> [188,] 1.648721 2.718282
#> [189,] 1.648721 2.718282
#> [190,] 1.648721 2.718282
#> [191,] 1.648721 2.718282
#> [192,] 1.648721 2.718282
#> [193,] 1.648721 2.718282
#> [194,] 1.648721 2.718282
#> [195,] 1.648721 2.718282
#> [196,] 1.648721 2.718282
#> [197,] 1.648721 2.718282
#> [198,] 1.648721 2.718282
#> [199,] 1.648721 2.718282
#> [200,] 1.648721 2.718282
#> 
#> $linStateProb
#>             [,1]      [,2]
#>   [1,] 0.7310586 0.2689414
#>   [2,] 0.7310586 0.2689414
#>   [3,] 0.7310586 0.2689414
#>   [4,] 0.7310586 0.2689414
#>   [5,] 0.7310586 0.2689414
#>   [6,] 0.7310586 0.2689414
#>   [7,] 0.7310586 0.2689414
#>   [8,] 0.7310586 0.2689414
#>   [9,] 0.7310586 0.2689414
#>  [10,] 0.7310586 0.2689414
#>  [11,] 0.7310586 0.2689414
#>  [12,] 0.7310586 0.2689414
#>  [13,] 0.7310586 0.2689414
#>  [14,] 0.7310586 0.2689414
#>  [15,] 0.7310586 0.2689414
#>  [16,] 0.7310586 0.2689414
#>  [17,] 0.7310586 0.2689414
#>  [18,] 0.7310586 0.2689414
#>  [19,] 0.7310586 0.2689414
#>  [20,] 0.7310586 0.2689414
#>  [21,] 0.7310586 0.2689414
#>  [22,] 0.7310586 0.2689414
#>  [23,] 0.7310586 0.2689414
#>  [24,] 0.7310586 0.2689414
#>  [25,] 0.7310586 0.2689414
#>  [26,] 0.7310586 0.2689414
#>  [27,] 0.7310586 0.2689414
#>  [28,] 0.7310586 0.2689414
#>  [29,] 0.7310586 0.2689414
#>  [30,] 0.7310586 0.2689414
#>  [31,] 0.7310586 0.2689414
#>  [32,] 0.7310586 0.2689414
#>  [33,] 0.7310586 0.2689414
#>  [34,] 0.7310586 0.2689414
#>  [35,] 0.7310586 0.2689414
#>  [36,] 0.7310586 0.2689414
#>  [37,] 0.7310586 0.2689414
#>  [38,] 0.7310586 0.2689414
#>  [39,] 0.7310586 0.2689414
#>  [40,] 0.7310586 0.2689414
#>  [41,] 0.7310586 0.2689414
#>  [42,] 0.7310586 0.2689414
#>  [43,] 0.7310586 0.2689414
#>  [44,] 0.7310586 0.2689414
#>  [45,] 0.7310586 0.2689414
#>  [46,] 0.7310586 0.2689414
#>  [47,] 0.7310586 0.2689414
#>  [48,] 0.7310586 0.2689414
#>  [49,] 0.7310586 0.2689414
#>  [50,] 0.7310586 0.2689414
#>  [51,] 0.7310586 0.2689414
#>  [52,] 0.7310586 0.2689414
#>  [53,] 0.7310586 0.2689414
#>  [54,] 0.7310586 0.2689414
#>  [55,] 0.7310586 0.2689414
#>  [56,] 0.7310586 0.2689414
#>  [57,] 0.7310586 0.2689414
#>  [58,] 0.7310586 0.2689414
#>  [59,] 0.7310586 0.2689414
#>  [60,] 0.7310586 0.2689414
#>  [61,] 0.7310586 0.2689414
#>  [62,] 0.7310586 0.2689414
#>  [63,] 0.7310586 0.2689414
#>  [64,] 0.7310586 0.2689414
#>  [65,] 0.7310586 0.2689414
#>  [66,] 0.7310586 0.2689414
#>  [67,] 0.7310586 0.2689414
#>  [68,] 0.7310586 0.2689414
#>  [69,] 0.7310586 0.2689414
#>  [70,] 0.7310586 0.2689414
#>  [71,] 0.7310586 0.2689414
#>  [72,] 0.7310586 0.2689414
#>  [73,] 0.7310586 0.2689414
#>  [74,] 0.7310586 0.2689414
#>  [75,] 0.7310586 0.2689414
#>  [76,] 0.7310586 0.2689414
#>  [77,] 0.7310586 0.2689414
#>  [78,] 0.7310586 0.2689414
#>  [79,] 0.7310586 0.2689414
#>  [80,] 0.7310586 0.2689414
#>  [81,] 0.7310586 0.2689414
#>  [82,] 0.7310586 0.2689414
#>  [83,] 0.7310586 0.2689414
#>  [84,] 0.7310586 0.2689414
#>  [85,] 0.7310586 0.2689414
#>  [86,] 0.7310586 0.2689414
#>  [87,] 0.7310586 0.2689414
#>  [88,] 0.7310586 0.2689414
#>  [89,] 0.7310586 0.2689414
#>  [90,] 0.7310586 0.2689414
#>  [91,] 0.7310586 0.2689414
#>  [92,] 0.7310586 0.2689414
#>  [93,] 0.7310586 0.2689414
#>  [94,] 0.7310586 0.2689414
#>  [95,] 0.7310586 0.2689414
#>  [96,] 0.7310586 0.2689414
#>  [97,] 0.7310586 0.2689414
#>  [98,] 0.7310586 0.2689414
#>  [99,] 0.7310586 0.2689414
#> [100,] 0.7310586 0.2689414
#> [101,] 0.7310586 0.2689414
#> [102,] 0.7310586 0.2689414
#> [103,] 0.7310586 0.2689414
#> [104,] 0.7310586 0.2689414
#> [105,] 0.7310586 0.2689414
#> [106,] 0.7310586 0.2689414
#> [107,] 0.7310586 0.2689414
#> [108,] 0.7310586 0.2689414
#> [109,] 0.7310586 0.2689414
#> [110,] 0.7310586 0.2689414
#> [111,] 0.7310586 0.2689414
#> [112,] 0.7310586 0.2689414
#> [113,] 0.7310586 0.2689414
#> [114,] 0.7310586 0.2689414
#> [115,] 0.7310586 0.2689414
#> [116,] 0.7310586 0.2689414
#> [117,] 0.7310586 0.2689414
#> [118,] 0.7310586 0.2689414
#> [119,] 0.7310586 0.2689414
#> [120,] 0.7310586 0.2689414
#> [121,] 0.7310586 0.2689414
#> [122,] 0.7310586 0.2689414
#> [123,] 0.7310586 0.2689414
#> [124,] 0.7310586 0.2689414
#> [125,] 0.7310586 0.2689414
#> [126,] 0.7310586 0.2689414
#> [127,] 0.7310586 0.2689414
#> [128,] 0.7310586 0.2689414
#> [129,] 0.7310586 0.2689414
#> [130,] 0.7310586 0.2689414
#> [131,] 0.7310586 0.2689414
#> [132,] 0.7310586 0.2689414
#> [133,] 0.7310586 0.2689414
#> [134,] 0.7310586 0.2689414
#> [135,] 0.7310586 0.2689414
#> [136,] 0.7310586 0.2689414
#> [137,] 0.7310586 0.2689414
#> [138,] 0.7310586 0.2689414
#> [139,] 0.7310586 0.2689414
#> [140,] 0.7310586 0.2689414
#> [141,] 0.7310586 0.2689414
#> [142,] 0.7310586 0.2689414
#> [143,] 0.7310586 0.2689414
#> [144,] 0.7310586 0.2689414
#> [145,] 0.7310586 0.2689414
#> [146,] 0.7310586 0.2689414
#> [147,] 0.7310586 0.2689414
#> [148,] 0.7310586 0.2689414
#> [149,] 0.7310586 0.2689414
#> [150,] 0.7310586 0.2689414
#> [151,] 0.7310586 0.2689414
#> [152,] 0.7310586 0.2689414
#> [153,] 0.7310586 0.2689414
#> [154,] 0.7310586 0.2689414
#> [155,] 0.7310586 0.2689414
#> [156,] 0.7310586 0.2689414
#> [157,] 0.7310586 0.2689414
#> [158,] 0.7310586 0.2689414
#> [159,] 0.7310586 0.2689414
#> [160,] 0.7310586 0.2689414
#> [161,] 0.7310586 0.2689414
#> [162,] 0.7310586 0.2689414
#> [163,] 0.7310586 0.2689414
#> [164,] 0.7310586 0.2689414
#> [165,] 0.7310586 0.2689414
#> [166,] 0.7310586 0.2689414
#> [167,] 0.7310586 0.2689414
#> [168,] 0.7310586 0.2689414
#> [169,] 0.7310586 0.2689414
#> [170,] 0.7310586 0.2689414
#> [171,] 0.7310586 0.2689414
#> [172,] 0.7310586 0.2689414
#> [173,] 0.7310586 0.2689414
#> [174,] 0.7310586 0.2689414
#> [175,] 0.7310586 0.2689414
#> [176,] 0.7310586 0.2689414
#> [177,] 0.7310586 0.2689414
#> [178,] 0.7310586 0.2689414
#> [179,] 0.7310586 0.2689414
#> [180,] 0.7310586 0.2689414
#> [181,] 0.7310586 0.2689414
#> [182,] 0.7310586 0.2689414
#> [183,] 0.7310586 0.2689414
#> [184,] 0.7310586 0.2689414
#> [185,] 0.7310586 0.2689414
#> [186,] 0.7310586 0.2689414
#> [187,] 0.7310586 0.2689414
#> [188,] 0.7310586 0.2689414
#> [189,] 0.7310586 0.2689414
#> [190,] 0.7310586 0.2689414
#> [191,] 0.7310586 0.2689414
#> [192,] 0.7310586 0.2689414
#> [193,] 0.7310586 0.2689414
#> [194,] 0.7310586 0.2689414
#> [195,] 0.7310586 0.2689414
#> [196,] 0.7310586 0.2689414
#> [197,] 0.7310586 0.2689414
#> [198,] 0.7310586 0.2689414
#> [199,] 0.7310586 0.2689414
#> [200,] 0.7310586 0.2689414
#>