Skip to contents

This function computes metabolic equivalent of task (METs) from weight, sex, accelerometer counts, and a published equation from one of the following scientific articles: Sasaki et al. (2011; doi:10.1016/j.jsams.2011.04.003); Santos-Lozano et al. (2013; 10.1055/s-0033-1337945); Freedson et al. (1998; doi: 10.1097/00005768-199805000-00021). This function is wrapped within the mark_intensity function.

Usage

compute_mets(
  data,
  equation = c("Sasaki et al. (2011) [Adults]", "Santos-Lozano et al. (2013) [Adults]",
    "Freedson et al. (1998) [Adults]", "Santos-Lozano et al. (2013) [Older adults]"),
  weight = 70,
  sex = c("male", "female", "intersex", "undefined", "prefer not to say")
)

Arguments

data

A dataframe obtained using the prepare_dataset function.

equation

A character string to indicate the equation to be used for estimating METs.

weight

A numeric value in kg.

sex

A character value.

Value

A numeric vector.

Examples

library(magrittr)
file <- system.file("extdata", "acc.agd", package = "activAnalyzer")
mydata <- prepare_dataset(data = file)
mydata_with_wear_marks <- mydata %>% mark_wear_time() %>% 
dplyr::filter(days == 2 & time >= hms::as_hms("14:00:00") & time <= hms::as_hms("15:00:00")) 
#> frame is 90
#> streamFrame is 30
#> allowanceFrame is 2
mets <- compute_mets(
    data = mydata_with_wear_marks,
    equation = "Sasaki et al. (2011) [Adults]", 
    weight = 67, 
    sex = "male"
    )
#> You have computed METs using the following inputs: 
#>     equation = Sasaki et al. (2011) [Adults]
#>     weight = 67
#>     sex = male
mets
#>  [1] 0.8972258 0.7327380 0.7077110 1.6566054 2.0404764 1.0454547 0.9985506
#>  [8] 2.1765888 2.5857112 2.3452880 2.1312295 1.6500984 2.1376502 3.0355499
#> [15] 2.0561830 2.6972108 0.9483068 2.9159727 3.4150110 3.8915855 3.6994731
#> [22] 2.3856505 1.5522514 1.5030173 2.3516311 1.7560057 1.3849675 1.7004803
#> [29] 2.1777279 2.3033721 2.3279849 2.1712641 2.1092662 1.1752067 2.5895170
#> [36] 1.5635395 1.4432373 0.9988268 1.6478028 1.9166791 3.7446857 4.5955605
#> [43] 3.2700702 3.6034816 3.0789675 4.1167163 1.9016025 2.6205160 1.8603165
#> [50] 3.3891210 1.7877210 3.1763570 2.6555538 3.0394075 1.1218906 1.3002900
#> [57] 0.6688760 1.1672930 0.8275386 0.6697390 0.6688760