initial.value: Generate an initial parameter value

Description Usage Arguments Value Examples

View source: R/params.R

Description

Generate an initial parameter value

Usage

1
2
3
4
5
6
7
initial.value(param, n = 1, seed = NULL)

## Default S3 method:
initial.value(param, n = 1, seed = NULL)

## S3 method for class 'param.fixed'
initial.value(param, n = 1, seed = NULL)

Arguments

param

An object of type 'param'

n

The number of initial values to generate

seed

The random seed

Value

A vector of length n with valid parameter values

Examples

1
2
3
p <- param.discrete(c('heads', 'tails', 'edge of coin'),
                    weights=c(0.45, 0.45, 0.1))
initial.value(p, n=10)

paleolimbot/easyoptim documentation built on May 24, 2019, 6:12 p.m.