Type: | Package |
Title: | Sakai Sequential Relation Analysis |
Version: | 0.1-1 |
Date: | 2024-10-17 |
Author: | Takuya Yanagida [cre, aut], Keiko Sakai [aut] |
Maintainer: | Takuya Yanagida <takuya.yanagida@univie.ac.at> |
Description: | 'Takea Semantic Structure Analysis' (TSSA) and 'Sakai Sequential Relation Analysis' (SSRA) for polytomous items. Package includes functions for generating a sequential relation table and a treegram to visualize the sequential relations between pairs of items. |
License: | GPL-3 |
LazyLoad: | yes |
LazyData: | true |
Imports: | shape, stringr |
Depends: | R (≥ 3.2.0) |
RoxygenNote: | 5.0.1 |
NeedsCompilation: | no |
Packaged: | 2024-10-17 09:21:30 UTC; takuy |
Repository: | CRAN |
Date/Publication: | 2024-10-17 10:00:02 UTC |
Sakai Sequential Relation Analysis
Description
This function conducts the Sequential Relation Analysis based on Sakai 2016
Usage
SSRA(dat, r.crt = 0.3, mu.sq = 0, mu.eq = Inf, d.sq = 0.2, d.eq = 0.2,
pairwise = TRUE, method = c("pearson", "kendall", "spearman"),
alpha = 0.05, p.adjust.method = c("holm", "hochberg", "hommel",
"bonferroni", "BH", "BY", "fdr", "none"), digits = 3, vnames = TRUE,
order = c("no", "decreasing", "increasing"), exclude = TRUE,
output = TRUE)
Arguments
dat |
requires a data frame with polytomous data |
r.crt |
correlation coefficient criterion to be judged 'sequential' or 'equivalent |
mu.sq |
Absolute mean difference criterion to be judged 'sequential' |
mu.eq |
maximal absolute mean difference to be judged 'equivalent' |
d.sq |
effect size for mean difference criterion to be judged 'sequential' |
d.eq |
maximal effect size Cohen's d to be judged 'equivalent' |
pairwise |
pairwise deletion of missing data, if pairwise = FALSE listwise deletion is applied |
method |
character string indicating which correlation coefficient to be used, 'pearson' = Pearson's product moment correlation coefficien 'spearman' = Spearman's rho statistic 'kendall' = Kendall's tau (default) |
alpha |
significance level |
p.adjust.method |
p-value correction method for multiple comparisons, see: ?p.adjust (default = holm) |
digits |
integer indicating the number of decimal places to be used |
vnames |
use variable names for labeling? |
order |
sort by item mean of j and k? |
exclude |
exclude paths with no relationship? |
output |
print result table? |
Details
Takea Semantic Structure Analysis (TSSA) and Sakai Sequential Relation Analysis (SSRA) are graphical approaches
Value
Returns an object of class ssra
, to be used for the seqtable
function. The object is a list with
following entries: 'dat' (data frame), 'call" (function call), 'args' (specification of arguments),
'time' (time of analysis), 'R' (R version), 'package' (package version), and 'restab' (result table).
The 'restab' entry has following entries:
j | item j |
k | item k |
n | sample size |
j.mean | mean of item j |
j.sd | standard deviation of item j |
k.mean | mean of item k |
k.sd | standard deviation of item k |
r | correlation coefficient |
r.t | test statistic of the statistical significanc test for the correlation coefficient |
r.p | statistical significance value of the correlation |
r.sig | statistical significance of the correlation (0 = not significant / 1 = significant) |
r.crt | correlation criterion for judging 'sequential' or 'equal': 'r.p < alpha' and 'r > r.crt' (0 = no / 1 = yes) |
m.diff | mean difference |
sd.diff | standard deviation difference |
m.diff.eff | effect size Cohen's d for dependent samples |
m.t | test statistic of the statistical significanc test for mean difference |
m.p | statistical significance value of the mean difference |
m.sig | statistical significance of the mean difference (0 = not significant / 1 = significant) |
m.crt.sq | mean difference criteria for judging 'sequential': 'm.diff.p < alpha', 'm.diff > mu.sq' and 'm.diff.eff > d.sq' (0 = no / -1 = yes negative / 1 = yes postive) |
m.crt.eq | mean difference criteria for judging 'equivalence': statistical significant and 'm <= mu.eq' 'd <= d.sq' (0 = no 1 = yes) |
seq | sequential relation of item pairs ("+","-", "") |
eq | equivalence of item pairs ("=" or "") |
order | order structure of item pairs ("=", "+","-") |
Author(s)
Takuya Yanagida Keiko Sakai
References
Takeya, M. (1991). A new test theory: Structural analyses for educational information. Tokyo: Waseda University Press.
See Also
seqtable
, TSSA
, plot.ssra
, scatterplot
Examples
# Example data based on Takeya (1991)
# Sakai Sequential Relation Analysis
# ordering assesed according to the correlation coefficient and mean difference
SSRA(exdat)
Takea Semantic Structure Analysis
Description
This function conducts the Semantic Structure Analysis for polytomous items based on Takeya 1991
Usage
TSSA(dat, m, crit = 0.93, pairwise = TRUE, sig = FALSE, exact = TRUE,
alpha = 0.05, p.adjust.method = c("holm", "hochberg", "hommel",
"bonferroni", "BH", "BY", "fdr", "none"), digits = 3, vnames = TRUE,
order = c("no", "decreasing", "increasing"), exclude = TRUE,
output = TRUE)
Arguments
dat |
requires a data frame with polytomous data, all items need to have the same numbers of response categories |
m |
requires the number of item response categories |
crit |
criteria for ordering coefficient |
pairwise |
pairwise deletion of missing data, if pairwise = FALSE listwise deletion if applied |
sig |
if sig = TRUE, ordering will be assesed according to ordering coefficient and statistical significance |
exact |
if exact = TRUE, exact binomial test will be applied otherwise single-sample proportion test will be applied |
alpha |
significance level |
p.adjust.method |
p-value correction method for multiple comparisons, see: ?p.adjust (default = holm) |
digits |
integer indicating the number of decimal places to be used |
vnames |
use variable names for labeling? |
order |
sort by item mean of j and k? |
exclude |
exclude paths with no relationship? |
output |
print result table? |
Details
Takea Semantic Structure Analysis (TSSA) and Sakai Sequential Relation Analysis (SSRA) are graphical approaches
Value
Returns an object of class tssa
, to be used for the seqtable
function. The object is a list with
following entries: 'dat' (data frame), 'call" (function call), 'args' (specification of arguments),
'time' (time of analysis), 'R' (R version), 'package' (package version), and 'restab' (result table).
The 'restab' entry has following entries:
j | item j |
k | item k |
n | sample size |
j.mean | mean of item j |
j.sd | standard devication of item j |
k.mean | mean of item k |
k.sd | standard devication of item k |
c.jk | ordering coefficient j -> k |
p.jk | p-value j -> k (available if sig = TRUE) |
sig.jk | statistical significane p-value j -> k (0 = no / 1 = yes; available if sig = TRUE) |
c.kj | ordering coefficient k -> j |
p.kj | p-value k -> j (0 = no / 1 = yes; available if sig = TRUE) |
sig.kj | statistical significane p-value k -> j (available if sig = TRUE) |
crt.jk | ordering j -> k |
crt.kj | ordering k -> j |
order | order structure of item pairs ("=", "+","-") |
Author(s)
Takuya Yanagida Keiko Sakai
References
Takeya, M. (1991). A new test theory: Structural analyses for educational information. Tokyo: Waseda University Press.
See Also
Examples
# Example data based on Takeya (1991)
# Takea Semantic Structure Analysis
# ordering assesed according to the ordering coefficient
TSSA(exdat, m = 5)
# Takea Semantic Structure Analysis including statistical testing
# ordering assesed according to the ordering coefficient and statistical significance
TSSA(exdat, m = 5, sig = TRUE)
Example data based on Takeya (1991)
Description
A dataset containing 10 observations on 5 items.
Usage
exdat
Format
A data frame with 10 rows and 5 variables
Plot ssra
Description
Function for plotting the ssra object
Usage
## S3 method for class 'ssra'
plot(x, r.crt = NULL, r.sig = TRUE, d.sq = NULL,
m.sig = TRUE, sig.col = TRUE, col = c("red2", "green4", "blue3",
"black"), pch = c(1, 2, 0, 4), mar = c(3.5, 3.5, 1.5, 1), ...)
Arguments
x |
requires the return object from the SSRA function |
r.crt |
minimal absolute correlation to be judged 'sequential' |
r.sig |
plot statistically significant correlations |
d.sq |
minimal effect size Cohen's d to be judged 'sequential' |
m.sig |
plot statistically significant mean difference |
sig.col |
significance in different colors |
col |
color code or name |
pch |
plotting character |
mar |
number of lines of margin to be specified on the four sides of the plot |
... |
further arguments passed to or from other methods |
Details
Takea Semantic Structure Analysis (TSSA) and Sakai Sequential Relation Analysis (SSRA) are graphical approaches
Author(s)
Takuya Yanagida Keiko Sakai
References
Takeya, M. (1991). A new test theory: Structural analyses for educational information. Tokyo: Waseda University Press.
See Also
Examples
## Not run:
# Example data based on Takeya (1991)
# Sakai Sequential Relation Analysis
# ordering assesed according to the correlation coefficient and mean difference
exdat.ssra <- SSRA(exdat, output = FALSE)
plot(exdat.ssra)
## End(Not run)
Sakai Sequential Relation Analysis Print
Description
print
function for the ssra
object
Usage
## S3 method for class 'ssra'
print(x, digits = 3, ...)
Arguments
x |
requires the result object of hssr function |
digits |
integer indicating the number of decimal places to be used |
... |
further arguments passed to or from other methods |
Details
Takea Semantic Structure Analysis (TSSA) and Sakai Sequential Relation Analysis (SSRA) are graphical approaches
Author(s)
Takuya Yanagida Keiko Sakai
References
Takeya, M. (1991). A new test theory: Structural analyses for educational information. Tokyo: Waseda University Press.
See Also
Examples
# Example data based on Takeya (1991)
# Sakai Sequential Relation Analysis
# ordering assesed according to the correlation coefficient and mean difference
exdat.ssra <- SSRA(exdat, output = FALSE)
print(exdat.ssra)
Semantric Structure Analysis Print
Description
print
function for the tssa
object
Usage
## S3 method for class 'tssa'
print(x, digits = 3, ...)
Arguments
x |
requires the result object of hssr function |
digits |
integer indicating the number of decimal places to be used |
... |
further arguments passed to or from other methods |
Details
Takea Semantic Structure Analysis (TSSA) and Sakai Sequential Relation Analysis (SSRA) are graphical approaches
Author(s)
Takuya Yanagida Keiko Sakai
References
Takeya, M. (1991). A new test theory: Structural analyses for educational information. Tokyo: Waseda University Press.
See Also
Examples
# Example data based on Takeya (1991)
# Takea Semantic Structure Analysis
# ordering assesed according to the ordering coefficient
exdat.tssa <- TSSA(exdat, m = 5, output = FALSE)
print(exdat.tssa)
# Takea Semantic Structure Analysis including statistical testing
# ordering assesed according to the ordering coefficient and statistical significance
exdat.tssa <- TSSA(exdat, m = 5, sig = TRUE, output = FALSE)
print(exdat.tssa)
Scatterplot Matrices
Description
This function produces a scatterplot matrix
Usage
scatterplot(data, type = c("jitter", "size", "count", "sun"))
Arguments
data |
a data frame |
type |
type of plot, i.e., 'jitter', 'size', 'count', and 'sun' |
Details
Takea Semantic Structure Analysis (TSSA) and Sakai Sequential Relation Analysis (SSRA) are graphical approaches
Author(s)
Takuya Yanagida Keiko Sakai
References
Takeya, M. (1991). A new test theory: Structural analyses for educational information. Tokyo: Waseda University Press.
See Also
Examples
# Example data based on Takeya (1991)
# Scatterplot matrix: jitter
scatterplot(exdat)
# Scatterplot matrix: size
scatterplot(exdat, type = "size")
# Scatterplot matrix: count
scatterplot(exdat, type = "count")
# Scatterplot matrix: sun
scatterplot(exdat, type = "sun")
Sequential Relation Table
Description
This function builds a table for the tssa and ssra object used to create a treegram
Usage
seqtable(object, order = c("no", "decreasing", "increasing"), digits = 3,
output = TRUE)
Arguments
object |
requires the return object from the TSSA or SSRA function |
order |
sort by item mean of j? |
digits |
integer indicating the number of decimal places to be used |
output |
print result table? |
Details
Takea Semantic Structure Analysis (TSSA) and Sakai Sequential Relation Analysis (SSRA) are graphical approaches
Author(s)
Takuya Yanagida Keiko Sakai
References
Takeya, M. (1991). A new test theory: Structural analyses for educational information. Tokyo: Waseda University Press.
See Also
TSSA
, SSRA
, treegram
, summary.seqtable
Examples
# Example data based on Takeya (1991)
# Takea Semantic Structure Analysis
# ordering assesed according to the correlation coefficient and mean difference
exdat.tssa <- TSSA(exdat, m = 5, output = FALSE)
seqtable(exdat.tssa)
# Sakai Sequential Relation Analysis
# ordering assesed according to the correlation coefficient and mean difference
exdat.ssra <- SSRA(exdat, output = FALSE)
seqtable(exdat.ssra)
Sequential Relationship Table Summary
Description
summary
function for the seqtab
object
Usage
## S3 method for class 'seqtable'
summary(object, exclude = TRUE, ...)
Arguments
object |
requires the result object of seqtable function |
exclude |
exclude lower-order paths (i.e., paths included in higher order paths)? |
... |
additional arguments affecting the summary produced |
Details
Takea Semantic Structure Analysis (TSSA) and Sakai Sequential Relation Analysis (SSRA) are graphical approaches
Value
rel | relationship: sq = sequential / eq = equal |
var | variables involved in the sequential/equal paths |
Author(s)
Takuya Yanagida Keiko Sakai
References
Takeya, M. (1991). A new test theory: Structural analyses for educational information. Tokyo: Waseda University Press.
See Also
Examples
# Example data based on Takeya (1991)
# Sakai Sequential Relation Analysis
# ordering assesed according to the correlation coefficient and mean difference
exdat.ssra <- SSRA(exdat, output = FALSE)
exdat.seqtab<- seqtable(exdat.ssra, output = FALSE)
summary(exdat.seqtab)
Treegram
Description
This function draws a treegram for the Takea Semantic Structure Analysis (TSSA) and Sakai Sequential Relation Analysis (SSRA)
Usage
treegram(object, select = NULL, pos = NULL, col = NULL, mai = c(0.2, 0,
0.2, 0.2), print.pos = TRUE, cex.text = 0.95, x.factor = 1.7,
x.digits = 0, y.digits = 2, y.intersp = 1.45, cex.legend = 0.9)
Arguments
object |
requires the result object of seqtab function |
select |
select items to be plotted |
pos |
position of items on the x-axis |
col |
color code or name for paths |
mai |
numeric vector of the form c(bottom, left, top, right) which gives the margin size specified in inches |
print.pos |
display x/y-position as legend |
cex.text |
text expansion factor relative to current par("cex") |
x.factor |
shift factor of legend position |
x.digits |
decimal places of x-position |
y.digits |
decimal places of y-position |
y.intersp |
legend character interspacing factor for vertical (y) line distances |
cex.legend |
legend character expansion factor relative to current par("cex) |
Details
Takea Semantic Structure Analysis (TSSA) and Sakai Sequential Relation Analysis (SSRA) are graphical approaches
Author(s)
Takuya Yanagida Keiko Sakai
References
Takeya, M. (1991). A new test theory: Structural analyses for educational information. Tokyo: Waseda University Press.
See Also
Examples
# Example data based on Takeya (1991)
# Sakai Sequential Relation Analysis
# ordering assesed according to the correlation coefficient and mean difference
exdat.ssra <- SSRA(exdat, output = FALSE)
exdat.seqtab <- seqtable(exdat.ssra, output = FALSE)
treegram(exdat.seqtab)
# Select items to be plotted
exdat.ssra <- SSRA(exdat, output = FALSE)
exdat.seqtab <- seqtable(exdat.ssra, output = FALSE)
treegram(exdat.seqtab, select = c("Item2", "Item3", "Item4"))
# Define position for each item on the x-axis
exdat.ssra <- SSRA(exdat, output = FALSE)
exdat.seqtab <- seqtable(exdat.ssra, output = FALSE)
treegram(exdat.seqtab, pos = c(Item5 = 1, Item4 = 3,
Item3 = 5, Item2 = 2, Item1 = 4))
# Change colors for each path of an item
exdat.ssra <- SSRA(exdat, output = FALSE)
exdat.seqtab <- seqtable(exdat.ssra, output = FALSE)
treegram(exdat.seqtab,
col = c(Item5 = "red3", Item4 = "blue3",
Item3 = "gray99", Item2 = "darkgreen", Item1 = "darkorange2"))