calc_cond_step_dist: OU Conditional distribution.

Description Usage Arguments Value See Also Examples

Description

calc_cond_step_dist returns the mean and sd of a set of steps, conditional on each step before it.

Usage

1
calc_cond_step_dist(fixed_constant, steps, time_diffs, behavs, move_params)

Arguments

fixed_constant

List with components:

num_states

Numeric, number of behavioural states.

q.speed_mean

Vector, index positions within move_params relating to speed mean parameters.

q.speed_corr

Vector, index positions within move_params relating to speed correlation parameters.

q.speed_var

Vector, index positions within move_params relating to speed variance parameters.

steps

Vector, refined step lengths.

time_diffs

Vector, time period each step is over.

behavs

Vector, refined behavioural states.

move_params

Vector, parameters (arranged turn_var_1,turn_var_2,mean_speed_1,...,speed_corr_1,...,speed_var_1,...).

Value

List with componenets:

mean

Vector of means.

sd

Vector of standard deviations.

See Also

Other Speed parameters: calc_markov_steady_state, calc_step_lik, update_speed_param

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
const <- list(num_states = 3,
              q.speed_mean = 4:6,
              q.speed_corr = 7:9,
              q.speed_var = 10:12)
steps <- c(5.3, 6.8, 15.3, 14.5, 9.4, 3.4, 8.5, 14.6, 17.8, 22.4, 16.7)
time_diffs <- c(1, 1, 1.5, 1.5, 1, 0.5, 1, 1, 1, 2, 1)
behavs <- c(1, 1, 1, 2, 2, 3, 3, 2, 2, 2, 1)
move_params <- c(NA, NA, NA, 5, 10, 3, 0.1, 0.2, 0.3, 4, 6, 2)
calc_cond_step_dist(const, steps, time_diffs, behavs, move_params)
# $mean
# [1]  5.271451  9.943061 14.213522  9.753061  4.754381  6.270690  7.074500 13.766161 32.772200 10.804384
#
# $sd
# [1] 0.8515145 1.2772718 1.5272970 1.6453359 0.7032211 0.7199747 0.9499351 1.4064422 2.8128844 1.8176981

a-parton/CTStepTurn documentation built on May 14, 2019, 4:17 p.m.