Skip to content

Commit

Permalink
Big5 examples
Browse files Browse the repository at this point in the history
  • Loading branch information
friendly committed Apr 28, 2024
1 parent 605cc85 commit 2650e38
Show file tree
Hide file tree
Showing 22 changed files with 240 additions and 47 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ Suggests:
dplyr,
tidyr,
ggplot2,
bookdown
bookdown,
patchwork
LazyLoad: yes
LazyData: yes
BugReports: https://github.com/friendly/heplots/issues
Expand Down
33 changes: 25 additions & 8 deletions R/datasets.R
Original file line number Diff line number Diff line change
Expand Up @@ -679,30 +679,47 @@ NULL
#' @examples
#'
#' data(Iwasaki_Big_Five)
#' # use Helmert contrasts for groups
#' contrasts(Iwasaki_Big_Five$Group) <-
#' matrix(c(2, -1, -1,
#' 0, -1, 1), ncol=2)
#'
#' str(Iwasaki_Big_Five)
#'
#' mod <- lm(cbind(N, E, O, A, C) ~ Group, data=Iwasaki_Big_Five)
#' Big5.mod <- lm(cbind(N, E, O, A, C) ~ Group, data=Iwasaki_Big_Five)
#' coef(Big5.mod)
#'
#' car::Anova(Big5.mod)
#'
#' car::Anova(mod)
#' # test contrasts
#' car::linearHypothesis(Big5.mod, "Group1", title = "Eur vs Asian")
#' car::linearHypothesis(Big5.mod, "Group2", title = "Asian: Amer vs Inter")
#'
#' # heplots
#' labs <- c("Neuroticism", "Extraversion", "Openness", "Agreeableness", "Consientiousness" )
#' labs <- c("Neuroticism", "Extraversion", "Openness", "Agreeableness", "Conscientiousness" )
#'
#' heplot(mod,
#' heplot(Big5.mod,
#' fill = TRUE, fill.alpha = 0.2,
#' cex.lab = 1.5,
#' xlab = labs[1], ylab = labs[2])
#'
#' heplot(mod, variables = c(2,5),
#' heplot(Big5.mod, variables = c(2,5),
#' fill = TRUE, fill.alpha = 0.2,
#' cex.lab = 1.5,
#' xlab = labs[2], ylab = labs[5])
#'
#' pairs(mod,
#' pairs(Big5.mod,
#' fill = TRUE, fill.alpha = 0.2, var.labels = labs)
#'
#'
#'
#'
#' # canonical discriminant analysis
#' if (require(candisc)) {
#' library(candisc)
#' Big5.can <- candisc(Big5.mod)
#' Big5.can
#' heplot(Big5.can, fill = TRUE, fill.alpha = 0.1)
#' }

NULL


Expand Down
Binary file modified docs/articles/fig/manova-addhealth-heplot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pkgdown_sha: ~
articles:
HE_manova: HE_manova.html
HE_mmra: HE_mmra.html
last_built: 2024-04-28T18:21Z
last_built: 2024-04-28T21:24Z
urls:
reference: https://friendly.github.io/heplots/reference
article: https://friendly.github.io/heplots/articles
Expand Down
Binary file modified docs/reference/AddHealth-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/AddHealth-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
73 changes: 62 additions & 11 deletions docs/reference/AddHealth.html

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions docs/reference/Adopted.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified docs/reference/Iwasaki_Big_Five-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/Iwasaki_Big_Five-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/reference/Iwasaki_Big_Five-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
88 changes: 80 additions & 8 deletions docs/reference/Iwasaki_Big_Five.html

Large diffs are not rendered by default.

Binary file modified docs/reference/Parenting-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/reference/WeightLoss.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions docs/reference/ellipse3d.axes.html

Large diffs are not rendered by default.

Binary file modified docs/reference/heplot-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/reference/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/reference/interpPlot.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/search.json

Large diffs are not rendered by default.

37 changes: 34 additions & 3 deletions man/AddHealth.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 23 additions & 7 deletions man/Iwasaki_Big_Five.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified vignettes/fig/manova-addhealth-heplot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2650e38

Please sign in to comment.