R: Generates random samples of continuously recorded behavior...
r_continuous_recording
R Documentation
Generates random samples of continuously recorded behavior streams
Description
Random generation of behavior streams (based on an alternating
renewal process) of a specified length and with specified mean event
durations, mean interim times, event distribution, and interim distribution,
summarized as the total proportion of time the behavior of interest occurred.
distribution of event durations. Must be of class eq_dist.
F_interim
distribution of interim times. Must be of class eq_dist.
equilibrium
logical; if TRUE, then equilibrium initial conditions are used;
if FALSE, then p0 is used to determine initial state and normal generating
distributions are used for event durations and interim times.
p0
Initial state probability. Only used if equilibrium = FALSE, in which case
default is zero (i.e., behavior stream always starts with an interim time).
tuning
controls the size of the chunk of random event durations and interim times.
Adjusting this may be useful in order to speed computation time .
Details
Generates behavior streams by repeatedly drawing random event durations and
random interim times from the distributions as specified, until the sum of the durations and interim
times exceeds the requested stream length. Then applies a continuous recording filter to the generated behavior streams.
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(ARPobservation)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/ARPobservation/r_continuous_recording.Rd_%03d_medium.png", width=480, height=480)
> ### Name: r_continuous_recording
> ### Title: Generates random samples of continuously recorded behavior
> ### streams
> ### Aliases: r_continuous_recording
>
> ### ** Examples
>
> r_continuous_recording(n = 5, mu = 2, lambda = 4, stream_length = 20,
+ F_event = F_exp(), F_interim = F_exp())
[1] 0.3000761 0.3232264 0.3550995 0.3338796 0.3917448
>
>
>
>
>
> dev.off()
null device
1
>