Title: | Sakai Sequential Relation Analysis |
---|---|
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. |
Authors: | Takuya Yanagida [cre, aut], Keiko Sakai [aut] |
Maintainer: | Takuya Yanagida <[email protected]> |
License: | GPL-3 |
Version: | 0.1-1 |
Built: | 2024-10-18 12:32:01 UTC |
Source: | CRAN |
A dataset containing 10 observations on 5 items.
exdat
exdat
A data frame with 10 rows and 5 variables
Function for plotting the ssra object
## 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), ...)
## 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), ...)
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 |
Takea Semantic Structure Analysis (TSSA) and Sakai Sequential Relation Analysis (SSRA) are graphical approaches
Takuya Yanagida Keiko Sakai
Takeya, M. (1991). A new test theory: Structural analyses for educational information. Tokyo: Waseda University Press.
## 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)
## 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)
print
function for the ssra
object
## S3 method for class 'ssra' print(x, digits = 3, ...)
## S3 method for class 'ssra' print(x, digits = 3, ...)
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 |
Takea Semantic Structure Analysis (TSSA) and Sakai Sequential Relation Analysis (SSRA) are graphical approaches
Takuya Yanagida Keiko Sakai
Takeya, M. (1991). A new test theory: Structural analyses for educational information. Tokyo: Waseda University Press.
# 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)
# 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)
print
function for the tssa
object
## S3 method for class 'tssa' print(x, digits = 3, ...)
## S3 method for class 'tssa' print(x, digits = 3, ...)
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 |
Takea Semantic Structure Analysis (TSSA) and Sakai Sequential Relation Analysis (SSRA) are graphical approaches
Takuya Yanagida Keiko Sakai
Takeya, M. (1991). A new test theory: Structural analyses for educational information. Tokyo: Waseda University Press.
# 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)
# 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)
This function produces a scatterplot matrix
scatterplot(data, type = c("jitter", "size", "count", "sun"))
scatterplot(data, type = c("jitter", "size", "count", "sun"))
data |
a data frame |
type |
type of plot, i.e., 'jitter', 'size', 'count', and 'sun' |
Takea Semantic Structure Analysis (TSSA) and Sakai Sequential Relation Analysis (SSRA) are graphical approaches
Takuya Yanagida Keiko Sakai
Takeya, M. (1991). A new test theory: Structural analyses for educational information. Tokyo: Waseda University Press.
# 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")
# 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")
This function builds a table for the tssa and ssra object used to create a treegram
seqtable(object, order = c("no", "decreasing", "increasing"), digits = 3, output = TRUE)
seqtable(object, order = c("no", "decreasing", "increasing"), digits = 3, output = TRUE)
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? |
Takea Semantic Structure Analysis (TSSA) and Sakai Sequential Relation Analysis (SSRA) are graphical approaches
Takuya Yanagida Keiko Sakai
Takeya, M. (1991). A new test theory: Structural analyses for educational information. Tokyo: Waseda University Press.
TSSA
, SSRA
, treegram
, summary.seqtable
# 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)
# 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)
This function conducts the Sequential Relation Analysis based on Sakai 2016
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)
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)
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? |
Takea Semantic Structure Analysis (TSSA) and Sakai Sequential Relation Analysis (SSRA) are graphical approaches
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 ("=", "+","-") |
Takuya Yanagida Keiko Sakai
Takeya, M. (1991). A new test theory: Structural analyses for educational information. Tokyo: Waseda University Press.
seqtable
, TSSA
, plot.ssra
, scatterplot
# Example data based on Takeya (1991) # Sakai Sequential Relation Analysis # ordering assesed according to the correlation coefficient and mean difference SSRA(exdat)
# Example data based on Takeya (1991) # Sakai Sequential Relation Analysis # ordering assesed according to the correlation coefficient and mean difference SSRA(exdat)
summary
function for the seqtab
object
## S3 method for class 'seqtable' summary(object, exclude = TRUE, ...)
## S3 method for class 'seqtable' summary(object, exclude = TRUE, ...)
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 |
Takea Semantic Structure Analysis (TSSA) and Sakai Sequential Relation Analysis (SSRA) are graphical approaches
rel |
relationship: sq = sequential / eq = equal |
var |
variables involved in the sequential/equal paths |
Takuya Yanagida Keiko Sakai
Takeya, M. (1991). A new test theory: Structural analyses for educational information. Tokyo: Waseda University Press.
# 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)
# 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)
This function draws a treegram for the Takea Semantic Structure Analysis (TSSA) and Sakai Sequential Relation Analysis (SSRA)
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)
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)
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) |
Takea Semantic Structure Analysis (TSSA) and Sakai Sequential Relation Analysis (SSRA) are graphical approaches
Takuya Yanagida Keiko Sakai
Takeya, M. (1991). A new test theory: Structural analyses for educational information. Tokyo: Waseda University Press.
# 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"))
# 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"))
This function conducts the Semantic Structure Analysis for polytomous items based on Takeya 1991
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)
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)
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? |
Takea Semantic Structure Analysis (TSSA) and Sakai Sequential Relation Analysis (SSRA) are graphical approaches
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 ("=", "+","-") |
Takuya Yanagida Keiko Sakai
Takeya, M. (1991). A new test theory: Structural analyses for educational information. Tokyo: Waseda University Press.
# 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) # 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)