Learn R Programming

PSM (version 0.8-6)

PSM.simulate: Create simulation data for multiple individuals

Description

Simulates data for multiple individuals in a mixed effects model based on stochastic differential equations using an euler scheme.

Usage

PSM.simulate(Model, Data, THETA, deltaTime, longX=TRUE)

Arguments

Model
A list containing the model components either Linear or Non-Linear Model list.*
Data
List with elements described below. No Data$Y is needed as it is generated through the simulation. The number of individuals simulated is equal to length(Data). [object Object],[object Object],[object Object]
THETA
Vector of population parameters
deltaTime
Time Step in the Euler scheme
longX
Boolean. Toggles output of the entire simulated outcome of the states

Value

  • The simulated outcome of the model is returned in a list, where each element is the data for an individual.
  • XSimulated states sampled at time points for measurements
  • YSimulated measurements
  • TimeTime points for measurements
  • UInput vector used in the simulation
  • etaThe random effects used in the simulation
  • DoseThe dose list used in the simulation
  • longXEntire outcome of simulated states
  • longTimeTime points for longX.

Details

The $\eta_i$ is drawn from the multivariate normal distribution $N(0,\Omega)$. The simulation is an euler based method but for every time interval dt the model is predicted and the states affected by system noise ($\sigma$). The measurements are added an normal error term belonging to $N(0,S)$. The function mvrnorm from the MASS pacakge is used to to generate random numbers fra multivariate normal distributions.

References

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

See Also

PSM, PSM.estimate, PSM.smooth, PSM.plot, PSM.template

Examples

Run this code
cat("Examples are included in the package vignette.
")

Run the code above in your browser using DataLab