gaussian_param_by_factor: Calculate the parameters of Gaussian speeds

View source: R/gaussian_param_by_factor.R

gaussian_param_by_factorR Documentation

Calculate the parameters of Gaussian speeds

Description

Calculate the parameters of Gaussian speeds

Usage

gaussian_param_by_factor(logspeeds, byFactor, states = NULL)

Arguments

logspeeds

A numeric vector of speed observations (in km/h) on the (natural) log-scale, of size n = number of observations.

byFactor

A vector of factors (link + time bin) of size n, i.e. one factor for each speed observation.

state_prob

An n x nQ matrix of smoothed state probabilities where nQ = number of states.

Value

gaussian_param_by_factor returns a list of two matrices of identical dimensions m X nQ where m = number of levels (links + timeBins). The first list mean contains the vector of means for each level and state. The second list sigma2 contains the vector of variances for each level and state.


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