Description Usage Arguments Details Value Numerical Jacobians of f and g Note Author(s) References See Also Examples
Estimates population parameters in a linear or non-linear mixed effects model based on stochastic differential equations by use of maximum likelihood and the Kalman filter.
1 | PSM.estimate(Model, Data, Par, CI = FALSE, trace = 0, control=NULL, fast=TRUE)
|
Model |
A list containing the following elements:
|
Data |
An unnamed list where each element contains
data for one individual. Each element in
|
Par |
A list containing the following elements:
|
CI |
Boolean. If true, the program estimates 95% confidence
intervals, standard deviation and correlation matrix for the
parameter estimates based on the Hessian of the likelihood function. The
Hessian is estimated by |
trace |
Non-negative integer. If positive, tracing information on the progress of the optimization is produced. Higher values produces more tracing information. |
control |
A list of control parameters for the optimization of the likelihood function. The list has one required component, namely:
The remaining components in the list are given as the control argument for the chosen optimizer. See corresponding help file for further detail. |
fast |
Boolean. Use compiled Fortran code for faster estimation. |
The first stage model describing intra-individual variations is for linear models defined as
dx = (A(phi)*x + B(phi)*u)dt + SIG(phi)*dw
y = C(phi)*x + D(phi)*u + e
and for non-linear models as
dx = f(x,u,t,phi)dt + SIG(u,t,phi)dw
y = g(x, u, t, phi) + e
where e ~ N(0,S(x, u, t)) and w is a standard Brownian motion.
The second stage model describing inter-individual variations is defined as:
phi = h(eta,theta,Z)
where eta ~ N(0,OMEGA), θ are the fixed effect parameters and Z are covariates for individual i. In a model without random-effects the function h is only used to include possible covariates in the model.
A list containing the following elements:
NegLogL |
Value of the negative log-likelihood function at optimum. |
THETA |
Population parameters at optimum |
CI |
95% confidence interval for the estimated parameters |
SD |
Standard deviation for the estimated parameters |
COR |
Correlation matrix for the estimated parameters |
sec |
Time for the estimation in seconds |
opt |
Raw output from |
Automatic numerical approximations of the Jacobians of f
and
g
can be used in PSM. In the folliwing, the name of the model
object is assumed to be MyModel
.
First define the
functions MyModel$Functions$f
and
MyModel$Functions$g
. When these are defined in MyModel the
functions df
and dg
can be added to the model object by
writing as below:
1 2 3 4 5 6 7 8 |
This way of defining df
and dg
forces a numerical
evaluation of the Jacobians using the numDeriv package. It may
be usefull in some cases, but it should be stressed that it will
probably give at least a ten-fold increase in estimation times.
For further details please also read the package vignette pdf-document
by writing vignette("PSM")
in R.
Stig B. Mortensen and S<f8>ren Klim
Please visit http://www.imm.dtu.dk/psm or refer to
the main help page for PSM
.
PSM
, PSM.smooth
,
PSM.simulate
, PSM.plot
, PSM.template
1 | cat("\nExamples are included in the package vignette.\n")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.