-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
extract two sample examples to a separate script
- Loading branch information
1 parent
c121c87
commit 93e4677
Showing
13 changed files
with
111 additions
and
320 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# ----------------------- between-subjects ------------------------------------- | ||
|
||
# for reproducibility | ||
set.seed(123) | ||
|
||
# ----------------------- parametric --------------------------------------- | ||
|
||
# unequal variance | ||
two_sample_test(ToothGrowth, supp, len, type = "parametric") | ||
|
||
# equal variance | ||
two_sample_test(ToothGrowth, supp, len, type = "parametric", var.equal = TRUE) | ||
|
||
# ----------------------- non-parametric ----------------------------------- | ||
|
||
two_sample_test(ToothGrowth, supp, len, type = "nonparametric") | ||
|
||
# ----------------------- robust -------------------------------------------- | ||
|
||
two_sample_test(ToothGrowth, supp, len, type = "robust") | ||
|
||
# ----------------------- Bayesian --------------------------------------- | ||
|
||
two_sample_test(ToothGrowth, supp, len, type = "bayes") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# ----------------------- within-subjects ------------------------------------- | ||
|
||
# data | ||
df <- dplyr::filter(bugs_long, condition %in% c("LDLF", "LDHF")) | ||
|
||
# for reproducibility | ||
set.seed(123) | ||
|
||
# ----------------------- parametric --------------------------------------- | ||
|
||
two_sample_test(df, condition, desire, subject.id = subject, paired = TRUE, type = "parametric") | ||
|
||
# ----------------------- non-parametric ----------------------------------- | ||
|
||
two_sample_test(df, condition, desire, subject.id = subject, paired = TRUE, type = "nonparametric") | ||
|
||
# ----------------------- robust -------------------------------------------- | ||
|
||
two_sample_test(df, condition, desire, subject.id = subject, paired = TRUE, type = "robust") | ||
|
||
# ----------------------- Bayesian --------------------------------------- | ||
|
||
two_sample_test(df, condition, desire, subject.id = subject, paired = TRUE, type = "bayes") |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.