emg.mle: Maximum Likelihood estimate of parameters

Description Usage Arguments Value Author(s) See Also Examples

View source: R/emg.mle.R

Description

Compute the maximum likelihood model for the parameters given a set of observations. Returns a model with estimates for mu, sigma, and lambda.

Usage

1
  emg.mle(x, lower=NULL, upper=NULL, start=NULL, ...)

Arguments

x

vector of observations to estimate parameters for.

lower

list of lower bounds for parameters.

upper

list of upper bounds for parameters.

start

list of starting parameters for search.

...

optional parameters to pass to 'mle'.

Value

An object of class mle-class.

Author(s)

Shawn Garbett

See Also

EMG emg.nllik

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
  emg.mle(remg(200))
  
  ## a example involving fitting
  data(pc9_3um_erlotinib)

  intermitotic.time <- subset(pc9_3um_erlotinib, end.of.movie=='N' & died=='N')$observed

  hist(intermitotic.time, freq=FALSE, main="PC9 in 3um erlotinib", xlab='intermitotic time (hours)')

  fit <- emg.mle(intermitotic.time)
  pdf <- function(x) demg(x, coef(fit)['mu'], coef(fit)['sigma'], coef(fit)['lambda'])
  curve(pdf, from=0, to=170, add=TRUE, col='red')

Example output

Loading required package: stats4

Call:
mle(minuslogl = function(mu, sigma, lambda) {
    emg.nllik(x, mu, sigma, lambda)
}, start = list(mu = median(x), sigma = sd(x), lambda = 1/mean(x)), 
    method = "L-BFGS-B", lower = lower, upper = upper)

Coefficients:
        mu      sigma     lambda 
-0.2396382  1.0270325  0.8757784 

emg documentation built on July 1, 2020, 10:25 p.m.