Spca_plot: Plot the test information or scale curve in either two or...

View source: R/Spca_plot.R

Spca_plotR Documentation

Plot the test information or scale curve in either two or three dimensions.

Description

A test or scale analysis produces a space curve that varies with in the space of possible option curves of dimension Sdim. Fortunately, it is usual that most of the shape variation in the curve is within only two or three dimensions, and these can be fixed by using functional principal components analysis.

Usage

  Spca_plot(harmvarmxfd, nharm=2, titlestr=NULL)

Arguments

harmvarmxfd

Functional data objects for the principal components of the curve shape.

nharm

Number of principal components.

titlestr

A string for the title of the plot. Defaults to NULL.

Value

Side effect is a two or three-dimensional plot of the principal component approximation of the information curve using the plotly package. Function plot_ly does not return a value, but does render the graphic.

Author(s)

Juan Li and James Ramsay

References

Ramsay, J. O., Li J. and Wiberg, M. (2020) Full information optimal scoring. Journal of Educational and Behavioral Statistics, 45, 297-315.

Ramsay, J. O., Li J. and Wiberg, M. (2020) Better rating scale scores with information-based psychometrics. Psych, 2, 347-360.

See Also

Spca

Examples

#  Example 1.  Display the test information curve for the 
#  short SweSAT multiple choice test with 24 items and 1000 examinees
#  plot a two-dimension version of manifold curve
SfdList    <- Quant_13B_problem_parmList$SfdList
index    <- Quant_13B_problem_parmList$index
arclength  <- Quant_13B_problem_parmList$arclength 
Results    <- Spca(SfdList,  nharm=2, rotate=TRUE)
varprop    <- Results$varpropvarmx
titlestr   <- "SweSAT problem items"
oldpar <- par(no.readonly=TRUE)
on.exit(oldpar)
Spca_plot(Results$harmvarmxfd, nharm=2, titlestr)
print("Proportions of variance accounted for and their sum:")
print(round(100*c(varprop,sum(varprop)),1))
#  plot a three-dimension version of manifold curve
SfdList    <- Quant_13B_problem_parmList$SfdList
index    <- Quant_13B_problem_parmList$index
arclength  <- Quant_13B_problem_parmList$arclength 
Results    <- Spca(SfdList,  nharm=3, rotate=TRUE)
varprop    <- Results$varpropvarmx
Spca_plot(Results$harmvarmxfd, nharm=3, titlestr)
print("Proportions of variance accounted for and their sum:")
print(round(100*c(varprop,sum(varprop)),1))

TestGardener documentation built on Nov. 24, 2023, 5:08 p.m.