READy analysis

Author

Rebecca Basta and Katherine Lorusso

This uses HTML as output format. See the Quarto documentation for instructions on how to use other formats.

1 Methods

The dataset was loaded from the processed-data folder using the here package. Linear regression models were fit using the lm() function. The first one is a linear model with height as the outcome and weight as the predictor. The secone one is a multiple linear model with height as the outcome and weight and gender as predictors. The third one is a few linear models with height as the outcome and study time and exercise time as predictors. Model results were cleaned up using the broom package and saved as RDS files in the results/tables folder. Figures generated during analysis were saved to the results/figures folder.

2 Results

library(here)

# Load saved tables
result1 <- readRDS(here("results", "tables", "resulttable1.rds"))
result2 <- readRDS(here("results", "tables", "resulttable2.rds"))
result3 <- readRDS(here("results", "tables", "resulttable3.rds"))

result1
         term    estimate  std.error statistic      p.value
1 (Intercept) 149.6997661 19.7518528 7.5790240 0.0001285084
2      Weight   0.2277371  0.2708841 0.8407177 0.4282859783
result2
         term    estimate  std.error  statistic     p.value
1 (Intercept) 149.2726967 23.3823360  6.3839942 0.001396202
2      Weight   0.2623972  0.3512436  0.7470519 0.488651747
3     GenderM  -2.1244913 15.5488953 -0.1366329 0.896652025
4     GenderO  -4.7644739 19.0114155 -0.2506112 0.812087104
result3
          term      estimate    std.error  statistic      p.value
1  (Intercept) 161.089286648 12.869001653 12.5176211 1.589696e-05
2 Exercisetime  -0.030542742  0.118496421 -0.2577524 8.052106e-01
3    Studytime   0.001656239  0.002921644  0.5668859 5.913515e-01

2.1 Exploratory/Descriptive analysis

Table 1: Data summary table. All caption text goes here.
skim_type skim_variable n_missing complete_rate factor.ordered factor.n_unique factor.top_counts numeric.mean numeric.sd numeric.p0 numeric.p25 numeric.p50 numeric.p75 numeric.p100 numeric.hist
factor Gender 0 1 FALSE 3 M: 4, F: 3, O: 2 NA NA NA NA NA NA NA NA
numeric Height 0 1 NA NA NA 165.66667 15.97655 133 156 166 178 183 ▂▁▃▃▇
numeric Weight 0 1 NA NA NA 70.11111 21.24526 45 55 70 80 110 ▇▂▃▂▂
Figure 1: Height and weight stratified by gender.

2.2 Full analysis

Table 2: Linear model fit table.
term estimate std.error statistic p.value
(Intercept) 149.2726967 23.3823360 6.3839942 0.0013962
Weight 0.2623972 0.3512436 0.7470519 0.4886517
GenderM -2.1244913 15.5488953 -0.1366329 0.8966520
GenderO -4.7644739 19.0114155 -0.2506112 0.8120871