simulate.nls: Simulation method for non-linear models

Description Usage Arguments Value Examples

Description

This method function is based on stats:::simulate.lm and has simular functionality

Usage

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

Arguments

object

A fitted model object

nsim

The number of simulated response variable simulations required

seed

An optional seed for the random number generator

...

additional arguments used by other methods.

Value

A data frame with of size n x nsim, with columns the simulated response variables

Examples

1
2
fm <- nls(Time ~ SSstormer(Viscosity, Weight, beta, theta), data = Stormer)
Times <- simulate(fm, 10, seed = 2021)

BillVenables/WWRCourse documentation built on Jan. 31, 2021, 4:22 p.m.