Learn R Programming

simsem (version 0.2-8)

runMisspec: Draw actual parameters and model misspecification

Description

Randomly draw actual parameters from SimSet object and randomly draw the misspecified parameters from SimMisspec object. Then, the function will put the misspecified parameters on top of the actual parameters.

Usage

runMisspec(object, misspec, SimEqualCon=new("NullSimEqualCon"))

Arguments

object
The SimSet object that saves the actual parameters
misspec
The SimSet object that saves the misspecified parameters
SimEqualCon
The equality constraint to equate parameters

Value

  • A list of with two elements: 1) param SimRSet of real model parameters, 2) misspec SimRSet of real model parameters with model misspecification, and 3) misspecAdd the misspecification alone

Details

When the equality constraint does not exist, there are two orders of generating parameters:
  1. SimMisspec@misBeforeFill=TRUEThe misspecification will be added into user-specified parameters and the auto-completion on the other parameters.
  2. SimMisspec@misBeforeFill=FALSEThe auto-completion will be applied first, then the misspecification will be added, and finally the auto-completion works again to adjust the parameter after adding misspecification.
When the equality constraint exists, there are six orders of generating parameters:
  1. SimMisspec@misBeforeFill=TRUE & SimMisspec@conBeforeMis=TRUE & SimEqualCon@conBeforeFill=TRUEThe equality constraint is applied first, then the misspecification is added, and finally the auto-completion is applied.
  2. SimMisspec@misBeforeFill=FALSE & SimMisspec@conBeforeMis=TRUE & SimEqualCon@conBeforeFill=TRUEThe equality constarint is applied first, then the auto-completion is applied, the misspecification will be added, and finally the auto-completion is used to adjusted for the added parameters.
  3. SimMisspec@misBeforeFill=FALSE & SimMisspec@conBeforeMis=TRUE & SimEqualCon@conBeforeFill=FALSEThe auto-completeion is applied first, then the equality constriant is applied with adjusting parameters by the auto-completion, and finally the misspecification is added with adjusting the parameters by the auto-completion.
  4. SimMisspec@misBeforeFill=FALSE & SimMisspec@conBeforeMis=FALSE & SimEqualCon@conBeforeFill=FALSEThe auto-completeion is applied first, then the misspecification is added with adjusting paramters by the auto-completion, and finally the equality constraint is added with adjusting parameters by the auto-completion.
  5. SimMisspec@misBeforeFill=TRUE & SimMisspec@conBeforeMis=FALSE & SimEqualCon@conBeforeFill=TRUEThe misspecification is added first, then the equality constraint is applied, and finally the auto-completion is applied.
  6. SimMisspec@misBeforeFill=TRUE & SimMisspec@conBeforeMis=FALSE & SimEqualCon@conBeforeFill=FALSEThe misspecification is added first, then the auto-completion is applied, and finally the equality constriant is applied with adjusting parameters by the auto-completion.
The default in this program is the first option for both scenarios. Other scenarios will be useful when users would like to put model misspecification or equality constraints on the parameters that users do not manually specify.

Examples

Run this code
# No example

Run the code above in your browser using DataLab