stp25stat-package: stp25stat: Functions for statistical computations

Description Author(s) Examples

Description

Collection of convenient functions for common statistical computations.

Convert statistical analysis objects from R into APA-Tabls.

Author(s)

Maintainer: Wolfgang Peter w.peter@statistik-peter.at

Maintainer: Wolfgang Peter w.peter@statistik-peter.at

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#' ---
#' title: Daten Aufbereiten
#' author: Wolfgang Peter
#' output:
#'   pdf_document
#' keep_tex: yes
#' lang: de-DE
#' ---
#+ setup, include=FALSE
#knitr::opts_chunk$set(echo = FALSE, warnings=FALSE)
#require(stpvers)
#require(tidyverse)
#require( effects)



#' #MANOVA
require(car)
require(candisc)
DF <- stp25aggregate::GetData("C:/Users/wpete/Dropbox/3_Forschung/R-Project/stp25data/extdata/manova.sav")
DF$GROUP <-
  factor(DF$GROUP, 1:3, Cs("website", "nurse ", "video tape"))
#DF %>% Tabelle2(USEFUL, DIFFICULTY, IMPORTANCE, by=~GROUP )
z <- as.matrix(DF[, -1])
fit1 <- manova(z ~ DF$GROUP)

#+ results='asis'
APA2(fit1)


#+
summary(fit1)$Eigenvalues
#APA2(manova(cbind(USEFUL, DIFFICULTY, IMPORTANCE)~GROUP, DF ))


#+
fit2 <- lm(cbind(USEFUL, DIFFICULTY, IMPORTANCE) ~ GROUP, DF)
can1 <- candisc(fit2, term = "GROUP")


#+ setup-plot, include=FALSE
require(lattice)
# require(stp25plot)
# graphics.off()
reset_lattice() 
set_lattice_bw(  col = grey.colors(4, start = 0.4, end = 0.9)) 


#+ plot-1, fig.cap='Eigenwerte', fig.height=6, fig.width=6, echo=FALSE 
 plot( can1)

#+ results='asis'
APA2(can1)


#+
Anova(fit2, test = "Wilks") 


#+ results='asis'
APA2(fit2)



#+ results='asis'
APA2(Anova(fit2, test = "Pillai"))

stp4/stp25stat documentation built on Sept. 17, 2021, 2:03 p.m.