getValidE: Get an appropriate value for 'logE'

View source: R/getValidE.R

getValidER Documentation

Get an appropriate value for logE

Description

Get an appropriate value for logE

Usage

getValidE(object, logE, n)

Arguments

object

A model object (a list) provided through the execution of function timetravelHMM.

logE

Tentative values of point estimates of trip effects.

n

Number of samples. Default is 1000.

Value

The function return a valid value for logE. The value supplied as a parameter for logE is a numerical vector of size n, in which case it is returned as is. If a single numeric value is supplied, it will be replicated into a vector of the appropriate size which will be returned. If logE is NULL or invalid, then the function will return either a vector of simulated values (if the model is from the trip family), or a vector of 0 otherwise.


melmasri/traveltimeHMM documentation built on Jan. 6, 2023, 10:30 p.m.