File tree Expand file tree Collapse file tree 3 files changed +59
-9
lines changed
Expand file tree Collapse file tree 3 files changed +59
-9
lines changed Original file line number Diff line number Diff line change @@ -198,7 +198,10 @@ ranef(linearMixedModel)
198198``` {r}
199199#| echo: false
200200
201- head(ranef(linearMixedModel))
201+ linearMixedModel_re <- ranef(linearMixedModel)
202+
203+ linearMixedModel_re$id <- head(linearMixedModel_re$id)
204+ linearMixedModel_re
202205```
203206
204207#### ` nlme `
@@ -365,7 +368,10 @@ ranef(quadraticGCM)
365368``` {r}
366369#| echo: false
367370
368- head(ranef(quadraticGCM))
371+ quadraticGCM_re <- ranef(quadraticGCM)
372+
373+ quadraticGCM_re$id <- head(quadraticGCM_re$id)
374+ quadraticGCM_re
369375```
370376
371377### Spline Growth Curve Model {#splineGCM}
@@ -479,7 +485,10 @@ ranef(splineGCM)
479485``` {r}
480486#| echo: false
481487
482- head(ranef(splineGCM))
488+ splineGCM_re <- ranef(splineGCM)
489+
490+ splineGCM_re$id <- head(splineGCM_re$id)
491+ splineGCM_re
483492```
484493
485494# Generalized Linear Mixed Models {#generalized}
Original file line number Diff line number Diff line change @@ -521,13 +521,18 @@ mice::predict_mi(
521521``` {r}
522522#| echo: false
523523
524- mice::predict_mi(
524+ fit_lm_fitted <- mice::predict_mi(
525525 fit_lm,
526526 #newdata = # can include if want to make predictions based on another (i.e., "new") data object
527527 se.fit = TRUE,
528528 interval = c("prediction")
529- ) %>%
530- head()
529+ )
530+
531+ fit_lm_fitted$fit <- head(fit_lm_fitted$fit)
532+ fit_lm_fitted$se.fit <- head(fit_lm_fitted$se.fit)
533+ fit_lm_fitted$df <- head(fit_lm_fitted$df)
534+
535+ fit_lm_fitted
531536```
532537
533538``` {r}
@@ -544,13 +549,18 @@ mice::predict_mi(
544549``` {r}
545550#| echo: false
546551
547- mice::predict_mi(
552+ fit_lmer_fitted <- mice::predict_mi(
548553 fit_lmer,
549554 #newdata = # can include if want to make predictions based on another (i.e., "new") data object
550555 se.fit = TRUE,
551556 interval = c("prediction")
552- ) %>%
553- head()
557+ )
558+
559+ fit_lmer_fitted$fit <- head(fit_lmer_fitted$fit)
560+ fit_lmer_fitted$se.fit <- head(fit_lmer_fitted$se.fit)
561+ fit_lmer_fitted$df <- head(fit_lmer_fitted$df)
562+
563+ fit_lmer_fitted
554564```
555565
556566# Resources
Original file line number Diff line number Diff line change @@ -1384,6 +1384,7 @@ Resources
13841384Spearman's rho is a non-parametric correlation.
13851385
13861386``` {r}
1387+
13871388cor.test(
13881389 mydata$bpi_antisocialT1Sum,
13891390 mydata$bpi_antisocialT2Sum) #Pearson r, correlation that is sensitive to outliers
@@ -1396,19 +1397,49 @@ cor.test(
13961397####### Minimum vollume ellipsoid
13971398
13981399``` {r}
1400+ #| eval: false
1401+
13991402cov.mve(
14001403 na.omit(mydata[,c("bpi_antisocialT1Sum","bpi_antisocialT2Sum")]),
14011404 cor = TRUE)
14021405```
14031406
1407+ ``` {r}
1408+ #| echo: false
1409+
1410+ cov.mve.fit <- cov.mve(
1411+ na.omit(mydata[,c("bpi_antisocialT1Sum","bpi_antisocialT2Sum")]),
1412+ cor = TRUE)
1413+
1414+ cov.mve.fit$best <- head(cov.mve.fit$best)
1415+ cov.mve.fit
1416+ ```
1417+
14041418####### Minimum covariance determinant
14051419
14061420``` {r}
1421+
1422+ ```
1423+
1424+ ``` {r}
1425+ #| eval: false
1426+
14071427cov.mcd(
14081428 na.omit(mydata[,c("bpi_antisocialT1Sum","bpi_antisocialT2Sum")]),
14091429 cor = TRUE)
14101430```
14111431
1432+ ``` {r}
1433+ #| echo: false
1434+
1435+ cov.mcd.fit <- cov.mcd(
1436+ na.omit(mydata[,c("bpi_antisocialT1Sum","bpi_antisocialT2Sum")]),
1437+ cor = TRUE)
1438+
1439+ cov.mcd.fit$best <- head(cov.mcd.fit$best)
1440+ cov.mcd.fit
1441+ ```
1442+
14121443####### Winsorized correlation
14131444
14141445``` {r}
You can’t perform that action at this time.
0 commit comments