R: Simulate Responses from 'lad' Models

simulate.lad {L1pack} | R Documentation

## Simulate Responses from `lad` Models

### Description

Simulate one or more responses from the distribution corresponding to a fitted `lad` object.

### Usage

    ## S3 method for class 'lad'
    simulate(object, nsim = 1, seed = NULL, ...)

### Arguments

`object` | an object representing a fitted model.
`nsim` | number of response vectors to simulate. Defaults to `1`.
`seed` | an object specifying if and how the random number generator should be initialized (‘seeded’). For the "lad" method, either `NULL` or an integer that will be used in a call to `set.seed` before simulating the response vectors. If set, the value is saved as the `"seed"` attribute of the returned value. The default, `NULL` will not change the random generator state, and return `.Random.seed` as the `"seed"` attribute, see ‘Value’.
`...` | additional optional arguments.

### Value

For the `"lad"` method, the result is a data frame with an attribute `"seed"`. If argument `seed` is `NULL`, the attribute is the value of `.Random.seed` before the simulation was started.

### Author(s)

Tymoteusz Wolodzko and Felipe Osorio

### Examples

    fm <- lad(stack.loss ~ ., data = stackloss)
    sm <- simulate(fm, nsim = 4)

[Package L1pack version 0.40 Index]