plot.crs {ccrs}R Documentation

Plot crs objects

Description

Plots results of correction (1st plot: estimated response functions, 2nd plot: coefficient plot. See Appendix A of the reference paper for the 2nd plot).

Usage

## S3 method for class 'crs'
plot(x, H = NULL, cls.rs.vec = NULL, ...)

Arguments

x

An object of class crs.

H

An integer indicating the number of response-style-based clusters to display the correction result. If H=NULL and cls.rs.vec=NULL, H is set as H=n. If H=NULL but cls.rs.vec!=NULL, H is set as H=max(cls.rs.vec). The default is H=NULL.

cls.rs.vec

An integer vector of length n indicating response-style-based clusters for n respondents. If cls.rs.vec=NULL and H!=NULL, clusters are determined by k-means clustering of Beta. The default is cls.rs.vec=NULL.

...

Additional arguments passed to plot.

Details

Correction results for each respondent are displayed. If either response-style-based clusters or the number of response-style-based clusters are specified, the correction results of response-style-based clusters are displayed.

References

Takagishi, M., Velden, M. van de & Yadohisa, H. (2019). Clustering preference data in the presence of response style bias, to appear in British Journal of Mathematical and Statistical Psychology.

See Also

ccrs

Examples

###data setting
n <- 30 ; m <- 10 ; H.true <- 2 ; K.true <- 2 ; q <- 5
datagene <- generate.rsdata(n=n,m=m,K.true=K.true,H.true=H.true,q=q,clustered.rs = TRUE)
###obtain n x m data matrix
X <- datagene$X
ccrsdata.list <- create.ccrsdata(X,q=q)
crs.list <- correct.rs(ccrsdata.list)
###You can check correction result using this \code{crs.plot} function.
plot(crs.list)

#####You can also check correction result obtained
#####by a simultaneous analysis of correction and content-based clustering.
###CCRS
lam <- 0.8 ; K <- 2
ccrs.list <- ccrs(ccrsdata.list,K=K,lam=lam)
###check correction result using this \code{crs.plot} function.
plot(ccrs.list$crs.list)

[Package ccrs version 0.1.0 Index]