fit.mptinr: Fit cognitive models for categorical data using an objective...

Description Usage Arguments Details Value Note Note Author(s) References See Also Examples

View source: R/fit.mptinr.R

Description

Fitting function for package MPTinR. Can fit any model for categorical data specified in an objective function. Fitting can be enhanced with gradient and or Hessian. Predicted values will be added when a prediction function is present.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
fit.mptinr(
	data,
	objective, 
	param.names,
	categories.per.type,
	gradient = NULL, use.gradient = TRUE,
	hessian = NULL, use.hessian = FALSE,
	prediction = NULL,
	n.optim = 5,
	fia.df = NULL,
	ci = 95, 
	starting.values = NULL,
	lower.bound = 0,
	upper.bound = 1,
	output = c("standard", "fia", "full"),
	fit.aggregated = TRUE,
	sort.param = TRUE,
	show.messages = TRUE,
	use.restrictions = FALSE,
	orig.params = NULL,
	restrictions = NULL,	
	multicore = c("none", "individual", "n.optim"), sfInit = FALSE, nCPU = 2,
	control = list(),
    numDeriv = TRUE,
	...
)

Arguments

data

Either a numeric vector for individual fit or a numeric matrix or data.frame for multi-dataset fit. The data on each position (column for multi-dataset fit) must correspond to the respective line in the model file. Fitting for multiple datasets can be parallelized via multicore.

objective

the objective function used for fitting. Needs to return a scalar likelihood value.

param.names

character vector giving the parameters present in the model. The order of this vector determines the order with which the output from the fitting routine is interpreted.

categories.per.type

numeric vector indicating how many response categories each item type has.

gradient

the gradient function used for fitting. Needs to return a vector of same length as param.names.

use.gradient

logical. indicating whether or not gradient should be used for fitting. Default is TRUE

hessian

