Learn R Programming

scaRabee (version 1.1-4)

bound.parameters: Forces parameter estimates between defined boundaries.

Description

bound.parameters is a utility function called during estimation runs. It forces the parameter estimates to remain within the boundaries defined in the .csv file of initial estimates. bound.parameters is typically not called directly by users.

Usage

bound.parameters(x = NULL,
                   lb = NULL,
                   ub = NULL)

Value

Returns a vector of p values. The ith element of the returned vector is:

  • x[i] if lb[i] < x[i] < ub[i]

  • lb[i] if x[i] <= lb[i]

  • ub[i] if ub[i] <= x[i]

Arguments

x

A vector of p parameter estimates.

lb

A vector of p lower boundaries.

ub

A vector of p upper boundaries.

Author

Sebastien Bihorel (sb.pmlab@gmail.com)

Examples

Run this code

bound.parameters(seq(1:5), lb=rep(3,5), ub=rep(4,5))

# The following call should return an error message
bound.parameters(1, lb=rep(3,5), ub=rep(4,5))

Run the code above in your browser using DataLab