Last data update: 2014.03.03

R: Smoothing of model states based on estimated population...
PSM.smoothR Documentation

Smoothing of model states based on estimated population parameters.

Description

Gives estimates of model states and random effects η. The function is intended to be used based on population parameters found using PSM.estimate or to check initial values before parameter estimation.

Usage

PSM.smooth(Model, Data, THETA, subsample = 0, trace = 0, etaList = NULL)

Arguments

Model

Model list.*

Data

Data list.*

THETA

Vector of population parameters used for the state estimation.

subsample

Number of points to estimate states in between measurements. The extra points are linearly spaced.

trace

Non-negative integer. If positive, tracing information on the progress of the optimization is produced. Higher values produces more tracing information.

etaList

Matrix where each column contains an etimate of η_i. etaList has the same format as the output of PSM.estimate. If ommitted, the function will evalutate the population likehood function to find estimates of eta for all individuals.

* See description in PSM.estimate.

Details

The function produces three types of estimates.

Predicted

Only past measurements are used for the state estimate at time t.

Filtered

Only past and the current measurements are used for the state estimate at time t.

Smoothed

All measurements (both past and future) are used to form the state estimate at time t. This is usually the prefered type of state estimate.

If subsample>0 then the data is automatically subsampled to provide estimated of the model states between observation time points.

Value

An unnamed list with one element for each individual. Each element contains the following elements:

Time

Possibly subsampled time-vector corresponding to the estimated states

Xs, Ps

Smoothed state and state co-variance estimate

Ys

Response based on smoothed state: Ys = g(Xs).

Xf, Pf

Filtered state and state co-variance estimate

Xp, Pp

Predicted state and state co-variance estimate

Yp, R

Predicted observations and observation variances

eta

Estimated eta

negLogL

Value of the negative log-likelihood function at THETA (thus same value for all individuals).

Note

For further details please also read the package vignette pdf-document by writing vignette("PSM") in R.

Author(s)

Stig B. Mortensen and S<c3><b8>ren Klim

References

Please visit http://www.imm.dtu.dk/psm or refer to the help page for PSM.

See Also

PSM, PSM.estimate, PSM.simulate, PSM.plot, PSM.template

Examples

cat("\nExamples are included in the package vignette.\n")

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(PSM)
Loading required package: MASS
Loading required package: numDeriv
Loading required package: deSolve

Attaching package: 'deSolve'

The following object is masked from 'package:graphics':

    matplot

Loading required package: ucminf
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/PSM/PSM.smooth.Rd_%03d_medium.png", width=480, height=480)
> ### Name: PSM.smooth
> ### Title: Smoothing of model states based on estimated population
> ###   parameters.
> ### Aliases: PSM.smooth
> ### Keywords: htest models multivariate ts
> 
> ### ** Examples
> 
> cat("\nExamples are included in the package vignette.\n")

Examples are included in the package vignette.
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>