the Hessian function used for fitting. Needs to return a matrix with dim = c(length(param.names), length(param.names).

use.hessian

logical. indicating whether or not hessian should be used for fitting. Default is FALSE

prediction

the prediction function. Needs to return a vector of equal length as the response categories or data. Needs to return probabilities!

n.optim

Number of optimization runs. Can be parallelized via multicore. Default is 5.

fia.df

needed for handling MPTs with computation of FIA coming from fit.mpt or fit.model. Do not use.

ci

A scalar corresponding to the size of the confidence intervals for the parameter estimates. Default is 95 which corresponds to 95% confidence intervals.

starting.values

A vector, a list, or NULL (the default). If NULL starting values for parameters are randomly drawn from a uniform distribution with the interval (0.1 - 0.9). See Details for the other options.

lower.bound

numeric scalar or vector. Can be used in fit.model to set the lower bounds of the parameter space. See Details.

upper.bound

numeric scalar or vector. Can be used in fit.model to set the upper bounds of the parameter space. See Details.

output

If "full" fit.mpt will additionally return the return values of nlminb and the Hessian matrices. (If "fia", fit.mpt will additionally return the results from get.mpt.fia (if fia not equal NULL).)

fit.aggregated

logical. Only relevant for multiple datasets (i.e., matrix or data.frame). Should the aggregated dataset (i.e., data summed over rows) be additionally fitted? Default (TRUE) fits the aggregated data.

sort.param

Logical. If TRUE, parameters are alphabetically sorted in the parameter table. If FALSE, the first parameters in the parameter table are the non-restricted ones, followed by the restricted parameters. Default is TRUE.

show.messages

Logical. If TRUE the time the fitting algorithms takes is printed to the console.

use.restrictions

needed for handling MPTs coming from fit.mpt. Do not use, unless you are sure what you are doing.

orig.params

needed for handling models coming from fit.mpt or fit.model. Do not use, unless you are sure what you are doing.

restrictions

needed for handling models coming from fit.mpt or fit.model. Do not use, unless you are sure what you are doing.

multicore

Character vector. If not "none", uses snowfall for parallelization (which needs to be installed separately via install.packages(snowfall)). If "individual", parallelizes the optimization for each individual (i.e., data needs to be a matrix or data.frame). If "n.optim", parallelizes the n.optim optimization runs. Default is "none" which corresponds to no parallelization. Note that you need to initialize snowfall in default settings. See sfInit and Details.

sfInit

Logical. Relevant if multicore is not "none". If TRUE, fit.mpt will initialize and close the multicore support. If FALSE, (the default) assumes that sfInit() was initialized before. See Details.

nCPU

Scalar. Only relevant if multicore is not "none" and sfInit is TRUE. Number of CPUs used by snowfall. Default is 2.

control

list containing control arguments passed on to nlminb. See there.

numDeriv

logical. Should the Hessian matrix of the maximum likelihood estimates be estimated numerically using numDeriv::hessian in case it cannot be estimated analytically? This can be extremely time and memory consuming for larger models. Default is TRUE.

...

arguments passed on to the objective function, the gradient function, the hessian function and the prediction function.

Details

This functions can be used to fit any model for categorical data that can be specified via a (objective) function (i.e., especially models that are not MPTs). For fitting MPTs or other similar models such as SDTs see fit.mpt or fit.model.

The only mandatory arguments are: data, objective, param.names, and categories.per.type. Adding a function calculating the gradient will usually significantly speed up the fitting. However, in extreme cases (i.e., many empty cells) using the gradient can interfere with finding the global minima. Adding the function computing the hessian matrix is usually only useful for obtaining the accurate confidence intervals (usually the numerically estimated Hessian matrix is equivalent unless there are many empty cells or parameters at the boundary).

The objective (and gradient and hessian) function need to take as the first argument a numerical vector of length(param.names) representing the parameters. The other mandatory arguments for these functions are:
data: A vector containing the data for the dataset being fitted.
param.names: The character vector containing the parameter names is handed over to the objective.
n.params: = length(param.names). To speed up computation the number of parameters is also handed over to the objective on each iteration.
tmp.env: A environment (created with new.env). The objective function produced by fit.mpt assign the parameter values into this environment using the following statement:
for (i in seq_len(n.params)) assign(param.names[i],Q[i], envir = tmp.env)
Furthermore, fit.mptinr assigns the data points before fitting each dataset into tmp.env with the variables names hank.data.x where x is the ordinal number of that data point (i.e., position or column). In other words, you can use tmp.env to eval you model within this environment and access both parameters and data in it.
lower.bound and upper.bound: both lower.bound and upper.bound will be passed on to the user-supplied functions as when nlminb fits without gradient it can try to use parameter values outside the bounds. This can be controlled with these arguments isnide the objective function.

Furthermore, note that all arguments passed via ... will be passed to objective, gradient, and hessian. And that these three functions need to take the same arguments. Furthermore gradient must return a vector as long as param.names and hessian must return a square matrix of order length(param.names). See nlminb for (slightly) more info.

Usage of gradient and/or hessian can be controlled with use.gradient and use.hessian.

prediction is a function similar to objective with the difference that it should return a vector of length sum(categories.per.type giving the probabilities for each item type. This function needs to take the same arguments as objective with the only exception that it does not take lower.bound and upper.bound (but ... is passed on to it).

Note that parameters names should not start with hank..

To set the starting values for the fitting process (e.g., to avoid local minima) one can set starting.values to a vector of length 2 and n.optim > 1. Then, starting values are randomly drawn from a uniform distribution from starting.values[1] to starting.values[2].

Alternatively, one can supply a list with two elements to starting.values. Both elements need to be either of length 1 or of length equal to the number of parameters (if both are of length 1, it is the same as if you supply a vector of length 2). For each parameter n (in alphabetical order), a starting value is randomly drawn from a uniform distribution starting.values[[1]][n] to starting.values[[2]][n] (if length is 1, this is the border for all parameters).

The least interesting option is to specify the starting values individually by supplying a vector with the same length as the number of parameters. Starting values must be ordered according to the alphabetical order of the parameter names. Use check.mpt for a function that returns the alphabetical order of the parameters. If one specifies the starting values like that, n.optim will be set to 1 as all other values would not make any sense (the optimization routine will produce identical results with identical starting values).

Multicore fitting is achieved via the snowfall package and needs to be initialized via sfInit. As initialization needs some time, you can either initialize multicore facilities yourself using sfInit() and setting the sfInit argument to FALSE (the default) or let MPTinR initialize multicore facilities by setting the sfInit argument to TRUE. The former is recommended as initializing snowfall takes some time and only needs to be done once if you run fit.mpt multiple times. If there are any problems with multicore fitting, first try to initialize snowfall outside MPTinR (e.g., sfInit( parallel=TRUE, cpus=2 )). If this does not work, the problem is not related to MPTinR but to snowfall (for support and references visit: https://www.imbi.uni-freiburg.de/parallel/).
Note that you need to close snowfall via sfStop() after using MPTinR.

Value

For individual fits (i.e., data is a vector) a list containing one or more of the following components from the best fitting model:

goodness.of.fit

A data.frame containing the goodness of fit values for the model. Log.Likelihood is the Log-Likelihood value. G.Squared, df, and p.value are the G^2 goodness of fit statistic.

information.criteria

A data.frame containing model information criteria based on the G^2 value. The FIA values(s) are presented if fia is not NULL.

model.info

A data.frame containing other information about the model. If the rank of the Fisher matrix (rank.fisher) does not correspond to the number of parameters in the model (n.parameters) this indicates a serious issue with the identifiability of the model. A common reason is that one of the parameter estimates lies on the bound of the parameter space (i.e., 0 or 1).

parameters

A data.frame containing the parameter estimates and corresponding confidence intervals. If a restriction file was present, the restricted parameters are marked.

data

A list of two matrices; the first one (observed) contains the entered data, the second one (predicted) contains the predicted values.

For multi-dataset fits (i.e., data is a matrix or data.frame) a list with similar elements, but the following differences:
The first elements, goodness.of.fit, information.criteria, and model.info, contain the same information as for individual fits, but each are lists with three elements containing the respective values for: each individual in the list element individual, the sum of the individual values in the list element sum, and the values corresponding to the fit for the aggregated data in the list element aggregated.
parameters is a list containing:

individual

A 3-dimensional array containing the parameter estimates ([,1,]), confidence intervals [,2:3,], and, if restrictions not NULL, column 4 [,4,] is 0 for non-restricted parameters, 1 for equality restricted parameters, and 2 for inequality restricted parameters. The first dimension refers to the parameters, the second to the information on each parameter, and the third to the individual/dataset.

mean

A data.frame with the mean parameter estimates from the individual estimates. No confidence intervals can be provided for these values.

aggregated

A data.frame containing the parameter estimates and corresponding confidence intervals for the aggregated data. If a restriction file was present, the restricted parameters are marked.

The element data contains two matrices, one with the observed, and one with the predicted data (or is a list containing lists with individual and aggregated observed and predicted data).

If n.optim > 1, the summary of the vector (matrix for multi-individual fit) containing the Log-Likelihood values returned by each run of optim is added to the output: fitting.runs

When output == "full" the list contains the additional items:

optim.runs

A list (or list of lists for multiple datasets) containing the outputs from all runs by nlminb (including those runs produced when fitting did not converge)

best.fits

A list (or list of lists for multiple datasets) containing the outputs from the runs by nlminb that had the lowest likelihood (i.e., the successful runs)

hessian

A list containing the Hessian matrix or matrices of the final parameter estimates.

Note

Warnings may relate to the optimization routine (e.g., Optimization routine [...] did not converge successfully).
In these cases it is recommended to rerun the model to check if the results are stable.

Note

All (model or restriction) files should end with an empty line, otherwise a warning will be shown.

Author(s)

Henrik Singmann and David Kellen.

References

Kellen, D., Klauer, K. C., & Singmann, H. (2012). On the Measurement of Criterion Noise in Signal Detection Theory: The Case of Recognition Memory. Psychological Review. doi:10.1037/a0027727

See Also

fit.model or fit.mpt for a function that can fit model represented in a model file.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
## Not run: 
# the example may occasionally fail due to a starting values - integration mismatch.

# Fit an SDT for a 4 alternative ranking task (Kellen, Klauer, & Singmann, 2012).

ranking.data <- structure(c(39, 80, 75, 35, 61, 54, 73, 52, 44, 63, 40, 48, 80,
49, 43, 80, 68, 53, 81, 60, 60, 65, 49, 58, 69, 75, 71, 47, 44,
85, 23, 9, 11, 21, 12, 21, 14, 20, 19, 15, 29, 13, 14, 15, 22,
11, 12, 16, 13, 20, 20, 9, 26, 19, 13, 9, 14, 15, 24, 9, 19,
7, 9, 26, 16, 14, 6, 17, 21, 14, 20, 18, 5, 19, 17, 5, 11, 21,
4, 9, 15, 17, 7, 17, 11, 11, 9, 19, 20, 3, 19, 4, 5, 18, 11,
11, 7, 11, 16, 8, 11, 21, 1, 17, 18, 4, 9, 10, 2, 11, 5, 9, 18,
6, 7, 5, 6, 19, 12, 3), .Dim = c(30L, 4L))

expSDTrank <- function(Q, param.names, n.params, tmp.env){
   
    e <- vector("numeric",4)

    mu <- Q[1]
    ss <- Q[2]
       
    G1<-function(x){
        ((pnorm(x)^3)*dnorm(x,mean=mu,sd=ss))
    }

    G2<-function(x){
        ((pnorm(x)^2)*dnorm(x,mean=mu,sd=ss)*(1-pnorm(x)))*3
    }

     G3<-function(x){
        (pnorm(x)*dnorm(x,mean=mu,sd=ss)*(1-pnorm(x))^2)*3
    }
 

    e[1] <- integrate(G1,-Inf,Inf,rel.tol = .Machine$double.eps^0.5)$value    
    e[2] <- integrate(G2,-Inf,Inf,rel.tol = .Machine$double.eps^0.5)$value
    e[3] <- integrate(G3,-Inf,Inf,rel.tol = .Machine$double.eps^0.5)$value
    e[4] <- 1-e[1]-e[2]-e[3]  
   
    return(e)
}



SDTrank <- function(Q, data, param.names, n.params, tmp.env, lower.bound, upper.bound){
   
    e<-vector("numeric",4)

    mu <- Q[1]
    ss <- Q[2]
       
    G1<-function(x){
        ((pnorm(x)^3)*dnorm(x,mean=mu,sd=ss))
    }

    G2<-function(x){
        ((pnorm(x)^2)*dnorm(x,mean=mu,sd=ss)*(1-pnorm(x)))*3
    }

     G3<-function(x){
        (pnorm(x)*dnorm(x,mean=mu,sd=ss)*(1-pnorm(x))^2)*3
    }
 

    e[1] <- integrate(G1,-Inf,Inf,rel.tol = .Machine$double.eps^0.5)$value    
    e[2] <- integrate(G2,-Inf,Inf,rel.tol = .Machine$double.eps^0.5)$value
    e[3] <- integrate(G3,-Inf,Inf,rel.tol = .Machine$double.eps^0.5)$value
    e[4] <- 1-e[1]-e[2]-e[3]  
   
    LL <- -sum(data[data!=0]*log(e[data!=0]))
    return(LL)
}

fit.mptinr(ranking.data, SDTrank, c("mu", "sigma"), 4, prediction = expSDTrank, 
		lower.bound = c(0,0.1), upper.bound = Inf)
 
## End(Not run)

Example output

Presenting the best result out of 5 minimization runs.
[1] "Model fitting begins at 2017-06-12 20:05:36"
[1] "Model fitting stopped at 2017-06-12 20:05:40"
Time difference of 3.892662 secs
No function for computing Hessian Matrix specified or it failed. Hessian Matrix is estimated numerically. Validity of CIs is questionable.
Note: CIs are based on the numerically estimated Hessian matrix
Note: CIs are based on the numerically estimated Hessian matrix
Note: CIs are based on the numerically estimated Hessian matrix
Note: CIs are based on the numerically estimated Hessian matrix
Note: CIs are based on the numerically estimated Hessian matrix
Note: CIs are based on the numerically estimated Hessian matrix
Note: CIs are based on the numerically estimated Hessian matrix
Note: CIs are based on the numerically estimated Hessian matrix
Note: CIs are based on the numerically estimated Hessian matrix
Note: CIs are based on the numerically estimated Hessian matrix
Note: CIs are based on the numerically estimated Hessian matrix
Note: CIs are based on the numerically estimated Hessian matrix
Note: CIs are based on the numerically estimated Hessian matrix
Note: CIs are based on the numerically estimated Hessian matrix
Note: CIs are based on the numerically estimated Hessian matrix
Note: CIs are based on the numerically estimated Hessian matrix
Note: CIs are based on the numerically estimated Hessian matrix
Note: CIs are based on the numerically estimated Hessian matrix
Note: CIs are based on the numerically estimated Hessian matrix
Note: CIs are based on the numerically estimated Hessian matrix
Note: CIs are based on the numerically estimated Hessian matrix
Note: CIs are based on the numerically estimated Hessian matrix
Note: CIs are based on the numerically estimated Hessian matrix
Note: CIs are based on the numerically estimated Hessian matrix
Note: CIs are based on the numerically estimated Hessian matrix
Note: CIs are based on the numerically estimated Hessian matrix
Note: CIs are based on the numerically estimated Hessian matrix
Note: CIs are based on the numerically estimated Hessian matrix
Note: CIs are based on the numerically estimated Hessian matrix
Note: CIs are based on the numerically estimated Hessian matrix
$goodness.of.fit
$goodness.of.fit$individual
   Log.Likelihood    G.Squared df     p.value
1      -133.63307 1.882660e-06  1 0.998905222
2       -71.30115 5.756701e-01  1 0.448014525
3       -82.90346 7.942183e-01  1 0.372827648
4      -136.28040 1.745465e+00  1 0.186447824
5      -110.73453 3.075934e+00  1 0.079458958
6      -117.85357 6.245810e-04  1 0.980061649
7       -86.22417 4.588486e-01  1 0.498162589
8      -120.85962 5.267862e-01  1 0.467961162
9      -130.40130 1.258721e+00  1 0.261893292
10     -105.94816 1.303429e+00  1 0.253587823
11     -129.01999 2.447846e-03  1 0.960540189
12     -126.35363 1.920519e+00  1 0.165799420
13      -65.02926 1.367334e-01  1 0.711550314
14     -126.05979 1.943381e+00  1 0.163301849
15     -130.59629 1.026319e-02  1 0.919306444
16      -70.00909 4.684003e-02  1 0.828656028
17      -97.95906 6.786362e-01  1 0.410056738
18     -120.93463 4.330649e+00  1 0.037431972
19      -64.35022 1.187942e-01  1 0.730345985
20     -109.25921 9.387646e-01  1 0.332595751
21     -106.90403 1.260545e+00  1 0.261547954
22     -104.97821 7.022076e+00  1 0.008051083
23     -123.10876 7.299008e+00  1 0.006899269
24     -111.21473 2.125857e+00  1 0.144831780
25      -95.39255 7.428869e-01  1 0.388737678
26      -84.02341 3.034109e+00  1 0.081531293
27      -90.44817 1.076023e-01  1 0.742890527
28     -127.87519 1.649082e+00  1 0.199083873
29     -128.17757 3.434219e-01  1 0.557860656
30      -56.69272 3.355102e-01  1 0.562432360

$goodness.of.fit$sum
  Log.Likelihood G.Squared df    p.value
1      -3164.526  43.78683 30 0.04985648

$goodness.of.fit$aggregated
  Log.Likelihood G.Squared df    p.value
1      -3320.719  13.04898  1 0.00030345


$information.criteria
$information.criteria$individual
         AIC       BIC
1   4.000002  9.210342
2   4.575670  9.786010
3   4.794218 10.004559
4   5.745465 10.955806
5   7.075934 12.286274
6   4.000625  9.210965
7   4.458849  9.669189
8   4.526786  9.737127
9   5.258721 10.469062
10  5.303429 10.513769
11  4.002448  9.212788
12  5.920519 11.130860
13  4.136733  9.347074
14  5.943381 11.153722
15  4.010263  9.220604
16  4.046840  9.257180
17  4.678636  9.888977
18  8.330649 13.540989
19  4.118794  9.329135
20  4.938765 10.149105
21  5.260545 10.470885
22 11.022076 16.232417
23 11.299008 16.509349
24  6.125857 11.336197
25  4.742887  9.953227
26  7.034109 12.244450
27  4.107602  9.317943
28  5.649082 10.859423
29  4.343422  9.553762
30  4.335510  9.545851

$information.criteria$sum
       AIC      BIC
1 163.7868 524.1689

$information.criteria$aggregated
       AIC      BIC
1 17.04898 29.06171


$model.info
$model.info$individual
   rank.fisher n.parameters n.independent.categories
1            2            2                        3
2            2            2                        3
3            2            2                        3
4            2            2                        3
5            2            2                        3
6            2            2                        3
7            2            2                        3
8            2            2                        3
9            2            2                        3
10           2            2                        3
11           2            2                        3
12           2            2                        3
13           2            2                        3
14           2            2                        3
15           2            2                        3
16           2            2                        3
17           2            2                        3
18           2            2                        3
19           2            2                        3
20           2            2                        3
21           2            2                        3
22           2            2                        3
23           2            2                        3
24           2            2                        3
25           2            2                        3
26           2            2                        3
27           2            2                        3
28           2            2                        3
29           2            2                        3
30           2            2                        3

$model.info$aggregated
  rank.fisher n.parameters n.independent.categories
1           2            2                        3


$parameters
$parameters$individual
, , dataset: 1

      estimates lower.conf upper.conf
mu     0.433269  0.1135920  0.7529459
sigma  1.250091  0.8175759  1.6826061

, , dataset: 2

      estimates lower.conf upper.conf
mu     2.500361  1.4785130   3.522210
sigma  1.831884  0.9087871   2.754982

, , dataset: 3

      estimates lower.conf upper.conf
mu     2.079355  1.2929927   2.865717
sigma  1.692994  0.9178247   2.468164

, , dataset: 4

      estimates lower.conf upper.conf
mu    0.2932343  0.0127720  0.5736965
sigma 1.0813273  0.7016682  1.4609864

, , dataset: 5

      estimates lower.conf upper.conf
mu     1.336894  0.7800887   1.893699
sigma  1.736181  1.0702424   2.402119

, , dataset: 6

      estimates lower.conf upper.conf
mu     0.990002  0.6009808   1.379023
sigma  1.302455  0.8161970   1.788713

, , dataset: 7

      estimates lower.conf upper.conf
mu     2.013876  1.2484286   2.779324
sigma  1.740674  0.9508656   2.530482

, , dataset: 8

      estimates lower.conf upper.conf
mu    0.8977627  0.5290693   1.266456
sigma 1.2631820  0.7983530   1.728011

, , dataset: 9

      estimates lower.conf upper.conf
mu    0.5846804  0.2415118   0.927849
sigma 1.3034292  0.8484643   1.758394

, , dataset: 10

      estimates lower.conf upper.conf
mu     1.370622  0.8655795   1.875664
sigma  1.477204  0.8957089   2.058699

, , dataset: 11

      estimates lower.conf upper.conf
mu    0.5454711  0.2927766  0.7981655
sigma 0.8647370  0.5217381  1.2077360

, , dataset: 12

      estimates lower.conf upper.conf
mu    0.7074882  0.2285239   1.186452
sigma 1.8650314  1.1969702   2.533093

, , dataset: 13

      estimates lower.conf upper.conf
mu    1.8695492  1.2774474   2.461651
sigma 0.9705082  0.3907324   1.550284

, , dataset: 14

      estimates lower.conf upper.conf
mu    0.7639684  0.3371293   1.190807
sigma 1.6032763  1.0357374   2.170815

, , dataset: 15

      estimates lower.conf upper.conf
mu    0.5710259  0.2214703  0.9205815
sigma 1.3487060  0.8787418  1.8186701

, , dataset: 16

      estimates lower.conf upper.conf
mu     2.394839  1.4492606   3.340418
sigma  1.679900  0.8186002   2.541200

, , dataset: 17

      estimates lower.conf upper.conf
mu     1.768044   1.066160   2.469929
sigma  1.861906   1.084728   2.639084

, , dataset: 18

      estimates lower.conf upper.conf
mu    0.9078934  0.5282062   1.287581
sigma 1.2938634  0.8212177   1.766509

, , dataset: 19

      estimates lower.conf upper.conf
mu     2.078713  1.3591854   2.798241
sigma  1.186776  0.5211956   1.852357

, , dataset: 20

      estimates lower.conf upper.conf
mu     1.283782  0.7985584   1.769006
sigma  1.503841  0.9171321   2.090549

, , dataset: 21

      estimates lower.conf upper.conf
mu     1.147009  0.7782109   1.515807
sigma  1.058336  0.6197180   1.496955

, , dataset: 22

      estimates lower.conf upper.conf
mu     1.549989  0.9199573   2.180021
sigma  1.810551  1.0949170   2.526185

, , dataset: 23

      estimates lower.conf upper.conf
mu    0.8560569  0.4434829   1.268631
sigma 1.5267712  0.9717638   2.081779

, , dataset: 24

      estimates lower.conf upper.conf
mu     1.082639  0.7140527   1.451225
sigma  1.113853  0.6711752   1.556532

, , dataset: 25

      estimates lower.conf upper.conf
mu     1.723587  1.0834421   2.363733
sigma  1.642043  0.9518335   2.332252

, , dataset: 26

      estimates lower.conf upper.conf
mu     2.131287  1.3027344   2.959840
sigma  1.797021  0.9841541   2.609888

, , dataset: 27

      estimates lower.conf upper.conf
mu     1.792197  1.1473652   2.437029
sigma  1.554479  0.8772965   2.231661

, , dataset: 28

      estimates lower.conf upper.conf
mu    0.6738165  0.2482516   1.099381
sigma 1.6444509  1.0663694   2.222532

, , dataset: 29

      estimates lower.conf upper.conf
mu    0.6289998  0.3335923  0.9244073
sigma 1.0532172  0.6651369  1.4412975

, , dataset: 30

      estimates lower.conf upper.conf
mu     2.830518  1.5779480   4.083088
sigma  1.755903  0.7257235   2.786083


$parameters$mean
      estimates lower.conf upper.conf
mu     1.326898         NA         NA
sigma  1.460486         NA         NA

$parameters$aggregated
      estimates lower.conf upper.conf
mu     1.260596   1.171329   1.349864
sigma  1.524082   1.417273   1.630891


$data
$data$observed
$data$observed$individual
      [,1] [,2] [,3] [,4]
 [1,]   39   23   19   19
 [2,]   80    9    7    4
 [3,]   75   11    9    5
 [4,]   35   21   26   18
 [5,]   61   12   16   11
 [6,]   54   21   14   11
 [7,]   73   14    6    7
 [8,]   52   20   17   11
 [9,]   44   19   21   16
[10,]   63   15   14    8
[11,]   40   29   20   11
[12,]   48   13   18   21
[13,]   80   14    5    1
[14,]   49   15   19   17
[15,]   43   22   17   18
[16,]   80   11    5    4
[17,]   68   12   11    9
[18,]   53   16   21   10
[19,]   81   13    4    2
[20,]   60   20    9   11
[21,]   60   20   15    5
[22,]   65    9   17    9
[23,]   49   26    7   18
[24,]   58   19   17    6
[25,]   69   13   11    7
[26,]   75    9   11    5
[27,]   71   14    9    6
[28,]   47   15   19   19
[29,]   44   24   20   12
[30,]   85    9    3    3

$data$observed$aggregated
     [,1] [,2] [,3] [,4]
[1,] 1801  488  407  304


$data$predicted
$data$predicted$individual
          [,1]      [,2]      [,3]      [,4]
 [1,] 38.99900 23.004133 18.995582 19.001285
 [2,] 79.86190 10.144909  5.488872  4.504323
 [3,] 74.78443 12.545427  7.014067  5.656073
 [4,] 33.87880 25.240321 21.554560 19.326316
 [5,] 60.32055 16.055504 11.235800 12.388147
 [6,] 53.98685 21.063119 13.926870 11.023163
 [7,] 73.16509 12.823645  7.492050  6.519213
 [8,] 51.58663 21.913626 14.808072 11.691671
 [9,] 43.25149 22.255478 17.446789 17.046244
[10,] 62.54326 17.554389 10.919438  8.982910
[11,] 39.95951 29.150506 19.835539 11.054445
[12,] 47.31833 16.628419 14.067299 21.985952
[13,] 79.91705 14.440595  4.409108  1.233251
[14,] 48.25023 18.742587 14.866068 18.141111
[15,] 43.06611 21.709128 17.316333 17.908432
[16,] 80.03992 10.688999  5.414570  3.856515
[17,] 67.75801 13.664210  8.972044  9.605739
[18,] 51.82232 21.521526 14.676037 11.980115
[19,] 81.06924 12.573512  4.581677  1.775575
[20,] 60.39295 17.834176 11.576557 10.196316
[21,] 59.43742 22.579649 11.902419  6.080512
[22,] 64.09655 14.803038 10.060256 11.040157
[23,] 50.34987 19.270398 14.553844 15.825891
[24,] 57.23370 22.528582 12.813729  7.423986
[25,] 68.73369 14.712940  8.875042  7.678326
[26,] 74.58460 12.094760  7.051197  6.269446
[27,] 70.90417 14.613107  8.225790  6.256929
[28,] 46.29474 18.489824 15.196695 20.018742
[29,] 43.57548 25.715155 18.101559 12.607804
[30,] 85.07577  8.322928  3.934266  2.667039

$data$predicted$aggregated
         [,1]     [,2]     [,3]     [,4]
[1,] 1792.649 534.0321 352.4932 320.8259



$fitting.runs
$fitting.runs$individual
            Min.    1st Qu.     Median       Mean    3rd Qu.       Max.
 [1,] -133.63307 -133.63307 -133.63307 -133.63307 -133.63307 -133.63307
 [2,]  -71.30115  -71.30115  -71.30115  -71.30115  -71.30115  -71.30115
 [3,]  -82.90346  -82.90346  -82.90346  -82.90346  -82.90346  -82.90346
 [4,] -136.28040 -136.28040 -136.28040 -136.28040 -136.28040 -136.28040
 [5,] -110.73453 -110.73453 -110.73453 -110.73453 -110.73453 -110.73453
 [6,] -117.85357 -117.85357 -117.85357 -117.85357 -117.85357 -117.85357
 [7,]  -86.22417  -86.22417  -86.22417  -86.22417  -86.22417  -86.22417
 [8,] -120.85962 -120.85962 -120.85962 -120.85962 -120.85962 -120.85962
 [9,] -130.40130 -130.40130 -130.40130 -130.40130 -130.40130 -130.40130
[10,] -105.94816 -105.94816 -105.94816 -105.94816 -105.94816 -105.94816
[11,] -129.01999 -129.01999 -129.01999 -129.01999 -129.01999 -129.01999
[12,] -126.35363 -126.35363 -126.35363 -126.35363 -126.35363 -126.35363
[13,]  -65.02926  -65.02926  -65.02926  -65.02926  -65.02926  -65.02926
[14,] -126.05979 -126.05979 -126.05979 -126.05979 -126.05979 -126.05979
[15,] -130.59629 -130.59629 -130.59629 -130.59629 -130.59629 -130.59629
[16,]  -70.00909  -70.00909  -70.00909  -70.00909  -70.00909  -70.00909
[17,]  -97.95906  -97.95906  -97.95906  -97.95906  -97.95906  -97.95906
[18,] -120.93463 -120.93463 -120.93463 -120.93463 -120.93463 -120.93463
[19,]  -64.35022  -64.35022  -64.35022  -64.35022  -64.35022  -64.35022
[20,] -109.25921 -109.25921 -109.25921 -109.25921 -109.25921 -109.25921
[21,] -106.90403 -106.90403 -106.90403 -106.90403 -106.90403 -106.90403
[22,] -104.97821 -104.97821 -104.97821 -104.97821 -104.97821 -104.97821
[23,] -123.10876 -123.10876 -123.10876 -123.10876 -123.10876 -123.10876
[24,] -111.21473 -111.21473 -111.21473 -111.21473 -111.21473 -111.21473
[25,]  -95.39255  -95.39255  -95.39255  -95.39255  -95.39255  -95.39255
[26,]  -84.02341  -84.02341  -84.02341  -84.02341  -84.02341  -84.02341
[27,]  -90.44817  -90.44817  -90.44817  -90.44817  -90.44817  -90.44817
[28,] -127.87519 -127.87519 -127.87519 -127.87519 -127.87519 -127.87519
[29,] -128.17757 -128.17757 -128.17757 -128.17757 -128.17757 -128.17757
[30,]  -56.69272  -56.69272  -56.69272  -56.69272  -56.69272  -56.69272

$fitting.runs$aggregated
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  -3321   -3321   -3321   -3321   -3321   -3321 

MPTinR documentation built on July 13, 2021, 5:07 p.m.