walkboutr
comes with several preset parameters. The
parameters that we are using are:
epoch_length = 30
Epoch
length is the length of an epoch in seconds.active_counts_per_epoch_min = 500
The number of CPE
associated with being active are the accelerometry counts, in CPE, that
are considered to reflect someone who is active (compared to inactive or
at a very low activity level)minimum_bout_length = 10
The minimum bout length is in
epochs and is the minimum amount of time that must elapse for something
to be considered a bout. A minimum bout length is equal to a minimum
bout length of 5 minutes.local_time_zone = "America/Los_Angeles"
For the purposes of
evaluating whether we have a complete day of data (a flag that is passed
as an output of this package), we use the local time zone of your
data.maximum_number_consec_inactive_epochs_in_bout = 3
A bout of
walking, or activity, is allowed to have up to a certain number of
consecutive epochs of inactivity (or low activity) before the bout would
terminate. The standard amount of inactive time that can interrupt a
bout is 2 minutes, and thus the maximum number of consecutive inactive
epochs in a bout is 3, or 1.5 minutes. After that, we would hit the 2
minute threshold and the bout would end rather than be interrupted.If you want to set any of these parameters yourself, you can simply pass them into the functions. If you pass nothing, the above default parameter values will be used.
For example, if we generate some sample data, we can then pass in a different parameter value.
gps_data <- generate_walking_in_seattle_gps_data()
accelerometry_counts <- make_full_day_bout_without_metadata()
Now that we have sample data, we can look at how
walkboutr
generates bouts:
walk_bouts <- identify_walk_bouts_in_gps_and_accelerometry_data(gps_data, accelerometry_counts, epoch_length = 15)
summary_walk_bouts <- summarize_walk_bouts(walk_bouts)
This will change the way we treat epochs to regard them as 15 second intervals rather than 30 second intervals. The same can be done with any parameters listed above.