Learn R Programming

mapfit (version 0.9.6)

mapfit.point: MAP fitting with time point data

Description

estimates MAP parameters from time point data.

Usage

mapfit.point (map, x, intervals, stationary = TRUE,
  method = c("all", "increment"), lbound = 1, ubound = NULL,
  control = list(), verbose = list(), ...)

Arguments

Value

returns a list with components, which is an object of S3 class mapfit.result;modelan object for estimated MAP class (map, erhmm).llfa value of the maximum log-likelihood.dfa value of degrees of freedom of the model.aica value of Akaike information criterion.iterthe number of iterations.convergencea logical value for the convergence of estimation algorithm.ctimecomputation time (user time).stationarya logical value for the argument stationary.dataan object for MAP data classaerrora value of absolute error for llf at the last step of algorithm.rerrora value of relative error for llf at the last step of algorithm.controla list of the argument of control.verbosea list of the argument of verbose.callthe matched call.

See Also

mapfit.group, map and erhmm

Examples

Run this code
## load trace data
data(BCpAug89)
BCpAug89s <- head(BCpAug89, 50)

## MAP fitting for general MAP
(result1 <- mapfit.point(map=map(2), x=cumsum(BCpAug89s)))

## MAP fitting for MMPP
(result2 <- mapfit.point(map=mmpp(2), x=cumsum(BCpAug89s)))

## MAP fitting for ER-HMM
(result3 <- mapfit.point(map=erhmm(3), x=cumsum(BCpAug89s)))

## marginal moments for estimated MAP
map.mmoment(k=3, map=result1$model)
map.mmoment(k=3, map=result2$model)
map.mmoment(k=3, map=as(result3$model, "map"))

## joint moments for estimated MAP
map.jmoment(lag=1, map=result1$model)
map.jmoment(lag=1, map=result2$model)
map.jmoment(lag=1, map=as(result3$model, "map"))

## lag-k correlation
map.acf(map=result1$model)
map.acf(map=result2$model)
map.acf(map=as(result3$model, "map"))

Run the code above in your browser using DataLab