mrgoptim: Fit a model to data using maximum likelihood objective...

View source: R/mrgoptim.R

mrgoptimR Documentation

Fit a model to data using maximum likelihood objective function with newuoa or optim

Description

Fit a model to data using maximum likelihood objective function with newuoa or optim

Usage

mrgoptim(
  mod,
  output = "ipred",
  var = "var",
  prms,
  v_prms,
  cov = TRUE,
  restarts = 0,
  method = c("newuoa", "bobyqa", "Nelder-Mead", "BFGS", "CG", "L-BFGS-B", "SANN",
    "Brent"),
  upper = Inf,
  lower = -Inf,
  options = switch(method, newuoa = list(iprint = 5), bobyqa = list(iprint = 5),
    list(trace = 2)),
  ...
)

Arguments

mod

a model object

output

a character string containing name of prediction output column

var

a character string containing name of variance output column of predictions

prms

a character vector of parameters to fit

v_prms

a character vector of variance parameters to fit

cov

logical, perform covariance step

restarts

number of times to restart fit with final estimates of previous optimization

method

method to be used: "newuoa", "bobyqa", "Nelder-Mead", "BFGS", "CG", "L-BFGS-B", "SANN", "Brent"

upper

A numeric vector of upper bounds on the parameters. If the length is 1 the single upper bound is applied to all parameters. (only used for methods bobyqa, L-BFGS-B, Brent)

lower

A numeric vector of lower bounds on the parameters. If the length is 1 the single lower bound is applied to all parameters. (only used for methods bobyqa, L-BFGS-B, Brent)

options

options passed to optim function, see ?optim, ?newuoa, or ?bobyqa for more information

...

further arguments passed to mrgsim function


mhismail/mrgsolvetk documentation built on May 7, 2023, 1:52 p.m.