Kevin Donovan
March 12, 2021
ggplot
, gtsummary
, etc.
GGally
, corrplot
, etc.## EACSF_V24 ICV_V24 TBV_V24 TCV_V24 LeftAmygdala_V24
## EACSF_V24 1.0000000 0.4967139 0.3776087 0.3682626 0.2796662
## ICV_V24 0.4967139 1.0000000 0.9831674 0.9762236 0.7688862
## TBV_V24 0.3776087 0.9831674 1.0000000 0.9958002 0.7775354
## TCV_V24 0.3682626 0.9762236 0.9958002 1.0000000 0.7758346
## LeftAmygdala_V24 0.2796662 0.7688862 0.7775354 0.7758346 1.0000000
## RightAmygdala_V24 0.2780251 0.7694070 0.7789113 0.7759660 0.8863418
## RightAmygdala_V24
## EACSF_V24 0.2780251
## ICV_V24 0.7694070
## TBV_V24 0.7789113
## TCV_V24 0.7759660
## LeftAmygdala_V24 0.8863418
## RightAmygdala_V24 1.0000000
Characteristic | N | HR-ASD, N = 781 | HR-Neg, N = 2731 | LR-Neg, N = 1511 | p-value2 |
EACSF_V24 | 292 | 72,487 (16,123) | 70,358 (15,022) | 68,386 (11,828) | 0.3 |
Missing | 30 | 102 | 78 | ||
ICV_V24 | 359 | 1,270,041 (123,302) | 1,223,180 (108,795) | 1,220,693 (108,481) | 0.014 |
Missing | 23 | 66 | 54 | ||
TBV_V24 | 359 | 1,104,088 (107,222) | 1,064,502 (95,094) | 1,065,981 (95,287) | 0.024 |
Missing | 23 | 66 | 54 | ||
TCV_V24 | 359 | 973,873 (99,189) | 938,532 (86,327) | 939,574 (86,906) | 0.027 |
Missing | 23 | 66 | 54 | ||
LeftAmygdala_V24 | 359 | 1,071 (132) | 1,029 (103) | 1,032 (103) | 0.037 |
Missing | 23 | 66 | 54 | ||
RightAmygdala_V24 | 359 | 1,072 (115) | 1,036 (97) | 1,033 (99) | 0.044 |
Missing | 23 | 66 | 54 | ||
1Mean (SD) | |||||
2One-way ANOVA |
summary
##
## Call:
## lm(formula = V24_MSEL_EL_ae ~ RiskGroup + RightAmygdala_V24 +
## RiskGroup * RightAmygdala_V24, data = brain_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -18.348 -3.159 -0.599 3.324 18.403
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.404220 6.900240 0.928 0.3540
## RiskGroupHR-Neg 15.251840 8.012648 1.903 0.0578 .
## RiskGroupLR-Neg 22.861074 9.024587 2.533 0.0117 *
## RightAmygdala_V24 0.011110 0.006403 1.735 0.0836 .
## RiskGroupHR-Neg:RightAmygdala_V24 -0.009279 0.007505 -1.236 0.2172
## RiskGroupLR-Neg:RightAmygdala_V24 -0.015163 0.008514 -1.781 0.0758 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 5.425 on 351 degrees of freedom
## (145 observations deleted due to missingness)
## Multiple R-squared: 0.1478, Adjusted R-squared: 0.1357
## F-statistic: 12.18 on 5 and 351 DF, p-value: 6.798e-11
tbl_regression
Characteristic | Beta | 95% CI1 | p-value |
RiskGroup | |||
HR-ASD | — | — | |
HR-Neg | 15.252 | -0.507, 31.011 | 0.058 |
LR-Neg | 22.861 | 5.112, 40.610 | 0.012 |
RightAmygdala_V24 | 0.011 | -0.001, 0.024 | 0.084 |
RiskGroup * RightAmygdala_V24 | |||
HR-Neg * RightAmygdala_V24 | -0.009 | -0.024, 0.005 | 0.217 |
LR-Neg * RightAmygdala_V24 | -0.015 | -0.032, 0.002 | 0.076 |
1CI = Confidence Interval |
broom
and flex_table
packages
broom.mixed
##
## Call:
## lm(formula = V24_MSEL_EL_ae ~ RiskGroup + RightAmygdala_V24 +
## RiskGroup * RightAmygdala_V24, data = brain_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -18.348 -3.159 -0.599 3.324 18.403
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.404220 6.900240 0.928 0.3540
## RiskGroupHR-Neg 15.251840 8.012648 1.903 0.0578 .
## RiskGroupLR-Neg 22.861074 9.024587 2.533 0.0117 *
## RightAmygdala_V24 0.011110 0.006403 1.735 0.0836 .
## RiskGroupHR-Neg:RightAmygdala_V24 -0.009279 0.007505 -1.236 0.2172
## RiskGroupLR-Neg:RightAmygdala_V24 -0.015163 0.008514 -1.781 0.0758 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 5.425 on 351 degrees of freedom
## (145 observations deleted due to missingness)
## Multiple R-squared: 0.1478, Adjusted R-squared: 0.1357
## F-statistic: 12.18 on 5 and 351 DF, p-value: 6.798e-11
## # A tibble: 6 x 5
## term estimate std.error statistic p.value
## <chr> <dbl> <dbl> <dbl> <dbl>
## 1 (Intercept) 6.40 6.90 0.928 0.354
## 2 RiskGroupHR-Neg 15.3 8.01 1.90 0.0578
## 3 RiskGroupLR-Neg 22.9 9.02 2.53 0.0117
## 4 RightAmygdala_V24 0.0111 0.00640 1.74 0.0836
## 5 RiskGroupHR-Neg:RightAmygdala_V24 -0.00928 0.00750 -1.24 0.217
## 6 RiskGroupLR-Neg:RightAmygdala_V24 -0.0152 0.00851 -1.78 0.0758
\[ \begin{align} &MSEL = \beta_0+\beta_1Amyg+\beta_2HRneg+\beta_3LRneg+\beta_4HRneg*Amyg+\beta_5LRneg*Amyg=\epsilon \\ &LSM(HRneg)=\beta_0+\beta_2+\beta_1x+\beta_4x \text{ where x is fixed value, e.g. mean Amygfala} \\ &LSM(LRneg)=\beta_0+\beta_3+\beta_1x+\beta_5x\\ &LSM(HRASD)=\beta_0+\beta_1x \end{align} \]
lsmeans
functionggplot