timesPerInterval {petersenlab} | R Documentation |
Frequency Per Duration.
Description
Estimate frequency of a behavior for a particular duration.
Usage
timesPerInterval(
num_occurrences = NULL,
interval = NULL,
duration = "month",
not_occurred_past_year = NULL
)
timesPerLifetime(num_occurrences = NULL, never_occurred = NULL)
computeItemFrequencies(
item_names,
data,
duration = "month",
frequency_vars,
interval_vars,
not_in_past_year_vars
)
computeLifetimeFrequencies(
item_names,
data,
frequency_vars,
never_occurred_vars
)
Arguments
num_occurrences |
The number of times the behavior occurred during the
specified interval, |
interval |
The specified interval corresponding to the number of times
the behavior occurred |
duration |
The desired duration during which to estimate how many times the behavior occurred:
|
not_occurred_past_year |
Whether or not the behavior did NOT occur in
the past year. If |
never_occurred |
Whether or not the behavior has NEVER occurred in
the person's lifetime. If |
item_names |
The names of the questionnaire items. |
data |
The data object. |
frequency_vars |
The name(s) of the variables corresponding to the
number of occurrences ( |
interval_vars |
The name(s) of the variables corresponding to the
intervals ( |
not_in_past_year_vars |
The name(s) of the variables corresponding to
whether the behavior did not occur in the past year
( |
never_occurred_vars |
The name(s) of the variables corresponding to
whether the behavior has never occurred during the person's lifetime
( |
Details
Estimates the frequency of a given behavior for a particular duration, given a specified number of times it occurred during a specified interval.
Value
The frequency of the behavior for the specified duration.
Examples
timesPerInterval(
num_occurrences = 2,
interval = 3,
duration = "month",
not_occurred_past_year = 0
)
timesPerInterval(
duration = "month",
not_occurred_past_year = 1
)
timesPerLifetime(
num_occurrences = 2,
never_occurred = 0
)
timesPerLifetime(
never_occurred = 1
)