knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
options(
  width = 140
)
library(ASQ3) # Load the package with the data

# Complementary packages
library(data.table)
library(skimr)

We will first calculate the statistics for the entire database without considering the underlying structure of the database.

descriptives <- skim(dataset)

print(descriptives)

Despite the above results, we cannot ignore that there is more than one observation per subject, so it is necessary to consider each subject as the minimum unit of analysis. For this we will use the first observation for each subject.

descriptives_by_patient <- skim(
  data = dataset[n_evaluacion == 1]
)

print(descriptives_by_patient)

Let's try the same but only with the patients with congenital hypotonia (ch).

ch_patients <- skim(
  data = dataset[n_evaluacion == 1 & diagnostico %like% "hipotonia"]
)

print(ch_patients)


nim-ach/ASQ3 documentation built on May 8, 2023, 10:21 p.m.