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.

interval

The specified interval corresponding to the number of times the behavior occurred num_occurrences.

duration

The desired duration during which to estimate how many times the behavior occurred:

  • 1 = average number of times per day

  • 2 = average number of times per week

  • 3 = number of times in the past month

  • 4 = number of times in the past year

not_occurred_past_year

Whether or not the behavior did NOT occur in the past year. If yes, the behavior did not occur in the past year.

never_occurred

Whether or not the behavior has NEVER occurred in the person's lifetime. If yes, the behavior has never occurred in the person's lifetime.

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 (num_occurrences).

interval_vars

The name(s) of the variables corresponding to the intervals (interval).

not_in_past_year_vars

The name(s) of the variables corresponding to whether the behavior did not occur in the past year (not_occurred_past_year).

never_occurred_vars

The name(s) of the variables corresponding to whether the behavior has never occurred during the person's lifetime (never_occurred).

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
)

[Package petersenlab version 1.0.0 Index]