Title: | Computerized Adaptive Testing for Survey Research |
---|---|
Description: | Provides methods of computerized adaptive testing for survey researchers. See Montgomery and Rossiter (2020) <doi:10.1093/jssam/smz027>. Includes functionality for data fit with the classic item response methods including the latent trait model, Birnbaum`s three parameter model, the graded response, and the generalized partial credit model. Additionally, includes several ability parameter estimation and item selection routines. During item selection, all calculations are done in compiled C++ code. |
Authors: | Jacob Montgomery [aut], Erin Rossiter [aut, cre] |
Maintainer: | Erin Rossiter <[email protected]> |
License: | GPL-3 |
Version: | 1.5.0 |
Built: | 2024-11-10 06:20:39 UTC |
Source: | CRAN |
Cat object containing item parameters for graded response model fit with responses to the 20-item Agreeableness dimension of the 100-item IPIP representation of Costa and McCrae's Five Factor Model
data(agree_cat)
data(agree_cat)
An object of class Cat
of length 1.
Cat object containing item parameters for graded response model fit with 774,410 response profiles by myPersonality Poject and 1500 response profiles collected by YouGov in June 2018. The sample from myPersonality Project was a convenience sample, and the respondents from YouGov were matched to a sampling frame on gender, age, race, and education.
See Cat-class
for details regarding the Cat object structure.
See grmCat
for details regarding the graded response model.
A normal prior was chosen with mean from the theta estimates from the YouGov sample (.113) and a standard deviation (1.5) wide enough to envelope the range of estimated theta values across both samples.
Note that due to how the item parameters were estimated, large, positive values indicate "more" of the latent trait.
Response options are 1=Very inaccurate; 2=Moderately inaccurate; 3=Neither inaccurate nor accurate; 4=Moderately accurate; 5=Very accurate.
The wording of the question items:
I...
q86
Have a good word for everyone.
q6
Believe that others have good intentions.
q66
Respect others.
q46
Accept people as they are.
q36
Make people feel at ease.
q26
Am concerned about others.
q56
Trust what people say.
q76
Sympathize with others' feelings.
q13
Am easy to satisfy.
q96
Treat all people equally.
q82
Have a sharp tongue.
q9
Cut others to pieces.
q22
Suspect hidden motives in others.
q32
Get back at others.
q92
Insult people.
q42
Believe that I am better than others.
q52
Contradict others.
q62
Make demands on others.
q2
Hold a grudge.
q72
Am out for my own personal gain.
See https://dataverse.harvard.edu/dataverse/pdsl for the raw YouGov and/or Qualtrics data.
Costa, P. T., Jr., & McCrae, R. R. (1992). Revised NEO Personality Inventory (NEO PI-R) and NEO Five-Factor Inventory (NEO-FFI): Professional manual. Odessa, FL: Psychological Assessment Resources.
Stillwell, David, and Michal Kosinski. 2007. "myPersonality Project." https://sites.google.com/michalkosinski.com/mypersonality
Creates an object of class Cat
. Cat
objects are used in administering Computerized Adaptive Testing (CAT) Surveys. These objects contain several pieces of information relevant for CAT surveys, and are used as input in the main functions of the catSurv
package.
Assume we have a survey battery with I
questions. An object of the class Cat
has the following slots:
ids
A vector of length I
of unique question identifiers. Default is the column names of response data frame used to calibrate Cat
object.
guessing
A vector of length I
of guessing parameters. Guessing parameters are only applicable for Cat
objects fit with the "tpm"
model, using the tpmCat
function.
discrimination
A vector of length I
of discrimination parameters.
difficulty
A vector or list of length I
of difficulty parameters. For Cat
objects of the "ltm"
or "tpm"
model, difficulty
is a vector that contains a parameter for each item. For Cat
objects of the "grm"
or "gpcm"
model, difficulty
is a list that contains a vector for each item, and each vector contains parameters for each response option.
answers
A vector of length I
of answers to questions as given by the survey respondent. Unanswered questions have the value NA
. Questions respondent has skipped or refused to answer have a value of -1
.
priorName
A character vector of length one giving the prior distribution to use for the ability parameter estimates. The options are "NORMAL"
for the normal distribution, "STUDENT_T"
for the student's t distribution, and "UNIFORM"
for the uniform distribution. The default value is "NORMAL"
.
priorParams
A numeric vector of length two of parameters for the distribution specified in the priorName
slot. When priorName
is set to "NORMAL"
, the first element of priorParams
is the mean, and the second element is the standard deviation. When priorName
is set to "STUDENT_T"
, the first element of priorParams
is the location parameter and the second is degrees of freedom. When priorName
is set to "UNIFORM"
, the elements of priorParams
are lower and upper bound, respectively. Note that the uniform distribution is only applicable for the "EAP"
estimation method. The default values are .
lowerBound
A numeric indicating the lower bound of the interval of the latent scale used in estimation. The default value is .
upperBound
A numeric indicating the upper bound of the interval of the latent scale used in estimation. The default value is .
model
A string indicating the model fit to the data. The options are "ltm"
for the latent trait model, "tpm"
for Birnbaum's three parameter model, "grm"
for the graded response model, and "gpcm"
for the generalized partial credit model.
estimation
A string indicating the approach to estimating ability parameters. The options are "EAP"
for the expected a posteriori approach, "MAP"
for the modal a posteriori approach, "MLE"
for the maximum likelihood approach, and "WLE"
for the weighted maximum likelihood approach. The default value is "EAP"
.
estimationDefault
A string indicating the approach to estimating ability parameters when the primary estimation choice indicated in the estimation
slot is "MLE"
or "WLE"
and this estimation fails to converge. The options are "EAP"
and "MAP"
. The default value is "MAP"
.
selection
A string indicating the approach for selecting the next item. The options are "EPV"
for minimum expected posterior variance, "MEI"
for maximum expected information, "MFI"
for maximum Fisher information, "MPWI"
for maximum posterior weighted information, "MLWI"
for maximum likelihood weighted information, "KL"
for the maximum expected Kullback-Leibler (KL) information, "LKL"
maximum likelihood weighted KL information, "PKL"
maximum posterior weighted KL information, "MFII"
for maximum Fisher interval information, and "RANDOM"
where the next item is chosen randomly. The default value is "EPV"
.
z
A numeric used in calculating .
is used in determining the bounds of integration for some
selectItem
methods. See selectItem
for more information. Default value is 0.9
.
lengthThreshold
A numeric. The number of questions answered must be greater than or equal to this threshold to stop administering items. The default value is NA
.
seThreshold
A numeric. The standard error estimate of the latent trait must be less than this threshold to stop administering items. The default value is NA
.
infoThreshold
A numeric. The Fisher's information for all remaining items must be less than this threshold to stop administering items. The default value is NA
.
gainThreshold
A numeric. The absolute value of the difference between the standard error of the latent trait estimate and the square root of the expected posterior variance for each item must be less than this threshold to stop administering items. The default value is NA
.
lengthOverride
A numeric. The number of questions answered must be less than this override to continue administering items. The default value is NA
.
gainOverride
A numeric. The absolute value of the difference between the standard error of the latent trait estimate and the square root of the expected posterior variance for each item must be less than this override to continue administering items. The default value is NA
.
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil
checkStopRules
, estimateTheta
, gpcmCat
, grmCat
, ltmCat
, selectItem
, tpmCat
Evaluates the specified stopping and/or override rules to check if respondent should be asked further questions.
checkStopRules(catObj)
checkStopRules(catObj)
catObj |
An object of class |
The stopping rule thresholds are stored in the following Cat
object slots:
lengthThreshold
, seThreshold
, infoThreshold
, and gainThreshold
. The override
thresholds are stored in the following Cat
object slots: lengthOverride
, gainOverride
.
A value of NA
indicates the rule will not be used in evaluating if further questions should be administered.
A user can specify any combination of stopping rules and/or overrides.
Stopping Rules:
lengthThreshold
: Number of question's answered
seThreshold
:
infoThreshold
:
remaining items
gainThreshold
:
remaining items
Overrides:
lengthOverride
: Number of question's answered
gainOverride
:
remaining items
The function checkStopRules
returns a boolean. TRUE
indicates all specified stopping rules are met
and no specified overrides are met. No further items should be administered. FALSE
indicates at least one specified
stopping rule is not met, or if any specified override threshold is met. Additional items should be administered.
This function is to allow users to access the internal functions of the package. During item selection, all calculations are done in compiled C++
code.
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil
Babcock, Ben, and David J. Weiss. 2009. “Termination Criteria in Computerized Adaptive Tests: Variable-Length CATs are not Biased." Proceedings of the 2009 GMAC Conference on Computerized Adaptive Testing. Vol. 14.
Cat-class
, estimateSE
, expectedPV
, fisherInf
## Loading ltm Cat object data(ltm_cat) ## Store example answers setAnswers(ltm_cat) <- c(1,0,1,0,1,0,0,0,1,1, rep(NA, 30)) ## Stop administering items if standard error of ability ## estimate is low enough setSeThreshold(ltm_cat) <- .5 checkStopRules(ltm_cat) ## Now stop if standard error is low enough, but only if respondent has ## answered 11 questions setLengthOverride(ltm_cat) <- 11 checkStopRules(ltm_cat) ## When respondent has answered 11 questions and standard error ## of ability estimate is below .5, stop administering items setAnswers(ltm_cat) <- c(1,0,1,0,1,0,0,0,1,1,0, rep(NA, 29)) checkStopRules(ltm_cat)
## Loading ltm Cat object data(ltm_cat) ## Store example answers setAnswers(ltm_cat) <- c(1,0,1,0,1,0,0,0,1,1, rep(NA, 30)) ## Stop administering items if standard error of ability ## estimate is low enough setSeThreshold(ltm_cat) <- .5 checkStopRules(ltm_cat) ## Now stop if standard error is low enough, but only if respondent has ## answered 11 questions setLengthOverride(ltm_cat) <- 11 checkStopRules(ltm_cat) ## When respondent has answered 11 questions and standard error ## of ability estimate is below .5, stop administering items setAnswers(ltm_cat) <- c(1,0,1,0,1,0,0,0,1,1,0, rep(NA, 29)) checkStopRules(ltm_cat)
Cat object containing item parameters for graded response model fit with responses to the 20-item Conscientiousness dimension of the 100-item IPIP representation of Costa and McCrae's Five Factor Model
data(consc_cat)
data(consc_cat)
An object of class Cat
of length 1.
Cat object containing item parameters for graded response model fit with 774,410 response profiles by myPersonality Project and 1500 response profiles collected by YouGov in June 2018. The sample from myPersonality Project was a convenience sample, and the respondents from YouGov were matched to a sampling frame on gender, age, race, and education.
See Cat-class
for details regarding the Cat object structure.
See grmCat
for details regarding the graded response model.
A normal prior was chosen with mean from the theta estimates from the YouGov sample (.455) and a standard deviation (1.5) wide enough to envelope the range of estimated theta values across both samples.
Note that due to how the item parameters were estimated, large, positive values indicate "more" of the latent trait.
Response options are 1=Very inaccurate; 2=Moderately inaccurate; 3=Neither inaccurate nor accurate; 4=Moderately accurate; 5=Very accurate.
The wording of the question items:
I...
q15
Am always prepared.
q85
Pay attention to details.
q75
Get chores done right away.
q95
Carry out my plans.
q55
Make plans and stick to them.
q5
Complete tasks successfully.
q25
Do things according to a plan.
q45
Am exacting in my work.
q65
Finish what I start.
q35
Follow through with my plans.
q28
Waste my time.
q88
Find it difficult to get down to work.
q98
Do just enough work to get by.
q78
Don't see things through.
q20
Shirk my duties.
q38
Mess things up.
q58
Leave things unfinished.
q48
Don't put my mind on the task at hand.
q68
Make a mess of things.
q8
Need a push to get started.
See https://dataverse.harvard.edu/dataverse/pdsl for the raw YouGov and/or Qualtrics data.
Costa, P. T., Jr., & McCrae, R. R. (1992). Revised NEO Personality Inventory (NEO PI-R) and NEO Five-Factor Inventory (NEO-FFI): Professional manual. Odessa, FL: Psychological Assessment Resources.
Stillwell, David, and Michal Kosinski. 2007. "myPersonality Project." https://sites.google.com/michalkosinski.com/mypersonality
Calculates either the first derivative of the log-likelihood or the first derivative
of the log-posterior evaluated at point .
d1LL(catObj, theta, use_prior)
d1LL(catObj, theta, use_prior)
catObj |
An object of class |
theta |
A numeric or an integer indicating the value for |
use_prior |
A logical indicating whether to calculate based on the log-likelihood or log-posterior |
When the usePrior
argument is FALSE
, the function d1LL
evaluates the first derivative of the log-likelihood at point .
When the usePrior
argument is TRUE
, the function d1LL
evaluates the first derivative of the log-posterior at point .
If the argument use_prior
is TRUE
, the function d1LL
must use the the normal prior distribution.
The function d1LL
returns a numeric of the derivative of the log-likelihood (or log-posterior) given a respondent's answer profile.
This function is to allow users to access the internal functions of the package. During item selection, all calculations are done in compiled C++
code.
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil
Baker, Frank B. and Seock-Ho Kim. 2004. Item Response Theory: Parameter Estimation Techniques. New York: Marcel Dekker.
Choi, Seung W. and Richard J. Swartz. 2009. “Comparison of CAT Item Selection Criteria for Polytomous Items." Applied Psychological Measurement 33(6):419-440.
Muraki, Eiji. 1992. “A generalized partial credit model: Application of an EM algorithm." ETS Research Report Series 1992(1):1-30.
van der Linden, Wim J. 1998. “Bayesian Item Selection Criteria for Adaptive Testing." Psychometrika 63(2):201-216.
## Loading ltm Cat object data(ltm_cat) ## Store example answers setAnswers(ltm_cat) <- c(1,0,1,0,1, rep(NA, 35)) ## d1LL for Cat object of the ltm model d1LL(ltm_cat, theta = 1, use_prior = FALSE)
## Loading ltm Cat object data(ltm_cat) ## Store example answers setAnswers(ltm_cat) <- c(1,0,1,0,1, rep(NA, 35)) ## d1LL for Cat object of the ltm model d1LL(ltm_cat, theta = 1, use_prior = FALSE)
Calculates either the second derivative of the log-likelihood or the second derivative
of the log-posterior evaluated at point .
d2LL(catObj, theta, use_prior)
d2LL(catObj, theta, use_prior)
catObj |
An object of class |
theta |
A numeric or an integer indicating the value for |
use_prior |
A logical indicating whether to calculate based on the log-likelihood or log-posterior |
When the usePrior
argument is FALSE
, the function d2LL
evaluates the second derivative of the log-likelihood at point .
When the usePrior
argument is TRUE
, the function d2LL
evaluates the second derivative of the log-posterior at point .
If the argument use_prior
is TRUE
, the function d2LL
must use the the normal prior distribution.
The function d2LL
returns a numeric of the second derivative of the log-likelihood (or log-posterior) given a respondent's answer profile.
This function is to allow users to access the internal functions of the package. During item selection, all calculations are done in compiled C++
code.
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil
Baker, Frank B. and Seock-Ho Kim. 2004. Item Response Theory: Parameter Estimation Techniques. New York: Marcel Dekker.
Choi, Seung W. and Richard J. Swartz. 2009. “Comparison of CAT Item Selection Criteria for Polytomous Items." Applied Psychological Measurement 33(6):419-440.
Muraki, Eiji. 1992. “A generalized partial credit model: Application of an EM algorithm." ETS Research Report Series 1992(1):1-30.
van der Linden, Wim J. 1998. “Bayesian Item Selection Criteria for Adaptive Testing." Psychometrika 63(2):201-216.
## Loading ltm Cat object data(ltm_cat) ## Store example answers setAnswers(ltm_cat) <- c(1,0,1,0,1, rep(NA, 35)) ## d2LL for Cat object of the ltm model d2LL(ltm_cat, theta = 1, use_prior = FALSE)
## Loading ltm Cat object data(ltm_cat) ## Store example answers setAnswers(ltm_cat) <- c(1,0,1,0,1, rep(NA, 35)) ## d2LL for Cat object of the ltm model d2LL(ltm_cat, theta = 1, use_prior = FALSE)
Cat object containing item parameters for graded response model fit with responses to the 40-item Empathy Quotient personality inventory
data(empathy_cat)
data(empathy_cat)
An object of class Cat
of length 1.
Cat object containing item parameters for graded response model fit with 13976 response profiles collected by myPersonality Project, 3050 response profiles collected by Qualtrics in June 2018, and 1500 response profiles collected by YouGov in June 2018. The sample from myPersonality Project was a convenience sample, and the respondents from YouGov were matched to a sampling frame on gender, age, race, and education.
See Cat-class
for details regarding the Cat object structure.
See grmCat
for details regarding the graded response model.
A normal prior was chosen with mean from the theta estimates from the YouGov sample (-0.363) and a standard deviation (1.5) wide enough to envelope the range of estimated theta values across both samples.
Note that due to how the item parameters were estimated, large, positive values indicate "more" of the latent trait.
Response options are 1=Strongly disagree; 2=Slightly disagree; 3=Slightly agree; 4=Strongly agree
The wording of the question items:
q1
I can easily tell if someone else wants to enter a conversation.
q4
I find it difficult to explain to others things that I understand easily, when they don't understand it first time.
q6
I really enjoy caring for other people.
q8
I find it hard to know what to do in a social situation.
q10
People often tell me that I went too far in driving my point home in a discussion.
q11
It doesn't bother me too much if I am late meeting a friend.
q12
Friendships and relationships are just too difficult, so I tend not to bother with them.
q14
I often find it difficult to judge if something is rude or polite.
q15
In a conversation, I tend to focus on my own thoughts rather than on what my listener might be thinking.
q18
When I was a child, I enjoyed cutting up worms to see what would happen.
q19
I can pick up quickly if someone says one thing but means another.
q21
It is hard for me to see why some things upset people so much.
q22
I find it easy to put myself in somebody else's shoes.
q25
I am good at predicting how someone will feel.
q26
I am quick to spot when someone in a group is feeling awkward or uncomfortable.
q27
If I say something that someone else is offended by, I think that that's their problem, not mine.
q28
If anyone asked me if I liked their haircut, I would reply truthfully, even if I didn't like it.
q29
I can't always see why someone should have felt offended by a remark.
q32
Seeing people cry doesn't really upset me.
q34
I am very blunt, which some people take to be rudeness, even though this is unintentional.
q35
I don't tend to find social situations confusing.
q36
Other people tell me I am good at understanding how they are feeling and what they are thinking.
q37
When I talk to people, I tend to talk about their experiences rather than my own.
q38
It upsets me to see an animal in pain.
q39
I am able to make decisions without being influenced by people's feelings.
q41
I can easily tell if someone else is interested or bored with what I am saying.
q42
I get upset if I see people suffering on news programs.
q43
Friends usually talk to me about their problems as they say that I am very understanding.
q44
I can sense if I am intruding, even if the other person doesn't tell me.
q46
People sometimes tell me that I have gone too far with teasing.
q48
Other people often say that I am insensitive, though I don't always see why.
q49
If I see a stranger in a group, I think that it is up to them to make an effort to join in.
q50
I usually stay emotionally detached when watching a film.
q52
I can tune into how someone else feels rapidly and intuitively.
q54
I can easily work out what another person might want to talk about.
q55
I can tell if someone is masking their true emotion.
q57
I don't consciously work out the rules of social situations.
q58
I am good at predicting what someone will do.
q59
I tend to get emotionally involved with a friend's problems.
q60
I can usually appreciate the other person's viewpoint, even if I don't agree with it.
See https://dataverse.harvard.edu/dataverse/pdsl for the raw YouGov and/or Qualtrics data.
Baron-Cohen, Simon, and Sally Wheelwright. "The empathy quotient: an investigation of adults with Asperger syndrome or high functioning autism, and normal sex differences." Journal of autism and developmental disorders 34, no. 2 (2004): 163-175.
Stillwell, David, and Michal Kosinski. 2007. "myPersonality Project." https://sites.google.com/michalkosinski.com/mypersonality
Estimates the standard error for a respondent's ability parameter estimate, .
estimateSE(catObj)
estimateSE(catObj)
catObj |
An object of class |
The function estimateSE
estimates the standard error of the ability estimate
given the estimation approach of the Cat
object, specified in estimation
slot of Cat
object.
The expected a posteriori approach is used when estimation
slot is "EAP"
. This method involves integration. See Note for more information.
The modal a posteriori approach is used when estimation
slot is "MAP"
. This method is only available using the normal prior distribution.
The maximum likelihood approach is used when estimation
slot is "MLE"
. When the likelihood
of the ability estimate is undefined,
the MAP or EAP method will be used, determined by what is specified in the estimationDefault
slot in Cat
object.
The weighted maximum likelihood approach is used when estimation
slot is "WLE"
.
Estimating requires root finding with the “Brent” method in the GNU Scientific
Library (GSL) with initial search interval of
[-5,5]
.
The function estimateSE
returns a numeric for the standard error for .
This function is to allow users to access the internal functions of the package. During item selection, all calculations are done in compiled C++
code.
This function uses adaptive quadrature methods from the GNU Scientific
Library (GSL) to approximate single-dimensional
integrals with high accuracy. The bounds of integration are determined by the
lowerBound
and upperBound
slots of the Cat
object.
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil
## Loading ltm Cat object data(ltm_cat) ## Store example answers setAnswers(ltm_cat) <- c(1,0,1,0,1, rep(NA, 35)) ## Set different estimation procedures and calculate ability estimate and its standard error setEstimation(ltm_cat) <- "EAP" estimateTheta(ltm_cat) estimateSE(ltm_cat) setEstimation(ltm_cat) <- "MAP" estimateTheta(ltm_cat) estimateSE(ltm_cat) setEstimation(ltm_cat) <- "MLE" estimateTheta(ltm_cat) estimateSE(ltm_cat) setEstimation(ltm_cat) <- "WLE" estimateTheta(ltm_cat) estimateSE(ltm_cat)
## Loading ltm Cat object data(ltm_cat) ## Store example answers setAnswers(ltm_cat) <- c(1,0,1,0,1, rep(NA, 35)) ## Set different estimation procedures and calculate ability estimate and its standard error setEstimation(ltm_cat) <- "EAP" estimateTheta(ltm_cat) estimateSE(ltm_cat) setEstimation(ltm_cat) <- "MAP" estimateTheta(ltm_cat) estimateSE(ltm_cat) setEstimation(ltm_cat) <- "MLE" estimateTheta(ltm_cat) estimateSE(ltm_cat) setEstimation(ltm_cat) <- "WLE" estimateTheta(ltm_cat) estimateSE(ltm_cat)
Estimates the expected value of the ability parameter , conditioned on the observed answers, prior, and the item parameters.
estimateTheta(catObj)
estimateTheta(catObj)
catObj |
An object of class |
Estimation approach is specified in estimation
slot of Cat
object.
The expected a posteriori approach is used when estimation
slot is "EAP"
. This method involves integration. See Note for more information.
The modal a posteriori approach is used when estimation
slot is "MAP"
. This method is only available using the normal prior distribution.
The maximum likelihood approach is used when estimation
slot is "MLE"
. When the likelihood is undefined,
the MAP or EAP method will be used, determined by what is specified in the estimationDefault
slot in Cat
object.
The weighted maximum likelihood approach is used when estimation
slot is "WLE"
.
Estimating requires root finding with the “Brent” method in the GNU Scientific
Library (GSL) with initial search interval of
[-5,5]
.
The function estimateTheta
returns a numeric consisting of the expected value of the respondent's ability parameter.
This function is to allow users to access the internal functions of the package. During item selection, all calculations are done in compiled C++
code.
This function uses adaptive quadrature methods from the GNU Scientific
Library (GSL) to approximate single-dimensional
integrals with high accuracy. The bounds of integration are determined by the
lowerBound
and upperBound
slots of the Cat
object.
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil
van der Linden, Wim J. 1998. "Bayesian Item Selection Criteria for Adaptive Testing." Psychometrika 63(2):201-216.
Van der Linden, Wim J., and Peter J. Pashley. 2009. "Item Selection and Ability Estimation in Adaptive Testing." Elements of Adaptive Testing. Springer New York, 3-30.
## Loading ltm Cat object data(ltm_cat) ## Store example answers setAnswers(ltm_cat) <- c(1,0,1,0,1, rep(NA, 35)) ## Set different estimation procedures and estimate ability parameter setEstimation(ltm_cat) <- "EAP" estimateTheta(ltm_cat) setEstimation(ltm_cat) <- "MAP" estimateTheta(ltm_cat) setEstimation(ltm_cat) <- "MLE" estimateTheta(ltm_cat) setEstimation(ltm_cat) <- "WLE" estimateTheta(ltm_cat)
## Loading ltm Cat object data(ltm_cat) ## Store example answers setAnswers(ltm_cat) <- c(1,0,1,0,1, rep(NA, 35)) ## Set different estimation procedures and estimate ability parameter setEstimation(ltm_cat) <- "EAP" estimateTheta(ltm_cat) setEstimation(ltm_cat) <- "MAP" estimateTheta(ltm_cat) setEstimation(ltm_cat) <- "MLE" estimateTheta(ltm_cat) setEstimation(ltm_cat) <- "WLE" estimateTheta(ltm_cat)
Estimates the expected value of the ability parameter , conditioned on the observed answers, prior, and the item parameters
for complete response profiles for a dataset of respondents.
## S4 method for signature 'Cat' estimateThetas(catObj, responses)
## S4 method for signature 'Cat' estimateThetas(catObj, responses)
catObj |
An object of class |
responses |
A dataframe of complete response profiles |
Estimation approach is specified in estimation
slot of Cat
object.
The expected a posteriori approach is used when estimation
slot is "EAP"
. This method involves integration. See Note for more information.
The modal a posteriori approach is used when estimation
slot is "MAP"
. This method is only available using the normal prior distribution.
The maximum likelihood approach is used when estimation
slot is "MLE"
. When the likelihood is undefined,
the MAP or EAP method will be used, determined by what is specified in the estimationDefault
slot in Cat
object.
The weighted maximum likelihood approach is used when estimation
slot is "WLE"
.
Estimating requires root finding with the “Brent” method in the GNU Scientific
Library (GSL) with initial search interval of
[-5,5]
.
The function estimateThetas
returns a vector containing respondents' estimated ability parameters.
This function is to allow users to access the internal functions of the package. During item selection, all calculations are done in compiled C++
code.
This function uses adaptive quadrature methods from the GNU Scientific
Library (GSL) to approximate single-dimensional
integrals with high accuracy. The bounds of integration are determined by the
lowerBound
and upperBound
slots of the Cat
object.
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil
## Loading ltm Cat object data(ltm_cat) ## Set different estimation procedures and estimate ability parameter data(npi) setEstimation(ltm_cat) <- "EAP" estimateThetas(ltm_cat, responses = npi[1:25, ])
## Loading ltm Cat object data(ltm_cat) ## Set different estimation procedures and estimate ability parameter data(npi) setEstimation(ltm_cat) <- "EAP" estimateThetas(ltm_cat, responses = npi[1:25, ])
Example data when including an adaptive inventory on a Qualtrics survey
data(ex_qualtrics_results)
data(ex_qualtrics_results)
An object of class data.frame
with 6 rows and 9 columns.
This data set includes four example responses to a length four adaptive inventory for the agreeableness battery.
See agree_cat
for details regarding the Cat object structure and battery items.
See readQualtrics
for how to clean adaptive inventory response profiles.
Example data when including multiple adaptive inventory on a Qualtrics survey
data(ex_qualtrics_results_multiple)
data(ex_qualtrics_results_multiple)
An object of class data.frame
with 6 rows and 17 columns.
This data set includes four example responses to length four adaptive inventories for both the agreeableness and neuroticism batteries.
See agree_cat
and neuro_cat
for details regarding the Cat object structure and battery items.
See readQualtrics
for how to clean adaptive inventory response profiles.
agree_cat
, neuro_cat
,readQualtrics
Calculates the expected Kullback-Leibler information for an individual question item.
expectedKL(catObj, item)
expectedKL(catObj, item)
catObj |
An object of class |
item |
An integer indicating the index of the question item |
The function expectedKL
calculates the expected value of the Kullback-Leibler information
for a specified item where the bounds of integration are ,
where
is qnorm(
) times the square root of the Fisher test information and
is specified in the
z
slot of the Cat
object. See Note for more information on integration.
The function expectedKL
returns a numeric indicating the
expected Kullback-Leibler information
for the specified item, given the current answer profile and ability parameter estimate.
This function is to allow users to access the internal functions of the package. During item selection, all calculations are done in compiled C++
code.
This function uses adaptive quadrature methods from the GNU Scientific Library (GSL) to approximate single-dimensional integrals with high accuracy.
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil
likelihoodKL
, posteriorKL
, selectItem
## Loading ltm Cat object data(ltm_cat) ## Store example answers setAnswers(ltm_cat) <- c(1,0,1,0,1, rep(NA, 35)) ## Estimate KL for different unasked items expectedKL(ltm_cat, item = 10) expectedKL(ltm_cat, item = 20) expectedKL(ltm_cat, item = 30)
## Loading ltm Cat object data(ltm_cat) ## Store example answers setAnswers(ltm_cat) <- c(1,0,1,0,1, rep(NA, 35)) ## Estimate KL for different unasked items expectedKL(ltm_cat, item = 10) expectedKL(ltm_cat, item = 20) expectedKL(ltm_cat, item = 30)
Calculates the expected information, which is the observed information attained from a specific response set times the probability of that profile occurring.
expectedObsInf(catObj, item)
expectedObsInf(catObj, item)
catObj |
An object of class |
item |
An integer indicating the index of the question item |
The function expectedObsInf
returns a numeric value of the expected information. **Not implemented
for three parameter model for binary data.**
This function is to allow users to access the internal functions of the package. During item selection, all calculations are done in compiled C++
code.
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil
estimateSE
,obsInf
, probability
, selectItem
## Loading ltm Cat object data(ltm_cat) ## Store example answers setAnswers(ltm_cat) <- c(1,0,1,0,1, rep(NA, 35)) ## Expected observed information for different items expectedObsInf(ltm_cat, item = 10) expectedObsInf(ltm_cat, item = 20)
## Loading ltm Cat object data(ltm_cat) ## Store example answers setAnswers(ltm_cat) <- c(1,0,1,0,1, rep(NA, 35)) ## Expected observed information for different items expectedObsInf(ltm_cat, item = 10) expectedObsInf(ltm_cat, item = 20)
Estimates the expected posterior variance for a respondent's estimated ability parameter for an item yet to be answered based on a respondent's ability parameter estimate from the already-answered items.
expectedPV(catObj, item)
expectedPV(catObj, item)
catObj |
An object of class |
item |
An integer indicating the index of the question item |
The function expectedPV
returns a numeric value indicating a respondent's expected posterior variance for an unasked item.
This function is to allow users to access the internal functions of the package. During item selection, all calculations are done in compiled C++
code.
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil
estimateSE
, probability
, selectItem
## Loading ltm Cat object data(ltm_cat) ## Store example answers setAnswers(ltm_cat) <- c(1,0,1,0,1, rep(NA, 35)) ## Estimate EPV for different unasked items expectedPV(ltm_cat, item = 10) expectedPV(ltm_cat, item = 20) expectedPV(ltm_cat, item = 30)
## Loading ltm Cat object data(ltm_cat) ## Store example answers setAnswers(ltm_cat) <- c(1,0,1,0,1, rep(NA, 35)) ## Estimate EPV for different unasked items expectedPV(ltm_cat, item = 10) expectedPV(ltm_cat, item = 20) expectedPV(ltm_cat, item = 30)
Cat object containing item parameters for graded response model fit with responses to the 20-item Extraversion dimension of the 100-item IPIP representation of Costa and McCrae's Five Factor Model
data(extra_cat)
data(extra_cat)
An object of class Cat
of length 1.
Cat object containing item parameters for graded response model fit with 774,410 response profiles by myPersonality Project and 1500 response profiles collected by YouGov in June 2018. The sample from myPersonality Project was a convenience sample, and the respondents from YouGov were matched to a sampling frame on gender, age, race, and education.
See Cat-class
for details regarding the Cat object structure.
See grmCat
for details regarding the graded response model.
A normal prior was chosen with mean from the theta estimates from the YouGov sample (-.367) and a standard deviation (1.3) wide enough to envelope the range of estimated theta values across both samples.
Note that due to how the item parameters were estimated, large, positive values indicate "more" of the latent trait.
Response options are 1=Very inaccurate; 2=Moderately inaccurate; 3=Neither inaccurate nor accurate; 4=Moderately accurate; 5=Very accurate.
The wording of the question items:
I...
q83
Feel comfortable around people.
q10
Make friends easily.
q73
Am skilled in handling social situations.
q63
Am the life of the party.
q53
Know how to captivate people.
q93
Start conversations.
q33
Warm up quickly to others.
q43
Talk to a lot of different people at parties.
q3
Don't mind being the center of attention.
q23
Cheer people up.
q39
Have little to say.
q14
Keep in the background.
q89
Would describe my experiences as somewhat dull.
q59
Don't like to draw attention to myself.
q29
Don't talk a lot.
q18
Avoid contacts with others.
q99
Am hard to get to know.
q79
Retreat from others.
q69
Find it difficult to approach others.
q49
Keep others at a distance.
See https://dataverse.harvard.edu/dataverse/pdsl for the raw YouGov and/or Qualtrics data.
Costa, P. T., Jr., & McCrae, R. R. (1992). Revised NEO Personality Inventory (NEO PI-R) and NEO Five-Factor Inventory (NEO-FFI): Professional manual. Odessa, FL: Psychological Assessment Resources.
Stillwell, David, and Michal Kosinski. 2007. "myPersonality Project." https://sites.google.com/michalkosinski.com/mypersonality
Calculates the expected value of the observed information of the likelihood evaluated at the input value .
fisherInf(catObj, theta, item)
fisherInf(catObj, theta, item)
catObj |
An object of class |
theta |
A numeric or an integer indicating the potential value for |
item |
An integer indicating the index of the question item |
For the dichotomous case, this Fisher's information is equivalent to the observed information.
The function fisherInf
returns a numeric of the expected value of the observed information of the likelihood evaluated at the input value .
This function is to allow users to access the internal functions of the package. During item selection, all calculations are done in compiled C++
code.
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil
fisherTestInfo
, obsInf
, selectItem
## Loading ltm Cat object data(ltm_cat) ## Store example answers setAnswers(ltm_cat) <- c(1,0,1,0,1, rep(NA, 35)) ## Fisher's information for different items, at ability parameter of 1 fisherInf(ltm_cat, theta = 1, item = 10) fisherInf(ltm_cat, theta = 1, item = 20)
## Loading ltm Cat object data(ltm_cat) ## Store example answers setAnswers(ltm_cat) <- c(1,0,1,0,1, rep(NA, 35)) ## Fisher's information for different items, at ability parameter of 1 fisherInf(ltm_cat, theta = 1, item = 10) fisherInf(ltm_cat, theta = 1, item = 20)
Calculates the total information gained for a respondent for all answered items, conditioned on .
fisherTestInfo(catObj, theta)
fisherTestInfo(catObj, theta)
catObj |
An object of class |
theta |
A numeric indicating the position on the latent trait. |
The function fisherTestInfo
returns a numeric indicating the total information gained for a respondent,
given a specific answer set and the current estimate of .
This function is to allow users to access the internal functions of the package. During item selection, all calculations are done in compiled C++
code.
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil
## Loading ltm Cat object data(ltm_cat) ## Store example answers setAnswers(ltm_cat) <- c(1,0,1,0,1, rep(NA, 35)) ## Fisher's test information for answer profile fisherTestInfo(ltm_cat, theta = 2)
## Loading ltm Cat object data(ltm_cat) ## Store example answers setAnswers(ltm_cat) <- c(1,0,1,0,1, rep(NA, 35)) ## Fisher's test information for answer profile fisherTestInfo(ltm_cat, theta = 2)
This function object of class Cat
.
## S4 method for signature 'json' fromJSONCat(jsonObj) ## S4 method for signature 'character' fromJSONCat(jsonObj)
## S4 method for signature 'json' fromJSONCat(jsonObj) ## S4 method for signature 'character' fromJSONCat(jsonObj)
jsonObj |
A |
The jsonObj
argument of the function fromJSONCat
is an object of class json
from the rjson
package. This function simply populates a Cat
object with the information provided in the jsonObj
, thus element and slot names must match.
The function fromJSONCat
returns an object of class Cat
with slots populated with the corresponding information stored in the jsonObj
.
See Cat-class
for required Cat
object slots.
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil
Cat
Object SlotsGetter methods to access slots of a Cat
object.
## S4 method for signature 'Cat' getModel(catObj) ## S4 method for signature 'Cat' getGuessing(catObj) ## S4 method for signature 'Cat' getDiscrimination(catObj) ## S4 method for signature 'Cat' getDifficulty(catObj) ## S4 method for signature 'Cat' getAnswers(catObj) ## S4 method for signature 'Cat' getIds(catObj) ## S4 method for signature 'Cat' getPriorName(catObj) ## S4 method for signature 'Cat' getPriorParams(catObj) ## S4 method for signature 'Cat' getLowerBound(catObj) ## S4 method for signature 'Cat' getUpperBound(catObj) ## S4 method for signature 'Cat' getEstimation(catObj) ## S4 method for signature 'Cat' getEstimationDefault(catObj) ## S4 method for signature 'Cat' getSelection(catObj) ## S4 method for signature 'Cat' getZ(catObj) ## S4 method for signature 'Cat' getLengthThreshold(catObj) ## S4 method for signature 'Cat' getSeThreshold(catObj) ## S4 method for signature 'Cat' getInfoThreshold(catObj) ## S4 method for signature 'Cat' getGainThreshold(catObj) ## S4 method for signature 'Cat' getLengthOverride(catObj) ## S4 method for signature 'Cat' getGainOverride(catObj)
## S4 method for signature 'Cat' getModel(catObj) ## S4 method for signature 'Cat' getGuessing(catObj) ## S4 method for signature 'Cat' getDiscrimination(catObj) ## S4 method for signature 'Cat' getDifficulty(catObj) ## S4 method for signature 'Cat' getAnswers(catObj) ## S4 method for signature 'Cat' getIds(catObj) ## S4 method for signature 'Cat' getPriorName(catObj) ## S4 method for signature 'Cat' getPriorParams(catObj) ## S4 method for signature 'Cat' getLowerBound(catObj) ## S4 method for signature 'Cat' getUpperBound(catObj) ## S4 method for signature 'Cat' getEstimation(catObj) ## S4 method for signature 'Cat' getEstimationDefault(catObj) ## S4 method for signature 'Cat' getSelection(catObj) ## S4 method for signature 'Cat' getZ(catObj) ## S4 method for signature 'Cat' getLengthThreshold(catObj) ## S4 method for signature 'Cat' getSeThreshold(catObj) ## S4 method for signature 'Cat' getInfoThreshold(catObj) ## S4 method for signature 'Cat' getGainThreshold(catObj) ## S4 method for signature 'Cat' getLengthOverride(catObj) ## S4 method for signature 'Cat' getGainOverride(catObj)
catObj |
An object of class |
These functions return the respective slot from Cat object.
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil
Montgomery, Jacob M., and Erin L. Rossiter. "So many questions, so little time: Integrating adaptive inventories into public opinion research." Journal of Survey Statistics and Methodology (2019).
## Loading ltm Cat object data(ltm_cat) ## Getting estimation slot before and after change getEstimation(ltm_cat) setEstimation(ltm_cat) <- "MAP" getEstimation(ltm_cat) ## Getting discrimination slot before and after change getDiscrimination(ltm_cat) setDiscrimination(ltm_cat) <- rep(1, 40) getDiscrimination(ltm_cat)
## Loading ltm Cat object data(ltm_cat) ## Getting estimation slot before and after change getEstimation(ltm_cat) setEstimation(ltm_cat) <- "MAP" getEstimation(ltm_cat) ## Getting discrimination slot before and after change getDiscrimination(ltm_cat) setDiscrimination(ltm_cat) <- rep(1, 40) getDiscrimination(ltm_cat)
An object of class Cat
created using the gpcmCat
function with the polknowTAPS
dataset.
To have a better fitting model, we first fit an object of class gpcm
from the ltm
package which
provides for additional control values to be used in fitting. See gpcmCat
.
data(gpcm_cat)
data(gpcm_cat)
An object of class Cat
. See Cat-class
for more details.
Cat-class
, gpcmCat
, polknowTAPS
## Not run: ## How this Cat object was created data(polknowTAPS) gpcm_fit <- gpcm(polknowTAPS, constraint = "gpcm", control = list(iter.qN = 200, GHk = 100)) gpcm_cat <- gpcmCat(gpcm_fit) ## End(Not run) ## How to load this Cat object for usage data(gpcm_cat)
## Not run: ## How this Cat object was created data(polknowTAPS) gpcm_fit <- gpcm(polknowTAPS, constraint = "gpcm", control = list(iter.qN = 200, GHk = 100)) gpcm_cat <- gpcmCat(gpcm_fit) ## End(Not run) ## How to load this Cat object for usage data(gpcm_cat)
This function fits the generalized partial credit model for ordinal polytomous data and populates the fitted values for discrimination and difficulty parameters to an object of class Cat
.
## S4 method for signature 'data.frame' gpcmCat(data, quadraturePoints = 21, ...) ## S4 method for signature 'gpcm' gpcmCat(data, quadraturePoints = NULL, ...)
## S4 method for signature 'data.frame' gpcmCat(data, quadraturePoints = 21, ...) ## S4 method for signature 'gpcm' gpcmCat(data, quadraturePoints = NULL, ...)
data |
A data frame of manifest variables or an object of class |
quadraturePoints |
A numeric to be passed into the |
... |
arguments to be passed to methods. For more details about the arguments, see |
The data
argument of the function gpcmCat
is either a data frame or an object of class gpcm
from the ltm
package. If it is a data frame each row represents a respondent and each column represents a question item. If it is an object of the class gpcm
, it is output from the gpcm
function in the ltm
package.
The quadraturePoints
argument of the function gpcmCat
is used only when the data
argument is a data frame. quadraturePoints
is then passed to the gpcm
function from the ltm
package when fitting the generalized partial credit model to the data and is used when approximating the value of integrals.
The function gpcmCat
returns an object of class Cat
with changes to the following slots:
difficulty
A list of difficulty parameters, where each element in the list corresponds to the difficulty parameters for an item.
discrimination
A vector consisting of of discrimination parameters for each item.
model
The string "gpcm"
, indicating this Cat
object corresponds to a generalized partial credit model.
See Cat-class
for default values of Cat
object slots. See Examples and setters
for example code to change slot values.
This Cat object should be used for testing package functionality only.
In case the Hessian matrix at convergence is not positive definite try to use start.val = "random"
.
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil
Baker, Frank B. and Seock-Ho Kim. 2004. Item Response Theory: Parameter Estimation Techniques. New York: Marcel Dekker.
Muraki, Eiji. 1992. “A generalized partial credit model: Application of an EM algorithm." ETS Research Report Series 1992(1):1-30.
Rizopoulos, Dimitris. 2006. “ltm: An R Package for Latent Variable Modeling and Item Response Theory Analyses." Journal of Statistical Software 17(5):1-25.
Cat-class
, grmCat
, polknowTAPS
, probability
## Not run: ## Creating Cat object with fitted object of class gpcm data(polknowTAPS) gpcm_fit <- gpcm(polknowTAPS, constraint = "gpcm", control = list(iter.qN = 200, GHk = 100)) class(gpcm_fit) gpcm_cat <- gpcmCat(gpcm_fit) ## End(Not run) ## Creating Cat objects from large datasets is computationally expensive ## Load the Cat object created from the above code data(gpcm_cat) ## Slots that have changed from default values getModel(gpcm_cat) getDifficulty(gpcm_cat) getDiscrimination(gpcm_cat) ## Changing slots from default values setEstimation(gpcm_cat) <- "MLE" setSelection(gpcm_cat) <- "MFI"
## Not run: ## Creating Cat object with fitted object of class gpcm data(polknowTAPS) gpcm_fit <- gpcm(polknowTAPS, constraint = "gpcm", control = list(iter.qN = 200, GHk = 100)) class(gpcm_fit) gpcm_cat <- gpcmCat(gpcm_fit) ## End(Not run) ## Creating Cat objects from large datasets is computationally expensive ## Load the Cat object created from the above code data(gpcm_cat) ## Slots that have changed from default values getModel(gpcm_cat) getDifficulty(gpcm_cat) getDiscrimination(gpcm_cat) ## Changing slots from default values setEstimation(gpcm_cat) <- "MLE" setSelection(gpcm_cat) <- "MFI"
An object of class Cat
created using the grmCat
function with the nfc
dataset.
data(grm_cat)
data(grm_cat)
An object of class Cat
. See Cat-class
for more details.
## Not run: ## How this Cat object was created data(nfc) grm_cat <- grmCat(nfc, quadraturePoints = 100) ## End(Not run) ## How to load this Cat object for usage data(grm_cat)
## Not run: ## How this Cat object was created data(nfc) grm_cat <- grmCat(nfc, quadraturePoints = 100) ## End(Not run) ## How to load this Cat object for usage data(grm_cat)
This function fits the graded response model for ordinal polytomous data and populates the fitted values for discrimination and difficulty parameters to an object of class Cat
.
## S4 method for signature 'data.frame' grmCat(data, quadraturePoints = 21, ...) ## S4 method for signature 'grm' grmCat(data, quadraturePoints = NULL, ...)
## S4 method for signature 'data.frame' grmCat(data, quadraturePoints = 21, ...) ## S4 method for signature 'grm' grmCat(data, quadraturePoints = NULL, ...)
data |
A data frame of manifest variables or an object of class |
quadraturePoints |
A numeric to be passed into the |
... |
arguments to be passed to methods. For more details about the arguments, see |
The data
argument of the function grmCat
is either a data frame or an object of class grm
from the ltm
package. If it is a data frame each row represents a respondent and each column represents a question item. If it is an object of the class grm
, it is output from the grm
function in the ltm
package.
The quadraturePoints
argument of the function grmCat
is used only when the data
argument is a data frame. quadraturePoints
is then passed to the grm
function from the ltm
package when fitting the graded response model to the data and is used when approximating the value of integrals.
The function grmCat
returns an object of class Cat
with changes to the following slots:
difficulty
A list of difficulty parameters, where each element in the list corresponds to the difficulty parameters for an item.
discrimination
A vector consisting of discrimination parameters for each item.
model
The string "grm"
, indicating this Cat
object corresponds to a graded response model.
See Cat-class
for default values of Cat
object slots. See Examples and setters
for example code to change slot values.
In case the Hessian matrix at convergence is not positive definite try to use start.val = "random"
.
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil
Baker, Frank B. and Seock-Ho Kim. 2004. Item Response Theory: Parameter Estimation Techniques. New York: Marcel Dekker.
Samejima, Fumiko. 1969. “Estimation of Latent Ability Using a Response Pattern of Graded Scores." Psychometrika monograph supplement 34(4):100-114.
Rizopoulos, Dimitris. 2006. “ltm: An R Package for Latent Variable Modeling and Item Response Theory Analyses.“ Journal of Statistical Software 17(5):1-25.
Cat-class
, gpcmCat
, nfc
, probability
## Not run: ## Creating Cat object with raw data data(nfc) grm_cat1 <- grmCat(nfc, quadraturePoints = 100) ## Creating Cat object with fitted object of class grm grm_fit <- grm(nfc, control = list(GHk = 100)) ## from ltm package class(grm_fit) grm_cat2 <- grmCat(grm_fit) ## Note the two Cat objects are identical identical(grm_cat1, grm_cat2) ## End(Not run) ## Creating Cat objects from large datasets is computationally expensive ## Load the Cat object created from the above code data(grm_cat) ## Slots that have changed from default values getModel(grm_cat) getDifficulty(grm_cat) getDiscrimination(grm_cat) ## Changing slots from default values setEstimation(grm_cat) <- "MLE" setSelection(grm_cat) <- "MFI"
## Not run: ## Creating Cat object with raw data data(nfc) grm_cat1 <- grmCat(nfc, quadraturePoints = 100) ## Creating Cat object with fitted object of class grm grm_fit <- grm(nfc, control = list(GHk = 100)) ## from ltm package class(grm_fit) grm_cat2 <- grmCat(grm_fit) ## Note the two Cat objects are identical identical(grm_cat1, grm_cat2) ## End(Not run) ## Creating Cat objects from large datasets is computationally expensive ## Load the Cat object created from the above code data(grm_cat) ## Slots that have changed from default values getModel(grm_cat) getDifficulty(grm_cat) getDiscrimination(grm_cat) ## Changing slots from default values setEstimation(grm_cat) <- "MLE" setSelection(grm_cat) <- "MFI"
Calculates the likelihood of a respondent, with ability parameter , having offered the specific set of responses stored in the
Cat
objects answers
slot. All calculations are conditional on the item-level parameters stored in the Cat
object.
likelihood(catObj, theta)
likelihood(catObj, theta)
catObj |
An object of class |
theta |
A numeric or an integer indicating the value for |
The function likelihood
returns a numeric value of the likelihood of the respondent having offered the provided response profile.
Note that when no questions have been answered, likelihood evaluates to 1.
This function is to allow users to access the internal functions of the package. During item selection, all calculations are done in compiled C++
code.
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil
Baker, Frank B. and Seock-Ho Kim. 2004. Item Response Theory: Parameter Estimation Techniques. New York: Marcel Dekker.
Choi, Seung W. and Richard J. Swartz. 2009. “Comparison of CAT Item Selection Criteria for Polytomous Items." Applied Psychological Measurement 33(6):419-440.
Muraki, Eiji. 1992. “A generalized partial credit model: Application of an EM algorithm." ETS Research Report Series 1992(1):1-30.
van der Linden, Wim J. 1998. “Bayesian Item Selection Criteria for Adaptive Testing." Psychometrika 63(2):201-216.
## Loading ltm Cat object ## Likelihood for Cat object of the ltm model data(ltm_cat) setAnswers(ltm_cat) <- c(1,0,1,0,1, rep(NA, 35)) likelihood(ltm_cat, theta = 1) ## Loading grm Cat object ## Likelihood for Cat object of the grm model data(grm_cat) setAnswers(grm_cat) <- c(1,1,5,2,5, rep(NA, 13)) likelihood(grm_cat, theta = 1)
## Loading ltm Cat object ## Likelihood for Cat object of the ltm model data(ltm_cat) setAnswers(ltm_cat) <- c(1,0,1,0,1, rep(NA, 35)) likelihood(ltm_cat, theta = 1) ## Loading grm Cat object ## Likelihood for Cat object of the grm model data(grm_cat) setAnswers(grm_cat) <- c(1,1,5,2,5, rep(NA, 13)) likelihood(grm_cat, theta = 1)
Calculates the expected Kullback-Leibler information, weighted by likelihood, for a specified item.
likelihoodKL(catObj, item)
likelihoodKL(catObj, item)
catObj |
An object of class |
item |
An integer indicating the index of the question item |
The function likelihoodKL
calculates the expected Kullback-Leibler information
for question item
, where the proposed values of the true ability parameter are weighted by
the current likelihood.
This function involves integration. See Note for more information.
The function likelihoodKL
returns a numeric indicating the
expected Kullback-Leibler information weighted by the likelihood
for the specified item, given the current answer profile and ability parameter estimate.
This function is to allow users to access the internal functions of the package. During item selection, all calculations are done in compiled C++
code.
This function uses adaptive quadrature methods from the GNU Scientific
Library (GSL) to approximate single-dimensional
integrals with high accuracy. The bounds of integration are determined by the
lowerBound
and upperBound
slots of the Cat
object.
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil
expectedKL
, posteriorKL
, selectItem
## Loading ltm Cat object data(ltm_cat) ## Store example answers setAnswers(ltm_cat) <- c(1,0,1,0,1, rep(NA, 35)) ## Estimate EPV for different unasked items likelihoodKL(ltm_cat, item = 10) likelihoodKL(ltm_cat, item = 20) likelihoodKL(ltm_cat, item = 30)
## Loading ltm Cat object data(ltm_cat) ## Store example answers setAnswers(ltm_cat) <- c(1,0,1,0,1, rep(NA, 35)) ## Estimate EPV for different unasked items likelihoodKL(ltm_cat, item = 10) likelihoodKL(ltm_cat, item = 20) likelihoodKL(ltm_cat, item = 30)
Selects the next item that would be asked for all possible response options to the question the respondent is currently answering.
lookAhead(catObj, item)
lookAhead(catObj, item)
catObj |
An object of class |
item |
A numeric indicating the question item the respondent is currently answering. |
A function lookAhead
returns a data.frame.
The the first column of the data frame is the possible response option to the question the respondent
is currently answering and the second column is the next item that should be asked given each response.
This function is to allow users to access the internal functions of the package. During item selection, all calculations are done in compiled C++
code.
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil
## Loading ltm Cat object data(ltm_cat) ## Store example answers setAnswers(ltm_cat) <- c(1,0,1,0,1, rep(NA, 35)) ## What should be asked next if respondent is currently answering item 6 lookAhead(ltm_cat, 6) ## Loading grm Cat object data(grm_cat) ## Store example answers setAnswers(grm_cat) <- c(4,3,5,1,1, rep(NA, 13)) ## What should be asked next if respondent is currently answering item 6 lookAhead(grm_cat, 6)
## Loading ltm Cat object data(ltm_cat) ## Store example answers setAnswers(ltm_cat) <- c(1,0,1,0,1, rep(NA, 35)) ## What should be asked next if respondent is currently answering item 6 lookAhead(ltm_cat, 6) ## Loading grm Cat object data(grm_cat) ## Store example answers setAnswers(grm_cat) <- c(4,3,5,1,1, rep(NA, 13)) ## What should be asked next if respondent is currently answering item 6 lookAhead(grm_cat, 6)
An object of class Cat
created using the ltmCat
function with the npi
dataset.
data(ltm_cat)
data(ltm_cat)
An object of class Cat
. See Cat-class
for more details.
## Not run: ## How this Cat object was created data(npi) ltm_cat <- ltmCat(npi, quadraturePoints = 100) ## End(Not run) ## How to load this Cat object for usage data(ltm_cat)
## Not run: ## How this Cat object was created data(npi) ltm_cat <- ltmCat(npi, quadraturePoints = 100) ## End(Not run) ## How to load this Cat object for usage data(ltm_cat)
This function fits the latent trait model for binary data and populates the fitted values for discrimination and difficulty parameters to an object of class Cat
.
## S4 method for signature 'data.frame' ltmCat(data, quadraturePoints = 21, ...) ## S4 method for signature 'ltm' ltmCat(data, quadraturePoints = NULL, ...)
## S4 method for signature 'data.frame' ltmCat(data, quadraturePoints = 21, ...) ## S4 method for signature 'ltm' ltmCat(data, quadraturePoints = NULL, ...)
data |
A data frame of manifest variables or an object of class |
quadraturePoints |
A numeric to be passed into the |
... |
arguments to be passed to methods. For more details about the arguments, see |
The data
argument of the function ltmCat
is either a data frame or an object of class ltm
from the ltm
package. If it is a data frame each row represents a respondent and each column represents a question item. If it is an object of the class ltm
, it is output from the ltm
function in the ltm
package.
The quadraturePoints
argument of the function ltmCat
is used only when the data
argument is a data frame. quadraturePoints
is then passed to the ltm
function from the ltm
package when fitting the latent trait model to the data and is used when approximating the value of integrals.
The function ltmCat
returns an object of class Cat
with changes to the following slots:
difficulty
A vector consisting of difficulty parameters for each item.
discrimination
A vector consisting of discrimination parameters for each item.
model
The string "ltm"
, indicating this Cat
object corresponds to a latent trait model.
See Cat-class
for default values of Cat
object slots. See Examples and setters
for example code to change slot values.
In case the Hessian matrix at convergence is not positive definite try to use start.val = "random"
.
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil
Baker, Frank B. and Seock-Ho Kim. 2004. Item Response Theory: Parameter Estimation Techniques. New York: Marcel Dekker.
Rizopoulos, Dimitris. 2006. “ltm: An R Package for Latent Variable Modeling and Item Response Theory Analyses." Journal of Statistical Software 17(5):1-25.
Cat-class
, npi
, probability
, tpmCat
## Not run: ## Creating Cat object with raw data data(npi) ltm_cat1 <- ltmCat(npi, quadraturePoints = 100) ## Creating Cat object with fitted object of class ltm ltm_fit <- ltm(npi ~ z1, control = list(GHk = 100)) ## from ltm package class(ltm_fit) ltm_cat2 <- ltmCat(ltm_fit) ## Note the two Cat objects are identical identical(ltm_cat1, ltm_cat2) ## End(Not run) ## Creating Cat objects from large datasets is computationally expensive ## Load the Cat object created from the above code data(ltm_cat) ## Slots that have changed from default values getModel(ltm_cat) getDifficulty(ltm_cat) getDiscrimination(ltm_cat) ## Changing slots from default values setEstimation(ltm_cat) <- "MLE" setSelection(ltm_cat) <- "MFI"
## Not run: ## Creating Cat object with raw data data(npi) ltm_cat1 <- ltmCat(npi, quadraturePoints = 100) ## Creating Cat object with fitted object of class ltm ltm_fit <- ltm(npi ~ z1, control = list(GHk = 100)) ## from ltm package class(ltm_fit) ltm_cat2 <- ltmCat(ltm_fit) ## Note the two Cat objects are identical identical(ltm_cat1, ltm_cat2) ## End(Not run) ## Creating Cat objects from large datasets is computationally expensive ## Load the Cat object created from the above code data(ltm_cat) ## Slots that have changed from default values getModel(ltm_cat) getDifficulty(ltm_cat) getDiscrimination(ltm_cat) ## Changing slots from default values setEstimation(ltm_cat) <- "MLE" setSelection(ltm_cat) <- "MFI"
Cat object containing item parameters for graded response model fit with responses to the 20 item machiavellianism inventory
data(mach_cat)
data(mach_cat)
An object of class Cat
of length 1.
Cat object containing item parameters for graded response model fit with 3020 response profiles collected by Qualtrics in June 2018 and 12299 response profiles collected by the Open Source Psychometrics Project in 2012.
See Cat-class
for details regarding the Cat object structure.
See grmCat
for details regarding the graded response model.
A normal prior was chosen with mean from the theta estimates from the Qualtrics sample (-0.713) and a standard deviation (1) wide enough to envelope the range of estimated theta values across both samples.
Note that due to how the item parameters were estimated, large, positive values indicate "more" of the latent trait.
Response options are: 5 = Strongly agree, 4 = Somewhat agree, 3 = Neither agree nor disagree, 2 = Somewhat disagree, 1 = Strongly disagree
The wording of the item responses is:
Q1
Never tell anyone the real reason you did something unless it is useful to do so.
Q2
The best way to handle people is to tell them what they want to hear.
Q3
One should take action only when sure it is morally right.
Q4
Most people are basically good and kind.
Q5
It is safest to assume that all people have a vicious streak and it will come out when they are given a chance.
Q6
Honesty is the best policy in all cases.
Q7
There is no excuse for lying to someone else.
Q8
Generally speaking, people won't work hard unless they're forced to do so.
Q9
All in all, it is better to be humble and honest than to be important and dishonest.
Q10
When you ask someone to do something for you, it is best to give the real reasons for wanting it rather than giving reasons which carry more weight.
Q11
Most people who get ahead in the world lead clean, moral lives.
Q12
Anyone who completely trusts anyone else is asking for trouble.
Q13
The biggest difference between most criminals and other people is that the criminals are stupid enough to get caught.
Q14
Most people are brave.
Q15
It is wise to flatter important people.
Q16
It is possible to be good in all respects.
Q17
P.T. Barnum was wrong when he said that there's a sucker born every minute.
Q18
It is hard to get ahead without cutting corners here and there.
Q19
People suffering from incurable diseases should have the choice of being put painlessly to death.
Q20
Most people forget more easily the death of their parents than the loss of their property.
See https://dataverse.harvard.edu/dataverse/pdsl for the raw YouGov and/or Qualtrics data.
See https://openpsychometrics.org/_rawdata/, maintained by Eric Jorgenson, for the raw Open Source Psychometrics Project data.
Christie, R., F. L. Geis, and D. Berger (1970), Studies in Machiavellianism, New York: Academic Press.
Open Source Psychometrics Project. https://openpsychometrics.org/_rawdata/
Pre-calculates a complete branching scheme of all possible questions-answer combinations and stores it as a list of lists or a flattened table of values.
makeTree(catObj, flat = FALSE)
makeTree(catObj, flat = FALSE)
catObj |
An object of class |
flat |
A logical indicating whether to return tree as as a list of lists or a table |
The function takes a Cat
object and generates a tree of all possible question-answer combinations, conditional on previous answers in the branching scheme and the current estimates for the branch.
The tree is stored as a list of lists, iteratively generated by filling in a possible answer, calculating the next question via
selectItem
, filling in a possible answer for that question, and so forth.
The length of each complete branching scheme within the tree is dictated by the lengthThreshold
slot within the Cat
object.
The function makeTree
returns either a list or a table. If the argument flat
is FALSE
, the default value, the function returns a list of lists.
If the argument flat
is TRUE
, the function takes the list of lists and configures it into a flattened table where the columns represent the battery items and the rows represent the possible answer profiles.
This function is computationally expensive. If there are response options and the researcher wants a complete branching scheme to include
items,
complete branching schemes will be calculated. Setting
is done via the
lengthThreshold
slot in the Cat
object. See Examples.
This function is to allow users to access the internal functions of the package. During item selection, all calculations are done in compiled C++
code.
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil
Cat-class
, checkStopRules
, selectItem
## Loading ltm Cat object data(ltm_cat) ## Setting complete branches to include 3 items setLengthThreshold(ltm_cat) <- 3 ## Object returned is list of lists ltm_list <- makeTree(ltm_cat) ## Object returned is table ltm_table <- makeTree(ltm_cat, flat = TRUE)
## Loading ltm Cat object data(ltm_cat) ## Setting complete branches to include 3 items setLengthThreshold(ltm_cat) <- 3 ## Object returned is list of lists ltm_list <- makeTree(ltm_cat) ## Object returned is table ltm_table <- makeTree(ltm_cat, flat = TRUE)
Cat object containing item parameters for graded response model fit with responses to the 20-item Neuroticism dimension of the 100-item IPIP representation of Costa and McCrae's Five Factor Model
data(neuro_cat)
data(neuro_cat)
An object of class Cat
of length 1.
Cat object containing item parameters for graded response model fit with 774,410 response profiles by myPersonality Project and 1500 response profiles collected by YouGov in June 2018. The sample from myPersonality Project was a convenience sample, and the respondents from YouGov were matched to a sampling frame on gender, age, race, and education.
See Cat-class
for details regarding the Cat object structure.
See grmCat
for details regarding the graded response model.
A normal prior was chosen with mean from the theta estimates from the YouGov sample (-.025) and a standard deviation (1.2) wide enough to envelope the range of estimated theta values across both samples.
Note that due to how the item parameters were estimated, large, positive values indicate "more" of the latent trait.
Response options are 1=Very inaccurate; 2=Moderately inaccurate; 3=Neither inaccurate nor accurate; 4=Moderately accurate; 5=Very accurate.
The wording of the question items:
I...
q12
Often feel blue.
q30
Dislike myself.
q80
Am often down in the dumps.
q70
Have frequent mood swings.
q50
Panic easily.
q90
Am filled with doubts about things.
q100
Feel threatened easily.
q17
Get stressed out easily.
q40
Fear for the worst.
q60
Worry about things.
q37
Seldom feel blue.
q11
Feel comfortable with myself.
q67
Rarely get irritated.
q19
Am not easily bothered by things.
q97
Am very pleased with myself.
q27
Am relaxed most of the time.
q77
Seldom get mad.
q47
Am not easily frustrated.
q87
Remain calm under pressure.
q57
Rarely lose my composure.
See https://dataverse.harvard.edu/dataverse/pdsl for the raw YouGov and/or Qualtrics data.
Costa, P. T., Jr., & McCrae, R. R. (1992). Revised NEO Personality Inventory (NEO PI-R) and NEO Five-Factor Inventory (NEO-FFI): Professional manual. Odessa, FL: Psychological Assessment Resources.
Stillwell, David, and Michal Kosinski. 2007. "myPersonality Project." https://sites.google.com/michalkosinski.com/mypersonality
Cat object containing item parameters for graded response model fit with responses to the 26 item Need for Affect inventory
data(nfa_cat)
data(nfa_cat)
An object of class Cat
of length 1.
Cat object containing item parameters for graded response model fit with 2507 response profiles from MTurk, 4990 response profiles collected by Qualtrics in June 2018, and 1512 response profiles from The American Panel Survey (TAPS) in December 2014. TAPS is a monthly online panel survey of about 2,000 adults in the United States. The panel was recruited in the fall of 2011 using an address-based sampling frame. TAPS surveys are administered online. Selected panelists who do not have a computer or online service are provided a computer and internet access by TAPS.
See Cat-class
for details regarding the Cat object structure.
See grmCat
for details regarding the graded response model.
A normal prior was chosen with mean from the theta estimates from the TAPS sample (.236) and a standard deviation (1.3) wide enough to envelope the range of estimated theta values across both samples.
Note that due to how the item parameters were estimated, large, positive values indicate "more" of the latent trait.
Response options are:
5 = Strongly agree, 4 = Somewhat agree, 3 = Neither agree nor disagree, 2 = Somewhat disagree, 1 = Strongly disagree
The wording of the question items is:
q1
It is important for me to be in touch with my feelings.
q2
I think that it is very important to explore my feelings.
q3
I am a very emotional person.
q4
It is important for me to know how others are feeling.
q5
Emotions help people get along in life.
q6
Strong emotions are generally beneficial.
q7
I feel that I need to experience strong emotions regularly.
q8
I approach situations in which I expect to experience strong emotions.
q9
I feel like I need a good cry every now and then.
q10
I like to dwell on my emotions.
q11
We should indulge our emotions.
q12
I like decorating my bedroom with a lot of pictures and posters of things emotionally significant to me.
q13
The experience of emotions promotes human survival.
q14
I do not know how to handle my emotion, so I avoid them.
q15
I find strong emotions overwhelming and therefore try to avoid them.
q16
Emotions are dangerous—they tend to get me into situations that I would rather avoid.
q17
I would prefer not to experience either the lows or highs of emotion.
q18
If I reflect on my past, I see that I tend to be afraid of emotions.
q19
I would love to be like Mr. Spock, who is totally logical and experiences little emotion.
q20
I have trouble telling the people close to me that I love them.
q21
Displays of emotions are embarrassing.
q22
Acting on ones emotions is always a mistake.
q23
I am sometimes afraid of how I might act if I become too emotional.
q24
Avoiding emotional events helps me sleep better at night.
q25
I wish I could feel less emotion.
q26
People can function most effectively when they are not experiencing strong emotions.
See https://dataverse.harvard.edu/dataverse/pdsl for the raw YouGov and/or Qualtrics data.
See https://wc.wustl.edu/american-panel-survey for raw TAPS data.
Maio, Gregory R., and Victoria M. Esses. "The need for affect: Individual differences in the motivation to approach or avoid emotions." Journal of personality 69.4 (2001): 583-614.
Data of survey respondents' responses to 18 NFC questions, which is a reduced version of NFC (Cacioppo and Petty 1984). For each question, respondents could choose one of five response options: 1 = agree strongly, 2 = agree somewhat, 3 = neither agree nor disagree, 4 = disagree somewhat, 5 = disagree strongly. Missingness is optional. Observations come from one of three administrations of the survey: The American Panel Survey, Amazon's Mechanical Turk in fall of 2014, or Amazon's Mechanical Turk in spring of 2015.
data(nfc)
data(nfc)
A data frame with 4043 observations on the following 18 variables.
NFC1
I really enjoy a task that involves coming up with new solutions to problems
NFC4
I would prefer a task that is intellectual, difficult, and important to one that is somewhat important but does not require much thought
NFC10
Learning new ways to think doesn't excite me very much
NFC12
I usually end up deliberating about issues even when they do not affect me personally
NFC15
The idea of relying on thought to make my way to the top appeals to me
NFC16
The notion of thinking abstractly is appealing to me
NFC19
I only think as hard as I have to
NFC21
I think tasks that require little thought once I've learned them
NFC22
I prefer to think about small, daily projects to long-term ones
NFC23
I would rather do something that requires little thought than something that is sure to challenge my thinking abilities
NFC24
I find satisfaction in deliberating hard and for long hours
NFC29
I like to have the responsibility of handing a situation that requires a lot of thinkings
NFC31
I feel relief rather than satisfaction after completing a task that required a lot of mental effort
NFC32
Thinking is not my idea of fun
NFC33
I try to anticipate and avoid situations where there is likely a chance I will have to think in depth about something
NFC39
I prefer my life to be filed with puzzles that I must solve
NFC40
I would prefer complex to simple problems
NFC43
Its enough for me that something gets the job done; I don't care how or why it works
Cacioppo, John T. and Richard E. Petty. 1984. "The Efficient Assessment of Need for Cognition." Journal of Personality Assessment 48(3):306-307.
Cat object containing item parameters for graded response model fit with responses to the 34 item Need for Cognition inventory
data(nfc_cat)
data(nfc_cat)
An object of class Cat
of length 1.
Cat object containing item parameters for graded response model fit with 4985 response profiles collected by Qualtrics in June 2018 and 1512 response profiles from The American Panel Survey (TAPS) in December 2014. TAPS is a monthly online panel survey of about 2,000 adults in the United States. The panel was recruited in the fall of 2011 using an address-based sampling frame. TAPS surveys are administered online. Selected panelists who do not have a computer or online service are provided a computer and internet access by TAPS.
See Cat-class
for details regarding the Cat object structure.
See grmCat
for details regarding the graded response model.
A normal prior was chosen with mean from the theta estimates from the TAPS sample (.003) and a standard deviation (1.6) wide enough to envelope the range of estimated theta values across both samples.
Note that due to how the item parameters were estimated, large, positive values indicate "more" of the latent trait.
Response options are:
5 = Strongly agree, 4 = Somewhat agree, 3 = Neither agree nor disagree, 2 = Somewhat disagree, 1 = Strongly disagree
The wording of the question items is:
q1
I would prefer complex to simple problems.
q2
I don't like to have the responsibility for handling a situation that requires a lot of thinking.
q3
Thinking is not my idea of fun.
q4
I would rather do something that requires little thought than something that is sure to challenge my thinking abilities.
q5
I try to anticipate and avoid situations where there is a likely chance I will have to think in depth about something.
q6
I find little satisfaction in deliberating hard and for long hours.
q7
I only think as hard as I have to.
q8
I prefer to think about small, daily projects more than long-term ones.
q9
I like tasks that require little thought once I've learned them.
q10
The idea of relying on thought to make my way to the top does not appeal to me.
q11
I really enjoy a task that involves coming up with new solutions to problems.
q12
Learning new ways to think doesn't excite me very much.
q13
I prefer my life to be filled with puzzles that I must solve.
q14
The notion of thinking abstractly is not appealing to me.
q15
I would prefer a task that is intellectual, difficult, and important to one that is somewhat important but does not require much thought.
q16
I feel relief rather the satisfaction after completing a task that required a lot of mental effort.
q17
Its enough for me that something gets the job done, I don't care how or why it works.
q18
I usually end up deliberating about issues even when they do not affect me personally.
q19
I tend to set goals that can be accomplished only by expending considerable mental effort.
q20
I am usually tempted to put more thought into a task than the job minimally requires.
q21
I am hesitant about making important decisions after thinking about them.
q22
I prefer just to let things happen rather than try to understand why they turned out that way.
q23
I have difficulty thinking in new and unfamiliar situations.
q24
I am an intellectual.
q25
I don't reason well under pressure.
q26
I more often talk with other people about the reasons/possible solutions to international problems than about gossip or tidbits about what famous people are doing.
q27
These days, I see little chance for performing well, even in intellectual jobs, unless one knows the right people.
q28
More often than not, more thinking just leads to more errors.
q29
I appreciate opportunities to discover the strengths and weaknesses of my own reasoning.
q30
I prefer watching educational programs more than entertainment programs.
q31
I think best when those around me are very intelligent.
q32
Simply knowing the answer rather than understanding the reasons for the answer to a problem is fine with me.
q33
Ignorance is bliss.
q34
I enjoy thinking about an issue even when the results of my thought will have no effect on the outcome of the issue.
See https://dataverse.harvard.edu/dataverse/pdsl for the raw YouGov and/or Qualtrics data.
See https://wc.wustl.edu/american-panel-survey for raw TAPS data.
Cacioppo, John T., and Richard E. Petty. "The need for cognition." Journal of personality and social psychology 42.1 (1982): 116.
Data from the 40 item Narcissistic Personality Inventory (Raskin and Terry 1988) collected by by the Open Source Psychometrics Project in 2012.
data(npi)
data(npi)
A data frame with 11,243 observations on the following 40 variables.
Q1
0 = I have a natural talent for influencing people. 1 = I am not good at influencing people.
Q2
0 = Modesty doesn't become me. 1 = I am essentially a modest person.
Q3
0 = I would do almost anything on a dare. 1 = I tend to be a fairly cautious person.
Q4
0 = When people compliment me I sometimes get embarrassed. 1 = I know that I am good because everybody keeps telling me so.
Q5
0 = The thought of ruling the world frightens the hell out of me. 1 = If I ruled the world it would be a better place.
Q6
0 = I can usually talk my way out of anything. 1 = I try to accept the consequences of my behavior.
Q7
0 = I prefer to blend in with the crowd. 1 = I like to be the center of attention.
Q8
0 = I will be a success. 1 = I am not too concerned about success.
Q9
0 = I am no better or worse than most people. 1 = I think I am a special person.
Q10
0 = I am not sure if I would make a good leader. 1 = I see myself as a good leader.
Q11
0 = I am assertive. 1 = I wish I were more assertive.
Q12
0 = I like to have authority over other people. 1 = I don't mind following orders.
Q13
0 = I find it easy to manipulate people. 1 = I don't like it when I find myself manipulating people.
Q14
0 = I insist upon getting the respect that is due me. 1 = I usually get the respect that I deserve.
Q15
0 = I don't particularly like to show off my body. 1 = I like to show off my body.
Q16
0 = I can read people like a book. 1 = People are sometimes hard to understand.
Q17
0 = If I feel competent I am willing to take responsibility for making decisions. 1 = I like to take responsibility for making decisions.
Q18
0 = I just want to be reasonably happy. 1 = I want to amount to something in the eyes of the world.
Q19
0 = My body is nothing special. 1 = I like to look at my body.
Q20
0 = I try not to be a show off. 1 = I will usually show off if I get the chance.
Q21
0 = I always know what I am doing. 1 = Sometimes I am not sure of what I am doing.
Q22
0 = I sometimes depend on people to get things done. 1 = I rarely depend on anyone else to get things done.
Q23
0 = Sometimes I tell good stories. 1 = Everybody likes to hear my stories.
Q24
0 = I expect a great deal from other people. 1 = I like to do things for other people.
Q25
0 = I will never be satisfied until I get all that I deserve. 1 = I take my satisfactions as they come.
Q26
0 = Compliments embarrass me. 1 = I like to be complimented.
Q27
0 = I have a strong will to power. 1 = Power for its own sake doesn't interest me.
Q28
0 = I don't care about new fads and fashions. 1 = I like to start new fads and fashions.
Q29
0 = I like to look at myself in the mirror. 1 = I am not particularly interested in looking at myself in the mirror.
Q30
0 = I really like to be the center of attention. 1 = It makes me uncomfortable to be the center of attention.
Q31
0 = I can live my life in any way I want to. 1 = People can't always live their lives in terms of what they want.
Q32
0 = Being an authority doesn't mean that much to me. 1 = People always seem to recognize my authority.
Q33
0 = I would prefer to be a leader. 1 = It makes little difference to me whether I am a leader or not.
Q34
0 = I am going to be a great person. 1 = I hope I am going to be successful.
Q35
0 = People sometimes believe what I tell them. 1 = I can make anybody believe anything I want them to.
Q36
0 = I am a born leader. 1 = Leadership is a quality that takes a long time to develop.
Q37
0 = I wish somebody would someday write my biography. 1 = I don't like people to pry into my life for any reason.
Q38
0 = I get upset when people don't notice how I look when I go out in public. 1 = I don't mind blending into the crowd when I go out in public.
Q39
0 = I am more capable than other people. 1 = There is a lot that I can learn from other people.
Q40
0 = I am much like everybody else. 1 = I am an extraordinary person.
Item responses are paired. Respondents had to choose the one that fit them the best.
Raskin, Robert and Howard Terry. 1988. "A Principal-Components Analysis of the Narcissistic Personality Inventory and Further Evidence of Its Construct Validity." Journal of Personality and Social Psychology 54(5):890-902.
Open Source Psychometrics Project. https://openpsychometrics.org/_rawdata/
A list where each element is a length three vector containin the text of the the question item and the two response options.
data(npi_battery)
data(npi_battery)
An object of class list
of length 40.
Raskin, R., and H. Terry (1988), "A Principal-Components Analysis of the Narcissistic Personality Inventory and Further Evidence of Its Construct Validity," Journal of Personality and Social Psychology, 54, 890-902.
data(npi_battery) # Item 1 npi_battery$Q1[1] # Response options for item 1 npi_battery$Q1[2:3]
data(npi_battery) # Item 1 npi_battery$Q1[1] # Response options for item 1 npi_battery$Q1[2:3]
Cat object containing item parameters for latent trait model fit with responses to the 40 item Narcissistic Personality inventory
data(npi_cat)
data(npi_cat)
An object of class Cat
of length 1.
Cat object containing item parameters for latent trait model fit with 2945 response profiles collected by Qualtrics in June 2018 and 10440 response profiles collected by the Open Source Psychometrics Project in 2012.
See Cat-class
for details regarding the Cat object structure.
See ltmCat
for details regarding the latent trait model.
A normal prior was chosen with mean from the theta estimates from the Qualtrics sample (-.069) and a standard deviation (1) wide enough to envelope the range of estimated theta values across both samples.
Note that due to how the item parameters were estimated, large, positive values indicate "more" of the latent trait.
Item responses are paired. Respondents had to choose the one that fit them the best.
The wording of the item responses is:
Q1*
0 = I am not good at influencing people. 1 = I have a natural talent for influencing people.
Q2
0 = Modesty doesn't become me. 1 = I am essentially a modest person.
Q3
0 = I would do almost anything on a dare. 1 = I tend to be a fairly cautious person.
Q4
0 = When people compliment me I sometimes get embarrassed. 1 = I know that I am good because everybody keeps telling me so.
Q5
0 = The thought of ruling the world frightens the hell out of me. 1 = If I ruled the world it would be a better place.
Q6
0 = I can usually talk my way out of anything. 1 = I try to accept the consequences of my behavior.
Q7
0 = I prefer to blend in with the crowd. 1 = I like to be the center of attention.
Q8
0 = I will be a success. 1 = I am not too concerned about success.
Q9
0 = I am no better or worse than most people. 1 = I think I am a special person.
Q10
0 = I am not sure if I would make a good leader. 1 = I see myself as a good leader.
Q11
0 = I am assertive. 1 = I wish I were more assertive.
Q12
0 = I like to have authority over other people. 1 = I don't mind following orders.
Q13
0 = I find it easy to manipulate people. 1 = I don't like it when I find myself manipulating people.
Q14
0 = I insist upon getting the respect that is due me. 1 = I usually get the respect that I deserve.
Q15
0 = I don't particularly like to show off my body. 1 = I like to show off my body.
Q16
0 = I can read people like a book. 1 = People are sometimes hard to understand.
Q17
0 = If I feel competent I am willing to take responsibility for making decisions. 1 = I like to take responsibility for making decisions.
Q18
0 = I just want to be reasonably happy. 1 = I want to amount to something in the eyes of the world.
Q19
0 = My body is nothing special. 1 = I like to look at my body.
Q20
0 = I try not to be a show off. 1 = I will usually show off if I get the chance.
Q21
0 = I always know what I am doing. 1 = Sometimes I am not sure of what I am doing.
Q22
0 = I sometimes depend on people to get things done. 1 = I rarely depend on anyone else to get things done.
Q23
0 = Sometimes I tell good stories. 1 = Everybody likes to hear my stories.
Q24
0 = I expect a great deal from other people. 1 = I like to do things for other people.
Q25
0 = I will never be satisfied until I get all that I deserve. 1 = I take my satisfactions as they come.
Q26
0 = Compliments embarrass me. 1 = I like to be complimented.
Q27
0 = I have a strong will to power. 1 = Power for its own sake doesn't interest me.
Q28
0 = I don't care about new fads and fashions. 1 = I like to start new fads and fashions.
Q29
0 = I like to look at myself in the mirror. 1 = I am not particularly interested in looking at myself in the mirror.
Q30
0 = I really like to be the center of attention. 1 = It makes me uncomfortable to be the center of attention.
Q31
0 = I can live my life in any way I want to. 1 = People can't always live their lives in terms of what they want.
Q32
0 = Being an authority doesn't mean that much to me. 1 = People always seem to recognize my authority.
Q33
0 = I would prefer to be a leader. 1 = It makes little difference to me whether I am a leader or not.
Q34
0 = I am going to be a great person. 1 = I hope I am going to be successful.
Q35
0 = People sometimes believe what I tell them. 1 = I can make anybody believe anything I want them to.
Q36
0 = I am a born leader. 1 = Leadership is a quality that takes a long time to develop.
Q37
0 = I wish somebody would someday write my biography. 1 = I don't like people to pry into my life for any reason.
Q38
0 = I get upset when people don't notice how I look when I go out in public. 1 = I don't mind blending into the crowd when I go out in public.
Q39
0 = I am more capable than other people. 1 = There is a lot that I can learn from other people.
Q40
0 = I am much like everybody else. 1 = I am an extraordinary person.
*Note that Item 1 is "reverse coded" from the coding that is typically used. This is because item parameter estimation constrains the first item's discrimination parameter to be positive. So the reverse coding was done for the more intuitive interpretation of item parameters and theta estimates as larger, positive values indicate "more" of the latent trait.
See https://dataverse.harvard.edu/dataverse/pdsl for the raw YouGov and/or Qualtrics data.
See https://openpsychometrics.org/_rawdata/, maintained by Eric Jorgenson, for the raw Open Source Psychometrics Project data.
Raskin, R., and H. Terry (1988), "A Principal-Components Analysis of the Narcissistic Personality Inventory and Further Evidence of Its Construct Validity," Journal of Personality and Social Psychology, 54, 890-902.
Open Source Psychometrics Project. https://openpsychometrics.org/_rawdata/
4005 full response profiles to 16 Need to Evaluate inventory. Observations come from one of three administrations of the survey: The American Panel Survey, Amazon's Mechanical Turk in fall of 2014, or Amazon's Mechanical Turk in spring of 2015.
data(nte)
data(nte)
An object of class data.frame
with 4005 rows and 16 columns.
See nte_cat
for detailed information on question wordings and response options.
Jarvis, W. Blair G., and Richard E. Petty. "The need to evaluate." Journal of personality and social psychology 70.1 (1996): 172.
Cat object containing item parameters for graded response model fit with responses to the 16 item Need to Evaluate inventory
data(nte_cat)
data(nte_cat)
An object of class Cat
of length 1.
Cat object containing item parameters for graded response model fit with 2534 response profiles from MTurk, 4993 response profiles collected by Qualtrics in June 2018, and 1512 response profiles from The American Panel Survey (TAPS) in December 2014. TAPS is a monthly online panel survey of about 2,000 adults in the United States. The panel was recruited in the fall of 2011 using an address-based sampling frame. TAPS surveys are administered online. Selected panelists who do not have a computer or online service are provided a computer and internet access by TAPS.
See Cat-class
for details regarding the Cat object structure.
See grmCat
for details regarding the graded response model.
A normal prior was chosen with mean from the theta estimates from the TAPS sample (.002) and a standard deviation (1.3) wide enough to envelope the range of estimated theta values across both samples.
Note that due to how the item parameters were estimated, large, positive values indicate "more" of the latent trait.
Response options are:
5 = Extremely characteristic of me, 4 = Somewhat characteristic of me, 3 = Uncertain, 2 = Somewhat uncharacteristic of me, 1 = Extremely uncharacteristic of me
The wording of the question items is:
q1
I form opinions about everything.
q2
I prefer to avoid taking extreme positions.
q3
It is very important to me to hold strong opinions.
q4
I want to know exactly what is good and bad about everything.
q5
I often prefer to remain neutral about complex issues.
q6
If something does not affect me, I do not usually determine if it is good or bad.
q7
I enjoy strongly liking and disliking things.
q8
There are many things for which I do not have a preference.
q9
It bothers me to remain neutral.
q10
I like to have strong opinions even when I am not personally involved.
q11
I have many more opinions than the average person.
q12
I would rather have a strong opinion than no opinion at all.
q13
I pay a lot of attention to whether things are good or bad.
q14
I only form strong opinions when I have to.
q15
I like to decide that new things are really good or really bad.
q16
I am pretty much indifferent to many important issues.
See https://dataverse.harvard.edu/dataverse/pdsl for the raw YouGov and/or Qualtrics data.
See https://wc.wustl.edu/american-panel-survey for raw TAPS data.
Jarvis, W. Blair G., and Richard E. Petty. "The need to evaluate." Journal of personality and social psychology 70.1 (1996): 172.
Calculates the observed information of the likelihood of a respondent's ability for a given
item
.
obsInf(catObj, theta, item)
obsInf(catObj, theta, item)
catObj |
An object of class |
theta |
A numeric or an integer indicating the value for |
item |
An integer indicating the index of the question item |
The observed information is equivalent to the negative second derivative of the log-likelihood evaluated at .
This function should never be called when the respondent has answered no questions as the likelihood is not defined.
The function obsInf
returns a numeric value of the observed information of the likelihood, given , for a given question item.
This function is to allow users to access the internal functions of the package. During item selection, all calculations are done in compiled C++
code.
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil
## Loading ltm Cat object data(ltm_cat) ## Store example answers setAnswers(ltm_cat) <- c(1,0,1,0,1, rep(NA, 35)) ## Calculate observed information for different ability parameters and items obsInf(ltm_cat, theta = 1, item = 10) obsInf(ltm_cat, theta = 1, item = 11) obsInf(ltm_cat, theta = 0, item = 10) obsInf(ltm_cat, theta = 0, item = 11)
## Loading ltm Cat object data(ltm_cat) ## Store example answers setAnswers(ltm_cat) <- c(1,0,1,0,1, rep(NA, 35)) ## Calculate observed information for different ability parameters and items obsInf(ltm_cat, theta = 1, item = 10) obsInf(ltm_cat, theta = 1, item = 11) obsInf(ltm_cat, theta = 0, item = 10) obsInf(ltm_cat, theta = 0, item = 11)
Cat object containing item parameters for graded response model fit with responses to the 20-item Openness dimension of the 100-item IPIP representation of Costa and McCrae's Five Factor Model
data(open_cat)
data(open_cat)
An object of class Cat
of length 1.
Cat object containing item parameters for graded response model fit with 774,410 response profiles by myPersonality Project and 1500 response profiles collected by YouGov in June 2018. The sample from myPersonality Project was a convenience sample, and the respondents from YouGov were matched to a sampling frame on gender, age, race, and education.
See Cat-class
for details regarding the Cat object structure.
See grmCat
for details regarding the graded response model.
A normal prior was chosen with mean from the theta estimates from the YouGov sample (-.674) and a standard deviation (1.2) wide enough to envelope the range of estimated theta values across both samples.
Note that due to how the item parameters were estimated, large, positive values indicate "more" of the latent trait.
Response options are 1=Very inaccurate; 2=Moderately inaccurate; 3=Neither inaccurate nor accurate; 4=Moderately accurate; 5=Very accurate.
The wording of the question items:
I...
q91
Believe in the importance of art.
q1
Have a vivid imagination.
q51
Tend to vote for liberal political candidates.
q41
Carry the conversation to a higher level.
q61
Enjoy hearing new ideas.
q31
Enjoy thinking about things.
q21
Can say things beautifully.
q16
Enjoy wild flights of fantasy.
q81
Get excited by new ideas.
q71
Have a rich vocabulary.
q24
Am not interested in abstract ideas.
q74
Do not like art.
q7
Avoid philosophical discussions.
q34
Do not enjoy going to art museums.
q44
Tend to vote for conservative political candidates.
q4
Do not like poetry.
q94
Rarely look for a deeper meaning in things.
q84
Believe that too much tax money goes to support artists.
q54
Am not interested in theoretical discussions.
q64
Have difficulty understanding abstract ideas.
See https://dataverse.harvard.edu/dataverse/pdsl for the raw YouGov and/or Qualtrics data.
Costa, P. T., Jr., & McCrae, R. R. (1992). Revised NEO Personality Inventory (NEO PI-R) and NEO Five-Factor Inventory (NEO-FFI): Professional manual. Odessa, FL: Psychological Assessment Resources.
Stillwell, David, and Michal Kosinski. 2007. "myPersonality Project." https://sites.google.com/michalkosinski.com/mypersonality
Generating all possible combinations of length n from a response profile to determine the possible response profile best able to estimate the true value of theta.
## S4 method for signature 'Cat' oracle(catObj, theta, responses, approx = FALSE, parallel = FALSE)
## S4 method for signature 'Cat' oracle(catObj, theta, responses, approx = FALSE, parallel = FALSE)
catObj |
An object of class |
theta |
A numeric representing the true position on the latent trait. |
responses |
A vector representing the respondent's full answer profile. |
approx |
If TRUE, uses a subset of 1000 potential response profiles |
parallel |
If TRUE, computes in parallel |
lengthThreshold slot should specify how many questions to ask. Note this function uses the estimateTheta method specified in the supplied cat object
A data.frame where the first column is the user-supplied true value of theta, the second column is the best possible theta estimate given n questions are asked, and the remaining columns are the answer profile leading to the best possible theta estimation.
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil
Function to plot item response functions, item characteristic functions, and item information functions for Cat objects.
## S4 method for signature 'Cat' plot(x, item, plotType, xlim = c(-5, 5), ...)
## S4 method for signature 'Cat' plot(x, item, plotType, xlim = c(-5, 5), ...)
x |
Cat object. |
item |
Numeric. Item index. |
plotType |
Character. Either "IRF", "ICC", or "IIF" for item response functions, item characteristic functions, and item information functions, respectively. |
xlim |
Vector. Range of the x-axis. |
... |
Other arguments passed to plot(). |
Data from Amazon Mechanical Turkers in 2012 responding to 64 political knowledge questions. Political knowledge questions had a varying number of response options, noted below. This dataset codes answers as either correct (a value of 0) or incorrect (a value of 1).
data(polknowMT)
data(polknowMT)
A data frame with 810 observations on the following 64 questions.
Q1
How long is one term for the President of the United States?
Eight years; Six years; Four years; Two years
Q2
The FDA is part of the national government primarily responsible for regulating
Food quality; The national parks; Electricity production and energy; Pollution and the environment
Q3
Who is the Vice President of the United States?
Leon Panetta; William Daley; Hillary Clinton; Joe Biden
Q4
The federal debt is
Much smaller than it was 20 years ago; The difference between imports and exports with foreign countries; The annual difference between spending and tax revenues; The accumulated borrowing of the federal government that has not been repaid
Q5
How many times can an individual be elected President of the United States under current laws?
Any number of terms; Three times; Twice; Once
Q6
What do we call the first ten amendments to the Constitution?
The Articles of Confederation; The inalienable right; The Bill of Rights; The Declaration of Independence
Q7
Is the U.S. federal budget deficit, the amount by which the governments spending exceeds the amount of money it collects, now bigger, about the same, or smaller than it was during most of the 1990s?
Smaller; About the same; Bigger
Q8
Who signs bills to become laws?
The President; The Vice President; The Chief Justice of the Supreme Court; The Secretary of State
Q9
Which party is generally more supportive of creating a way for immigrants who are in the U.S. illegally to eventually become citizens?
The Republican Party; The Democratic Party
Q10
In what month do we vote for the President?
November; October; February; January
Q11
What are the two parts of the U.S. Congress?
The Senate and the Supreme Court; The House of Lords and the House of Commons; The House of Representative and the Supreme Court; The Senate and House of Representatives
Q12
Which party is generally more supportive of restricting access to abortion?
The Republican Party; The Democratic Party
Q13
Which of these political parties is considered most conservative?
Green Party; Republican Party; Democratic Party
Q14
The NRA is an organization that advocates for
Clean elections; A cleaner environment; The rights of gun owners; Women's rights
Q15
Compared to 30 years ago, is the difference in incomes between the top 20% of households and the bottom 20% of households now bigger, smaller, or the same?
The difference is now the same as 30 years ago; The difference is now smaller than 30 years ago; The difference is now bigger than 30 years ago
Q16
The EPA is part of the national government primarily responsible for regulating
Food quality; The national parks; Electricity production and energy; Pollution and the environment
Q17
Which party is generally more supportive of reducing the size of the defense budget?
The Republican Party; The Democratic Party
Q18
Which party is generally more supportive of increasing taxes on higher income people to reduce the federal budget deficit?
The Republican Party; The Democratic Party
Q19
Which party is generally more supportive of allowing drilling for oil in the Arctic National Wildlife Refuge?
The Republican Party; The Democratic Party
Q20
Who is the Commander in Chief of the military?
The Attorney General; The President; The Secretary of Defense; The Vice President
Q21
The First Amendment to the United States Constitution guarantees all of these rights EXCEPT
Right to remain silent; Right to the free exercise of religion; Right to free speech; Right to peaceably assemble
Q22
Roe v Wade is a case decided by the Supreme Court that relates to
Executive power; Campaign finance; Birth control; Abortion
Q23
Social Security is
Funded by the personal income tax; Operated by state government; The responsibility of the Department of Defense; The benefit program for senior citizens
Q24
What is Medicare?
A private, non-profit organization that runs free health clinic; A private health insurance plan sold to individuals in all 50 states; A program run by state governments to provide health care to poor people; A program run by the U.S. federal government to pay for old people's health care
Q25
How many senators are elected from each state?
It depends on the population of the state; Four; Two; One
Q26
How many votes are required in Congress to override a presidential veto
A simple majority of both houses of Congress; A simple majority of one house of Congress; A two-thirds majority of both houses of Congress; A two-thirds majority of one house of Congress
Q27
The Secretary of State
Serves a two-year term; Serves the state governments; Is nominated by the president; Heads the armed services
Q28
Near the end of an election campaign, a polls shows that an issue that no candidate has mentioned is of great concern to voters. What is most likely to happen?
Some candidates will drop out of the race; Candidates will start talking about the issue; Newspapers will not report the results of the poll; The election will be postponed
Q29
Liberals are generally said to
Support pro-life policies; Oppose all tax increases; Support military spending; Support government programs to give government assistance the needy
Q30
Which party is generally more supportive of reducing the size and scope of the federal government?
The Republican Party; The Democratic Party
Q31
The ability of a minority of senators to prevent a vote on a bill is known as Suspension of the rules; Enrollment; A veto; A filibuster
Q32
conservatives are generally said to
Support pro-choice policies; Support tax cuts; Oppose military spending; Support government programs to give government assistance to the needy
Q33
Which of these regions of the country is generally considered to be most supportive of Republican candidates
Midwest; South; West Coast; New England
Q34
The presiding officer in the House of Representatives is
The Majority Leader; The Sergeant at Arms; The Vice President of the United States; The Speaker
Q35
Which of these countries is NOT a permanent member of the U.N. Security Council
United Kingdom; France; India; China
Q36
Which part has a majority of seats in the U.S. House of Representatives?
Neither; Democrats; Republicans
Q37
What state holds the first primary election in Presidential primaries?
Florida; Nevada; South Carolina; New Hampshire
Q38
Who is the Speaker of the House of Representatives?
Mitt Romney; Eric Holder; Harry Reid; John Boehner
Q39
Most cases are considered by the Supreme Court
In even-numbered years; At the request of the Congress; Upon order of the president; With the approval of at least four justices
Q40
How many Justices typically serve on the U.S. Supreme Court
Eleven; Nine; Eight; Seven
Q41
What job or political office is no held by Ben Bernanke?
None of these; Minority Whip of the U.S. House; Chief Justice of the United States Supreme Court; Majority leader of the U.S. Senate, Chairman of the Federal Reserve
Q42
Whose responsibility is it to nominate judges to the Federal Courts
The state governors; The Supreme Court; Congress; President
Q43
Who is the Chief Justice of the U.S. Supreme Court?
Larry Thompson; Anthony Kennedy; David Cole; John Roberts
Q44
The U.S. Senate
Votes to confirm nominees to the U.S. Supreme court chosen by the House of Representatives; Plays no role in choosing the members of the U.S. Supreme Court; Chooses members of the U.S. Supreme Court; Votes to confirm nominees to the U.S. Supreme Court chosen by the President
Q45
Which party has a majority of seats in the U.S. Senate
Neither; Democrats; Republicans
Q46
Which of the states listed below has the greatest number of electoral college votes in the U.S. Presidential Elections?
Puerto Rico; Nevada; North Dakota; Washington, D.C.
Q47
Citizens United v the FEC is a case decided by the Supreme Court that relates to
Executive power; Campaign finance; Birth control; Abortion
Q48
For how many years is a United States Senator elected that is, how many years are there in one full term of office for a U.S. Senator?
None of these; Eight years; Six years; Four years; Two years
Q49
Who is the Prime Minister of the United Kingdom?
Richard Branson; Tony Hayward; Nick Clegg; David Cameron
Q50
The president of Afghanistan is named
Bashar al-Assad; Hosni Mubarak; Hamid Karzai; Nouri al-Maliki
Q51
The House of Representatives has how many voting members?
Four hundred and forty-one; Four hundred and thirty-five; Two hundred; One hundred
Q52
The President of the Senate is
The Majority Leader; The Sergeant at Arms; The Vice President of the United States; The senior senator of the majority party
Q53
On which of the following federal programs is the most money spent each year?
Medicare; Education; Subsidies to farmers; Aid to foreign countries
Q54
What do all constitutional governments have?
Separation of church and state; A bill of rights; A President as the head of government; Limits on political power
Q55
One which of the following does the U.S. federal government spend the least money?
Social Security; National defense; Medicare; Foreign aid
Q56
The head of the Department of Justice is
Kathleen Sebelius; Eric Holder; Timothy Geithner; Hillary Clinton
Q57
The president may NOT
Declare war; Pardon criminals without justification; Appoint federal officials when Congress is in recess; Refuse to sign legislation passed by Congress
Q58
Which of these is NOT primarily the responsibility of the Federal government in Washington?
Interstate commerce; Negotiating treaties with foreign countries; Education; National defense
Q59
Who is the current president of Mexico?
Vincente Fox; Hugo Chavez; Dilma Rousseff; Felipe Calderon
Q60
Which of the following actions does the United States federal government commonly take to finance a budget deficit?
Expanding public-works projects; Borrowing from the public; Imposing import quotas; Printing more money
Q61
Common Cause is an organization that advocates for
Women's rights; Clean elections; A cleaner environment; The right of gun owners
Q62
The Byrd Rule is relevant
During the confirmation of cabinet members; For national party conventions; During Congressional debates over non-budgetary policies; For the Reconciliation process
Q63
The Majority Leader of the House of Representative is
Nancy Pelosi; Kevin McCarthy; Eric Cantor; John Boehner
Q64
On which of the following does the U.S. federal government spend the most money each year?
Education; Medicare; Interest on the national debt; National defense
https://dataverse.harvard.edu/dataset.xhtml?persistentId=hdl:1902.1/19381
Jacob M. Montgomery and Joshua Cutler. 2013. "Computerized Adaptive Testing for Public Opinion Surveys." Political Analysis (Spring 2013) 21 (2): 172-192.
Data of responses to a political knowledge battery from the May 2013 wave of The American Panel Survey (TAPS) out of Washington University in St. Louis.
data(polknowOrdered)
data(polknowOrdered)
A data frame with 1340 observations (only complete cases) of the following 10 questions.
Q1
Members of the U.S. Supreme Court serve
3 = two-year terms. 4 = ten-year terms. 5 = life terms. 2 = terms determined by the president. 1 = Don't know.
Q2
Who is the Chief Justice of the U.S. Supreme Court?
5 = John Roberts. 4 = Antonin Scalia. 3 = Mitt Romney. 2 = Hillary Clinton. 1 = Don't know.
Q3
Social Security is
5 = the benefit program for senior citizens. 2 = the responsibility of the Department of Defense. 3 = operated by state governments. 4 = funded by the personal income tax. 1 = Don't know.
Q4
On which of the following programs is the most money spent each year?
4 = aid to foreign countries. 5 = Medicare. 2 = subsidies to farmers. 3 = education. 1 = Don't know.
Q5
Which party holds a majority of seats in the U.S. House of Representatives in Washington?
4 = Democrats. 3 = Republicans. 2 = Independents. 1 = Don't know.
Q6
How many votes are required in Congress to override a presidential veto?
2 = a simple majority of one house of Congress. 3 = a simple majority of both houses of Congress. 4 = a two-thirds majority of one house of Congress. 5 = a two-thirds majority of both houses of Congress. 1 = Don't know.
Q7
How long is one term for a member of the U.S. Senate?
3 = two years. 4 = four years. 5 = six years. 2 = eight years. 1 = Don't know.
Q8
The ability of a minority of senators to prevent a vote on a bill is known as
4 = a veto. 5 = a filibuster. 3 = enrollment. 2 = suspension of the rules. 1 = Don't know.
Q9
Who is the Vice President of the United States?
4 = Nancy Pelosi. 3 = John Boehner. 5 = Joseph Biden. 2 = Harry Reid. 1 = Don't know.
Q10
A president may serve
3 = one term. 5 = two terms. 4 = three terms. 2 = any number of terms. 1 = Don't know.
TAPS is a monthly online panel survey of about 2,000 adults in the United States. The panel was recruited in the fall of 2011 using an address-based sampling frame. TAPS surveys are administered online. Selected panelists who do not have a computer or online service are provided a computer and internet access by TAPS.
Data of responses to a political knowledge battery from the May 2013 wave of The American Panel Survey (TAPS) out of Washington University in St. Louis.
data(polknowTAPS)
data(polknowTAPS)
A data frame with 1496 observations on the following 10 questions.
Q1
Members of the U.S. Supreme Court serve
1 = two-year terms. 2 = ten-year terms. 3 = life terms. 4 = terms determined by the president. 5 = Don't know.
Q2
Who is the Chief Justice of the U.S. Supreme Court?
1 = John Roberts. 2 = Antonin Scalia. 3 = Mitt Romney. 4 = Hillary Clinton. 5 = Don't know.
Q3
Social Security is
1 = the benefit program for senior citizens. 2 = the responsibility of the Department of Defense. 3 = operated by state governments. 4 = funded by the personal income tax. 5 = Don't know.
Q4
On which of the following programs is the most money spent each year?
1 = aid to foreign countries. 2 = Medicare. 3 = subsidies to farmers. 4 = education. 5 = Don't know.
Q5
Which party holds a majority of seats in the U.S. House of Representatives in Washington?
1 = Democrats. 2 = Republicans. 3 = Independents. 4 = Don't know.
Q6
How many votes are required in Congress to override a presidential veto?
1 = a simple majority of one house of Congress. 2 = a simple majority of both houses of Congress. 3 = a two-thirds majority of one house of Congress. 4 = a two-thirds majority of both houses of Congress. 5 = Don't know.
Q7
How long is one term for a member of the U.S. Senate?
1 = two years. 2 = four years. 3 = six years. 4 = eight years. 5 = Don't know.
Q8
The ability of a minority of senators to prevent a vote on a bill is known as
1 = a veto. 2 = a filibuster. 3 = enrollment. 4 = suspension of the rules. 5 = Don't know.
Q9
Who is the Vice President of the United States?
1 = Nancy Pelosi. 2 = John Boehner. 3 = Joseph Biden. 4 = Harry Reid. 5 = Don't know.
Q10
A president may serve
1 = one term. 2 = two terms. 3 = three terms. 4 = any number of terms. 5 = Don't know.
TAPS is a monthly online panel survey of about 2,000 adults in the United States. The panel was recruited in the fall of 2011 using an address-based sampling frame. TAPS surveys are administered online. Selected panelists who do not have a computer or online service are provided a computer and internet access by TAPS.
Calculates the expected Kullback-Leibler information, weighted by likelihood and prior beliefs, for a specified item.
posteriorKL(catObj, item)
posteriorKL(catObj, item)
catObj |
An object of class |
item |
An integer indicating the index of the question item |
The function posteriorKL
calculates the expected Kullback-Leibler information
for question item
, where the proposed values of the true ability parameter are weighted by
the prior.
This function involves integration. See Note for more information.
The function posteriorKL
returns a numeric indicating the
expected Kullback-Leibler information weighted by the likelihood
for the specified item, given the current answer profile and ability parameter estimate.
This function is to allow users to access the internal functions of the package. During item selection, all calculations are done in compiled C++
code.
This function uses adaptive quadrature methods from the GNU Scientific
Library (GSL) to approximate single-dimensional
integrals with high accuracy. The bounds of integration are determined by the
lowerBound
and upperBound
slots of the Cat
object.
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil
expectedKL
, likelihoodKL
, selectItem
## Loading ltm Cat object data(ltm_cat) ## Store example answers setAnswers(ltm_cat) <- c(1,0,1,0,1, rep(NA, 35)) ## Estimate EPV for different unasked items posteriorKL(ltm_cat, item = 10) posteriorKL(ltm_cat, item = 20) posteriorKL(ltm_cat, item = 30)
## Loading ltm Cat object data(ltm_cat) ## Store example answers setAnswers(ltm_cat) <- c(1,0,1,0,1, rep(NA, 35)) ## Estimate EPV for different unasked items posteriorKL(ltm_cat, item = 10) posteriorKL(ltm_cat, item = 20) posteriorKL(ltm_cat, item = 30)
Calculates the density at theta
of either the normal, Student's t, or uniform distribution.
prior(catObj, theta)
prior(catObj, theta)
catObj |
An object of class |
theta |
A numeric value at which to evaluate the prior |
The priorName
slot of Cat
object needs to be either "UNIFORM"
, "NORMAL"
, or "STUDENT_T"
.
When priorName
slot is "NORMAL"
, the first element of priorParams
slot is the mean,
the second element is the standard deviation.
When priorName
slot is "STUDENT_T"
, the first
element of priorParams
slot is the non-centrality parameters and the second is degrees of freedom.
When priorName
slot is "UNIFORM"
, the elements of the priorParams
slot are the lower and upper bounds,
of the interval, respectively. Note that the "UNIFORM"
is only applicable for the expected a posteriori (EAP) estimation method.
The function prior
returns a numeric consisting of prior value, , given the value
.
This function is to allow users to access the internal functions of the package. During item selection, all calculations are done in compiled C++
code.
This function uses Boost C++
source libraries for the uniform and Student's t
distributions and calls dnorm4
written in C
which is identical to that
of dnorm
in R
.
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil
## Loading ltm Cat object data(ltm_cat) ## Prior calculation for different distributions ltm_cat@priorName <- "NORMAL" ltm_cat@priorParams <- c(0, 1) ## Parameters are mean and standard deviation prior(ltm_cat, theta = 1) ltm_cat@priorName <- "STUDENT_T" ltm_cat@priorParams <- c(1, 3) ## Parameters are non-centrality param and degrees of freedom prior(ltm_cat, theta = 1) ltm_cat@priorName <- "UNIFORM" ltm_cat@priorParams <- c(-1, 1) ## Parameters are lower bound and upper bound of interval prior(ltm_cat, theta = 1)
## Loading ltm Cat object data(ltm_cat) ## Prior calculation for different distributions ltm_cat@priorName <- "NORMAL" ltm_cat@priorParams <- c(0, 1) ## Parameters are mean and standard deviation prior(ltm_cat, theta = 1) ltm_cat@priorName <- "STUDENT_T" ltm_cat@priorParams <- c(1, 3) ## Parameters are non-centrality param and degrees of freedom prior(ltm_cat, theta = 1) ltm_cat@priorName <- "UNIFORM" ltm_cat@priorParams <- c(-1, 1) ## Parameters are lower bound and upper bound of interval prior(ltm_cat, theta = 1)
Calculates the probability of specific responses or the left-cumulative probability of responses to item
conditioned on a respondent's ability ().
probability(catObj, theta, item)
probability(catObj, theta, item)
catObj |
An object of class |
theta |
A numeric or an integer indicating the value for |
item |
An integer indicating the index of the question item |
For the ltm
model, the probability of non-zero response for respondent on item
is
where is respondent
's position on the latent scale of interest,
is item
's discrimination parameter,
and
is item
's difficulty parameter.
For the tpm
model, the probability of non-zero response for respondent on item
is
where is respondent
's position on the latent scale of interest,
is item
's discrimination parameter,
is item
's difficulty parameter, and
is item
's guessing parameter.
For the grm
model, the probability of a response in category or lower for respondent
on item
is
where is respondent
's position on the latent scale of interest,
the
-th element of item
's difficulty parameter,
is discrimination parameter vector for item
. Notice the inequality on the left side and the absence of guessing parameters.
For the gpcm
model, the probability of a response in category for respondent
on item
is
where is respondent
's position on the latent scale of interest,
is the discrimination parameter for item
,
is the difficulty parameter for item
, and
is the category
threshold parameter for item
, with
response options
for item
. For identification purposes
and
. Note that when fitting the model,
the
and
are not distinct, but rather, the difficulty parameters are
=
-
.
When the model
slot of the catObj
is "ltm"
, the function probability
returns a numeric vector of length one representing the probability of observing a non-zero response.
When the model
slot of the catObj
is "tpm"
, the function probability
returns a numeric vector of length one representing the probability of observing a non-zero response.
When the model
slot of the catObj
is "grm"
, the function probability
returns a numeric vector of length k+1, where k is the number of possible responses. The first element will always be zero and the (k+1)th element will always be one. The middle elements are the cumulative probability of observing response k or lower.
When the model
slot of the catObj
is "gpcm"
, the function probability
returns a numeric vector of length k, where k is the number of possible responses. Each number represents the probability of observing response k.
This function is to allow users to access the internal functions of the package. During item selection, all calculations are done in compiled C++
code.
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil
Baker, Frank B. and Seock-Ho Kim. 2004. Item Response Theory: Parameter Estimation Techniques. New York: Marcel Dekker.
Choi, Seung W. and Richard J. Swartz. 2009. “Comparison of CAT Item Selection Criteria for Polytomous Items." Applied Psychological Measurement 33(6):419-440.
Muraki, Eiji. 1992. “A generalized partial credit model: Application of an EM algorithm." ETS Research Report Series 1992(1):1-30.
van der Linden, Wim J. 1998. “Bayesian Item Selection Criteria for Adaptive Testing." Psychometrika 63(2):201-216.
## Loading ltm Cat object ## Probability for Cat object of the ltm model data(ltm_cat) probability(ltm_cat, theta = 1, item = 1) ## Loading tpm Cat object ## Probability for Cat object of the tpm model probability(tpm_cat, theta = 1, item = 1) ## Loading grm Cat object ## Probability for Cat object of the grm model probability(grm_cat, theta = 1, item = 1) ## Loading gpcm Cat object ## Probability for Cat object of the gpcm model probability(gpcm_cat, theta = -3, item = 2)
## Loading ltm Cat object ## Probability for Cat object of the ltm model data(ltm_cat) probability(ltm_cat, theta = 1, item = 1) ## Loading tpm Cat object ## Probability for Cat object of the tpm model probability(tpm_cat, theta = 1, item = 1) ## Loading grm Cat object ## Probability for Cat object of the grm model probability(grm_cat, theta = 1, item = 1) ## Loading gpcm Cat object ## Probability for Cat object of the gpcm model probability(gpcm_cat, theta = -3, item = 2)
Qualtrics AJAX Handler used to implement catSurv functionality in a Qualtrics survey
## S4 method for signature 'character' processAJAX(catObj, item)
## S4 method for signature 'character' processAJAX(catObj, item)
catObj |
An object of class |
item |
An integer indicating the index of the question item |
This function is not intended for researcher use, rather it is a public facing function of the package because it is used by catSurv to integrate computerized adaptive testing into a Qualtrics survey.
Joshua Landman
This function cleans the adaptive inventory responses stored as embedded data in Qualtrics
## S4 method for signature 'character' readQualtrics(catObj, responseID)
## S4 method for signature 'character' readQualtrics(catObj, responseID)
catObj |
Vector containing JSON character representations of the completed Cat objects from Qualtrics survey |
responseID |
Vector containing unique character identifiers for the respondents in the Qualtrics survey |
This function cleans the adaptive inventory responses contained in the Qualtrics survey results. Because different respondents recieve different adaptive inventories, their answers to the battery are not stored as usual as separate columns in the Data & Analysis tab in the Qualtrics toolbar. Rather, the respondents' answers to the adaptive battery are saved in the catObj embedded data object. To access the answers, click "Export & Import", and then "Export Data." In the window that appears, we recommend downloading the data as a .csv file. Then, feed this function the catObj column and the responseID column.
This function returns a data frame containing cleaned adaptive inventory responses.
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil
Cat-class
, ex_qualtrics_results
, ex_qualtrics_results_multiple
data(ex_qualtrics_results) # loads example results cat_vect <- ex_qualtrics_results$catObj[-c(1,2)] # vector of Cat embedded data objects ids <- ex_qualtrics_results$ResponseId[-c(1,2)] # vector of respondent identifiers # clean answer profiles clean_df <- readQualtrics(catObj = cat_vect, responseID = ids) # estimate respondents' positions setEstimation(agree_cat) <- "MAP" estimateThetas(catObj = agree_cat, responses = clean_df)
data(ex_qualtrics_results) # loads example results cat_vect <- ex_qualtrics_results$catObj[-c(1,2)] # vector of Cat embedded data objects ids <- ex_qualtrics_results$ResponseId[-c(1,2)] # vector of respondent identifiers # clean answer profiles clean_df <- readQualtrics(catObj = cat_vect, responseID = ids) # estimate respondents' positions setEstimation(agree_cat) <- "MAP" estimateThetas(catObj = agree_cat, responses = clean_df)
Cat object containing item parameters for graded response model fit with responses to the 20 item Right Wing Authoritarianism inventory
data(rwa_cat)
data(rwa_cat)
An object of class Cat
of length 1.
Cat object containing item parameters for graded response model fit with 2056 response profiles from Lucid, 2519 response profiles from MTurk, and 1423 response profiles collected by YouGov in June 2018. The sample from MTurk was a convenience sample The respondents from YouGov were matched to a sampling frame on gender, age, race, and education.
See Cat-class
for details regarding the Cat object structure.
See grmCat
for details regarding the graded response model.
A normal prior was chosen with mean from the theta estimates from the YouGov sample (.241) and a standard deviation (1) wide enough to envelope the range of estimated theta values across both samples.
Note that due to how the item parameters were estimated, large, positive values indicate "more" of the latent trait.
Response options are:
5 = Strongly agree, 4 = Somewhat agree, 3 = Neither agree nor disagree, 2 = Somewhat disagree, 1 = Strongly disagree
The wording of the question items is:
q1
Our country desperately needs a mighty leader who will do what has to be done to destroy the radical new ways and sinfulness that are ruining us.
q2
Gays and lesbians are just as healthy and moral as anybody else.
q3
It is always better to trust the judgment of the proper authorities in government and religion than to listen to the noisy rabble-rousers in our society who are trying to create doubt in people's minds.
q4
Atheists and others who have rebelled against the established religions are no doubt every bit as good and virtuous as those who attend church regularly.
q5
The only way our country can get through the crisis ahead is to get back to our traditional values, put some tough leaders in power, and silence the troublemakers spreading bad ideas.
q6
There is absolutely nothing wrong with nudist camps.
q7
Our country needs free thinkers who have the courage to defy traditional ways, even if this upsets many people.
q8
Our country will be destroyed someday if we do not smash the perversions eating away at our moral fiber and traditional beliefs.
q9
Everyone should have their own lifestyle, religious beliefs, and sexual preferences, even if it makes them different from everyone else.
q10
The "old-fashioned ways" and the "old-fashioned values" still show the best way to live.
q11
You have to admire those who challenged the law and the majority's view by protesting for women's abortion rights, for animal rights, or to abolish school prayer.
q12
What our country really needs is a strong, determined leader who will crush evil, and take us back to our true path.
q13
Some of the best people in our country are those who are challenging our government, criticizing religion, and ignoring the "normal way things are supposed to be done."
q14
God's laws about abortion, pornography and marriage must be strictly followed before it is too late, and those who break them must be strongly punished.
q15
There are many radical, immoral people in our country today, who are trying to ruin it for their own godless purposes, whom the authorities should put out of action.
q16
A "woman's place" should be wherever she wants to be. The days when women are submissive to their husbands and social conventions belong strictly in the past.
q17
Our country will be great if we honor the ways of our forefathers, do what the authorities tell us to do, and get rid of the "rotten apples" who are ruining everything.
q18
There is no "ONE right way" to live life; everybody has to create their own way.
q19
Homosexuals and feminists should be praised for being brave enough to defy "traditional family values."
q20
This country would work a lot better if certain groups of troublemakers would just shut up and accept their group's traditional place in society.
See https://dataverse.harvard.edu/dataverse/pdsl for the raw YouGov and/or Qualtrics data.
Altemeyer, Bob. Enemies of freedom: Understanding right-wing authoritarianism. Jossey-Bass, 1988.
Cat object containing item parameters for graded response model fit with responses to the 15 item Social Dominance Orientation inventory
data(sdo_cat)
data(sdo_cat)
An object of class Cat
of length 1.
Cat object containing item parameters for graded response model fit with 2042 response profiles from Lucid, 1192 response profiles from MTurk, and 1482 response profiles collected by YouGov in June 2018. The sample from MTurk was a convenience sample The respondents from YouGov were matched to a sampling frame on gender, age, race, and education.
See Cat-class
for details regarding the Cat object structure.
See grmCat
for details regarding the graded response model.
A normal prior was chosen with mean from the theta estimates from the YouGov sample (.19) and a standard deviation (1) wide enough to envelope the range of estimated theta values across both samples.
Note that due to how the item parameters were estimated, large, positive values indicate "more" of the latent trait.
Response options are:
5 = Strongly agree, 4 = Somewhat agree, 3 = Neither agree nor disagree, 2 = Somewhat disagree, 1 = Strongly disagree
The wording of the question items is:
q1
Some groups of people are simply inferior to other groups.
q2
In getting what you want, it is sometimes necessary to use force against other groups.
q3
It's OK if some groups have more of a chance in life than others.
q4
To get ahead in life, it is sometimes necessary to step on other groups.
q5
If certain groups stayed in their place, we would have fewer problems.
q6
It's probably a good thing that certain groups are at the top and other groups are at the bottom.
q7
Inferior groups should stay in their place.
q8
Sometimes other groups must be kept in their place.
q9
It would be good if groups could be equal.
q10
Group equality should be our ideal.
q11
All groups should be given an equal chance in life.
q12
We should do what we can to equalize conditions for different groups.
q13
Increased social equality is beneficial to society.
q14
We would have fewer problems if we treated people more equally.
q15
We should strive to make incomes as equal as possible.
q16
No group should dominate in society.
See https://dataverse.harvard.edu/dataverse/pdsl for the raw YouGov and/or Qualtrics data.
Pratto, F., J. Sidanius, L. M. Stallworth, and B. F. Malle (1994), "Social Dominance Orientation: A Personality Variable Predicting Social and Political Attitudes," Journal of Personality and Social Psychology, 67, 741.
Selects the next item in the question set to be administered to respondent based on the specified selection method.
selectItem(catObj)
selectItem(catObj)
catObj |
An object of class |
Selection approach is specified in the selection
slot of the Cat
object.
The minimum expected posterior variance criterion is used when the selection
slot is "EPV"
. This method calls expectedPV
for each unasked item.
The maximum Fisher's information criterion is used when the selection
slot is "MFI"
. This method calls fisherInf
for each unasked item.
The maximum likelihood weighted information criterion is used when the selection
slot is "MLWI"
. Note that when no questions have been answered, likelihood evaluates to 1. This method involves integration. See Note for more information.
The maximum posterior weighted information criterion is used when the selection
slot is "MPWI"
. Note that when no questions have been answered, likelihood evaluates to 1. This method involves integration. See Note for more information.
The maximum expected information criterion is used when the selection
slot is "MEI"
. This method calls expectedObsInf
for each unasked item. **Not implemented
for three parameter model for binary data.**
The maximum Kullback-Leibler information criterion is used when the selection
slot is "KL"
. This method calls expectedKL
for each unasked item. See expectedKL
for more information.
The maximum likelihood weighted Kullback-Leibler information criterion is used when the selection
slot is "LKL"
. This method calls likelihoodKL
for each unasked item.
The maximum posterior weighted Kullback-Leibler information criterion is used when the selection
slot is "PKL"
. This method calls posteriorKL
for each unasked item.
The maximum Fisher interval information criterion is used when the selection
slot is "MFII"
. This method involves integration. See Note for more information.
The bounds of integration are ,
where
is qnorm(
) times the square root of the Fisher test information and
is specified in the
z
slot of the Cat
object.
A random number generator is used when the selection
slot is "RANDOM"
.
The function selectItem
returns a list with three elements:
estimates
: a data frame with a row for each unasked question and three columns representing
the item index number, the item name, and the item value (calculated by the specified selection method),
and
next_item
: a numeric representing the index of the item that should be asked next.
next_item_name
: a string representing the unique identifier of the item that should be asked next.
This function is to allow users to access the internal functions of the package. During item selection, all calculations are done in compiled C++
code.
This function uses adaptive quadrature methods from the GNU Scientific
Library (GSL) to approximate single-dimensional
integrals with high accuracy. The bounds of integration are determined by the
lowerBound
and upperBound
slots of the Cat
object unless otherwise noted.
The "RANDOM"
item selection criterion uses the package RcppArmadillo
to randomly
choose the next item among unasked questions. RcppArmadillo
provides an exact reproduction
of R's sample
function that can be called from C++.
In the rare instance that item parameters are identical, it may be that that selectItem
must choose
between two items with the same value calculated by the selection criterion. In such an instance, selectItem
will choose the item with the lower question index.
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil
van der Linden, Wim J. 1998. "Bayesian Item Selection Criteria for Adaptive Testing." Psychometrika 63(2):201-216.
Van der Linden, Wim J., and Peter J. Pashley. 2009. "Item Selection and Ability Estimation in Adaptive Testing." Elements of Adaptive Testing. Springer New York, 3-30.
Veldkamp, B.P., 2003. Item Selection in Polytomous CAT. In New Developments in Psychometrics (pp. 207-214). Springer Japan.
estimateTheta
, expectedPV
, fisherInf
## Loading ltm Cat object data(ltm_cat) ## Store example answers setAnswers(ltm_cat) <- c(1,0,1,0,1, rep(NA, 35)) ## Set different selection criterion and choose next item setSelection(ltm_cat) <- "EPV" selectItem(ltm_cat) setSelection(ltm_cat) <- "MFI" selectItem(ltm_cat) setSelection(ltm_cat) <- "MLWI" selectItem(ltm_cat) setSelection(ltm_cat) <- "MPWI" selectItem(ltm_cat) setSelection(ltm_cat) <- "MEI" selectItem(ltm_cat) setSelection(ltm_cat) <- "KL" selectItem(ltm_cat) setSelection(ltm_cat) <- "LKL" selectItem(ltm_cat) setSelection(ltm_cat) <- "PKL" selectItem(ltm_cat) setSelection(ltm_cat) <- "MFII" selectItem(ltm_cat) setSelection(ltm_cat) <- "RANDOM" selectItem(ltm_cat)
## Loading ltm Cat object data(ltm_cat) ## Store example answers setAnswers(ltm_cat) <- c(1,0,1,0,1, rep(NA, 35)) ## Set different selection criterion and choose next item setSelection(ltm_cat) <- "EPV" selectItem(ltm_cat) setSelection(ltm_cat) <- "MFI" selectItem(ltm_cat) setSelection(ltm_cat) <- "MLWI" selectItem(ltm_cat) setSelection(ltm_cat) <- "MPWI" selectItem(ltm_cat) setSelection(ltm_cat) <- "MEI" selectItem(ltm_cat) setSelection(ltm_cat) <- "KL" selectItem(ltm_cat) setSelection(ltm_cat) <- "LKL" selectItem(ltm_cat) setSelection(ltm_cat) <- "PKL" selectItem(ltm_cat) setSelection(ltm_cat) <- "MFII" selectItem(ltm_cat) setSelection(ltm_cat) <- "RANDOM" selectItem(ltm_cat)
Cat
Object SlotsSetter methods to control changes to the slots of a Cat
object.
## S4 replacement method for signature 'Cat' setGuessing(catObj) <- value ## S4 replacement method for signature 'Cat' setDiscrimination(catObj) <- value ## S4 replacement method for signature 'Cat' setDifficulty(catObj) <- value ## S4 replacement method for signature 'Cat' setAnswers(catObj) <- value ## S4 replacement method for signature 'Cat' setIds(catObj) <- value ## S4 replacement method for signature 'Cat' setModel(catObj) <- value ## S4 replacement method for signature 'Cat' setPriorName(catObj) <- value ## S4 replacement method for signature 'Cat' setPriorParams(catObj) <- value ## S4 replacement method for signature 'Cat' setLowerBound(catObj) <- value ## S4 replacement method for signature 'Cat' setUpperBound(catObj) <- value ## S4 replacement method for signature 'Cat' setEstimation(catObj) <- value ## S4 replacement method for signature 'Cat' setEstimationDefault(catObj) <- value ## S4 replacement method for signature 'Cat' setSelection(catObj) <- value ## S4 replacement method for signature 'Cat' setZ(catObj) <- value ## S4 replacement method for signature 'Cat' setLengthThreshold(catObj) <- value ## S4 replacement method for signature 'Cat' setSeThreshold(catObj) <- value ## S4 replacement method for signature 'Cat' setGainThreshold(catObj) <- value ## S4 replacement method for signature 'Cat' setInfoThreshold(catObj) <- value ## S4 replacement method for signature 'Cat' setLengthOverride(catObj) <- value ## S4 replacement method for signature 'Cat' setGainOverride(catObj) <- value
## S4 replacement method for signature 'Cat' setGuessing(catObj) <- value ## S4 replacement method for signature 'Cat' setDiscrimination(catObj) <- value ## S4 replacement method for signature 'Cat' setDifficulty(catObj) <- value ## S4 replacement method for signature 'Cat' setAnswers(catObj) <- value ## S4 replacement method for signature 'Cat' setIds(catObj) <- value ## S4 replacement method for signature 'Cat' setModel(catObj) <- value ## S4 replacement method for signature 'Cat' setPriorName(catObj) <- value ## S4 replacement method for signature 'Cat' setPriorParams(catObj) <- value ## S4 replacement method for signature 'Cat' setLowerBound(catObj) <- value ## S4 replacement method for signature 'Cat' setUpperBound(catObj) <- value ## S4 replacement method for signature 'Cat' setEstimation(catObj) <- value ## S4 replacement method for signature 'Cat' setEstimationDefault(catObj) <- value ## S4 replacement method for signature 'Cat' setSelection(catObj) <- value ## S4 replacement method for signature 'Cat' setZ(catObj) <- value ## S4 replacement method for signature 'Cat' setLengthThreshold(catObj) <- value ## S4 replacement method for signature 'Cat' setSeThreshold(catObj) <- value ## S4 replacement method for signature 'Cat' setGainThreshold(catObj) <- value ## S4 replacement method for signature 'Cat' setInfoThreshold(catObj) <- value ## S4 replacement method for signature 'Cat' setLengthOverride(catObj) <- value ## S4 replacement method for signature 'Cat' setGainOverride(catObj) <- value
catObj |
An object of class |
value |
The new value(s) |
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil
## Loading ltm Cat object data(ltm_cat) ## Setting estimation slot getEstimation(ltm_cat) setEstimation(ltm_cat) <- "MAP" getEstimation(ltm_cat) ## Setting distrimination slot getDiscrimination(ltm_cat) setDiscrimination(ltm_cat) <- rep(1, 40) getDiscrimination(ltm_cat)
## Loading ltm Cat object data(ltm_cat) ## Setting estimation slot getEstimation(ltm_cat) setEstimation(ltm_cat) <- "MAP" getEstimation(ltm_cat) ## Setting distrimination slot getDiscrimination(ltm_cat) setDiscrimination(ltm_cat) <- rep(1, 40) getDiscrimination(ltm_cat)
Takes in a a Cat
object, a set of respondents, and their corresponding theta
values, and calculates the amount of information given an adaptive battery.
simulateFisherInfo(catObjs = list(), theta, responses)
simulateFisherInfo(catObjs = list(), theta, responses)
catObjs |
A list of |
theta |
A vector of numerics representing the true value of theta. |
responses |
A dataframe of answer profiles corresponding to the true values of theta. |
The function takes a Cat
object, theta
, and response profiles.
The user defines the selection type, estimation type, etc. so that the questions can be applied adaptively
These adaptive profiles are then used to calculate the total inforamtion gained for a respondent for all answered
items, conditioned on theta
.
The function simulateFisherInfo
returns a dataframe where each Cat
object corresponds to a column and each respondent corresponds to a row.
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil, Jaerin Kim, Dominique Lockett
Cat-class
, fisherTestInfo
, selectItem
# Load Cat object data(grm_cat) # Simulate respondents respondents <- plyr::adply(.data = matrix(c(-1, 0, 1)), .margins = 1, .id = NULL, .fun = simulateRespondents, cat = grm_cat, n = 10) # A stopping rule (here, a common one) is required grm_cat@lengthThreshold <- 3 # Specify different adaptive inventory procedures grm_MAP <- grm_EAP <- grm_cat grm_MAP@estimation <- "MAP" grm_EAP@estimation <- "EAP" # List of Cat objects grmList <- list(grm_MAP, grm_EAP) # Results fisher_inf_results <- simulateFisherInfo(catObjs = grmList, theta = rep(c(-1, 0, 1), each = 10), responses = respondents)
# Load Cat object data(grm_cat) # Simulate respondents respondents <- plyr::adply(.data = matrix(c(-1, 0, 1)), .margins = 1, .id = NULL, .fun = simulateRespondents, cat = grm_cat, n = 10) # A stopping rule (here, a common one) is required grm_cat@lengthThreshold <- 3 # Specify different adaptive inventory procedures grm_MAP <- grm_EAP <- grm_cat grm_MAP@estimation <- "MAP" grm_EAP@estimation <- "EAP" # List of Cat objects grmList <- list(grm_MAP, grm_EAP) # Results fisher_inf_results <- simulateFisherInfo(catObjs = grmList, theta = rep(c(-1, 0, 1), each = 10), responses = respondents)
The function simulates n
answer profiles given a true value of theta and a battery's item parameters stored in a Cat
object.
## S4 method for signature 'Cat' simulateRespondents(catObj, theta, n)
## S4 method for signature 'Cat' simulateRespondents(catObj, theta, n)
catObj |
An object of class |
theta |
A numeric representing the true position on the latent trait. |
n |
A numeric indicating the number of answer profiles to simulate. |
Function returns a dataframe where each row is a possible answer profile simulated given the provided value of theta
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil
# Load Cat object data(grm_cat) # Simulate 5 response profiles given a theta of 2 sim_resp <- simulateRespondents(catObj = grm_cat, theta = 2, n = 5)
# Load Cat object data(grm_cat) # Simulate 5 response profiles given a theta of 2 sim_resp <- simulateRespondents(catObj = grm_cat, theta = 2, n = 5)
Takes in response profiles from multiple respondents and multiple Cat object (i.e., adaptive battery) specifications and returns a set of theta estimates
simulateThetas(catObjs = list(), responses, return_adaptive = FALSE)
simulateThetas(catObjs = list(), responses, return_adaptive = FALSE)
catObjs |
A list of |
responses |
A matrix of response profiles |
return_adaptive |
Boolean indicating if user wants dataframe containing only answers chosen via the adaptive design for each Cat object in catObjs list. |
The function takes multiple Cat
objects, stored in a list, and generates an estimation for theta
.
The function simulateThetas
returns a dataframe where each Cat
object corresponds to a column and each respondent
corresponds to a row if return_adaptive
is FALSE
, the default.
Optionally, simulateThetas
returns a list containing that dataframe plus dataframes
for the answer profiles simulated via each adaptive design if return_adaptive
is TRUE
.
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil, Jaerin Kim, Dominique Lockett
# Load Cat object data(grm_cat) # Simulate respondents respondents <- plyr::adply(.data = matrix(c(-1, 0, 1)), .margins = 1, .id = NULL, .fun = simulateRespondents, cat = grm_cat, n = 10) # A stopping rule (here, a common one) is required grm_cat@lengthThreshold <- 3 # Specify different adaptive inventory procedures grm_MAP <- grm_EAP <- grm_cat grm_MAP@estimation <- "MAP" grm_EAP@estimation <- "EAP" # List of Cat objects grmList <- list(cat1 = grm_MAP, cat2 = grm_EAP) # Results theta_est_results <- simulateThetas(catObjs = grmList, responses = respondents)
# Load Cat object data(grm_cat) # Simulate respondents respondents <- plyr::adply(.data = matrix(c(-1, 0, 1)), .margins = 1, .id = NULL, .fun = simulateRespondents, cat = grm_cat, n = 10) # A stopping rule (here, a common one) is required grm_cat@lengthThreshold <- 3 # Specify different adaptive inventory procedures grm_MAP <- grm_EAP <- grm_cat grm_MAP@estimation <- "MAP" grm_EAP@estimation <- "EAP" # List of Cat objects grmList <- list(cat1 = grm_MAP, cat2 = grm_EAP) # Results theta_est_results <- simulateThetas(catObjs = grmList, responses = respondents)
Stores answer to item to the
Cat
object's answers
slot.
## S4 method for signature 'Cat' storeAnswer(catObj, item, answer, returnJSON = FALSE) ## S4 method for signature 'character' storeAnswer(catObj, item, answer, returnJSON = FALSE)
## S4 method for signature 'Cat' storeAnswer(catObj, item, answer, returnJSON = FALSE) ## S4 method for signature 'character' storeAnswer(catObj, item, answer, returnJSON = FALSE)
catObj |
An object of class |
item |
An integer indicating the index of the question item |
answer |
The answer to the |
returnJSON |
Boolean indicating whether the updated |
The function storeAnswer
updates the Cat
object, but the updated object must be assigned to an object for the changes to be stored. See Examples.
The function storeAnswer
returns an updated object of class Cat
with the answers
slot reflecting the newly stored answer
to the indicated item
. All previously stored answers remain the same, and all unanswered questions remain NA
.
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil
## Loading ltm Cat object data(ltm_cat) ## Printing current answers slot getAnswers(ltm_cat) ## Storing answer of 0 to item 1 ltm_cat <- storeAnswer(ltm_cat, item = 1, answer = 0) ## Now object reflects answer to item 1 getAnswers(ltm_cat)
## Loading ltm Cat object data(ltm_cat) ## Printing current answers slot getAnswers(ltm_cat) ## Storing answer of 0 to item 1 ltm_cat <- storeAnswer(ltm_cat, item = 1, answer = 0) ## Now object reflects answer to item 1 getAnswers(ltm_cat)
Cat object containing item parameters for graded response model fit with responses to the Conservation (Schwartz Values) inventory
data(sv_conservation_cat)
data(sv_conservation_cat)
An object of class Cat
of length 1.
Cat object containing item parameters for graded response model fit with 8,173 response profiles by the myPersonality Project and 718 response profiles collected by YouGov in June 2018. The sample from myPersonality Project was a convenience sample, and the respondents from YouGov were matched to a sampling frame on gender, age, race, and education.
See Cat-class
for details regarding the Cat object structure.
See grmCat
for details regarding the graded response model.
A normal prior was chosen with mean from the theta estimates from the YouGov sample (.480) and a standard deviation (1.4) wide enough to envelope the range of estimated theta values across both samples.
Note that due to how the item parameters were estimated, large, positive values indicate "more" of the latent trait.
Response options for the Schwartz Values survey are:
0 - means the value is not at all important, it is not relevant as a guiding principle for you. 3 - means the value is important. 6 - means the value is very important.
-1 is for rating any values opposed to the principles that guide you. 7 is for rating a value of supreme importance as a guiding principle in your life; ordinarily there are no more than two such values.
However, for computerized adaptive testing methods, the 0-7 response option range as been shifted to a 1-9 range.
The wording of the question items:
q11
POLITENESS (courtesy, good manners)
q20
SELF-DISCIPLINE (self-restraint, resistance to temptation)
q40
HONORING OF PARENTS AND ELDERS (showing respect)
q47
OBEDIENT (dutiful, meeting obligations)
q18
RESPECT FOR TRADITION (preservation of time-honored customs)
q32
MODERATE (avoiding extremes of feeling & action)
q36
HUMBLE (modest, self-effacing)
q44
ACCEPTING MY PORTION IN LIFE (submitting to life's circumstances)
q51
DEVOUT (holding to religious faith & belief)
q8
SOCIAL ORDER (stability of society)
q13
NATIONAL SECURITY (protection of my nation from enemies)
q15
RECIPROCATION OF FAVORS (avoidance of indebtedness)
q22
FAMILY SECURITY (safety for loved ones)
q56
CLEAN (neat, tidy)
See https://dataverse.harvard.edu/dataverse/pdsl for the raw YouGov and/or Qualtrics data.
Stillwell, David, and Michal Kosinski. 2007. "myPersonality Project." https://sites.google.com/michalkosinski.com/mypersonality
Schwartz, Shalom H. "Universals in the content and structure of values: Theoretical advances and empirical tests in 20 countries." Advances in experimental social psychology. Vol. 25. Academic Press, 1992. 1-65.
Cat model created for the Openness to Change (Schwartz Values) inventory
data(sv_open_cat)
data(sv_open_cat)
An object of class Cat
of length 1.
Cat object containing item parameters for graded response model fit with 8,448 response profiles by myPersonality Project and 718 response profiles collected by YouGov in June 2018. The sample from myPersonality Project was a convenience sample, and the respondents from YouGov were matched to a sampling frame on gender, age, race, and education.
See Cat-class
for details regarding the Cat object structure.
See grmCat
for details regarding the graded response model.
A normal prior was chosen with mean from the theta estimates from the YouGov sample (-3.54) and a standard deviation (1.2) wide enough to envelope the range of estimated theta values across both samples.
Note that due to how the item parameters were estimated, large, positive values indicate "more" of the latent trait.
Response options for the Schwartz Values survey are:
0 - means the value is not at all important, it is not relevant as a guiding principle for you. 3 - means the value is important. 6 - means the value is very important.
-1 is for rating any values opposed to the principles that guide you. 7 is for rating a value of supreme importance as a guiding principle in your life; ordinarily there are no more than two such values.
However, for computerized adaptive testing methods, the 0-7 response option range as been shifted to a 1-9 range.
The wording of the question items:
q5
FREEDOM (freedom of action and thought)
q15
RECIPROCATION OF FAVORS (avoidance of indebtedness)
q31
INDEPENDENT (self-reliant, self-sufficient)
q41
CHOOSING OWN GOALS (selecting own purposes)
q53
CURIOUS (interested in everything, exploring)
q9
AN EXCITING LIFE (stimulating experiences)
q25
A VARIED LIFE (filled with challenge, novelty and change)
q37
DARING (seeking adventure, risk)
q4
PLEASURE (gratification of desires)
q50
ENJOYING LIFE (enjoying food, sex, leisure, etc.)
q57
SELF-INDULGENT (doing pleasant things)
See https://dataverse.harvard.edu/dataverse/pdsl for the raw YouGov and/or Qualtrics data.
Stillwell, David, and Michal Kosinski. 2007. "myPersonality Project." https://sites.google.com/michalkosinski.com/mypersonality
Schwartz, Shalom H. "Universals in the content and structure of values: Theoretical advances and empirical tests in 20 countries." Advances in experimental social psychology. Vol. 25. Academic Press, 1992. 1-65.
Cat object containing item parameters for graded response model fit with responses to the Self-Enhancement(Schwartz Values) inventory
data(sv_selfenhance_cat)
data(sv_selfenhance_cat)
An object of class Cat
of length 1.
Cat object containing item parameters for graded response model fit with 8,497 response profiles by myPersonality Project and 718 response profiles collected by YouGov in June 2018. The sample from myPersonality Project was a convenience sample, and the respondents from YouGov were matched to a sampling frame on gender, age, race, and education.
See Cat-class
for details regarding the Cat object structure.
See grmCat
for details regarding the graded response model.
A normal prior was chosen with mean from the theta estimates from the YouGov sample (-.09) and a standard deviation (1.2) wide enough to envelope the range of estimated theta values across both samples.
Note that due to how the item parameters were estimated, large, positive values indicate "more" of the latent trait.
Response options for the Schwartz Values survey are:
0 - means the value is not at all important, it is not relevant as a guiding principle for you. 3 - means the value is important. 6 - means the value is very important.
-1 is for rating any values opposed to the principles that guide you. 7 is for rating a value of supreme importance as a guiding principle in your life; ordinarily there are no more than two such values.
However, for computerized adaptive testing methods, the 0-7 response option range as been shifted to a 1-9 range.
The wording of the question items:
q4
PLEASURE (gratification of desires)
q50
ENJOYING LIFE (enjoying food, sex, leisure, etc.)
q57
SELF-INDULGENT (doing pleasant things)
q34
AMBITIOUS (hard-working, aspiring)
q39
INFLUENTIAL (having an impact on people and events)
q43
CAPABLE (competent, effective, efficient)
q55
SUCCESSFUL (achieving goals)
q3
SOCIAL POWER (control over others, dominance)
q12
WEALTH (material possessions, money)
q27
AUTHORITY (the right to lead or command)
q46
PRESERVING MY PUBLIC IMAGE (protecting my "face")
See https://dataverse.harvard.edu/dataverse/pdsl for the raw YouGov and/or Qualtrics data.
Stillwell, David, and Michal Kosinski. 2007. "myPersonality Project." https://sites.google.com/michalkosinski.com/mypersonality
Schwartz, Shalom H. "Universals in the content and structure of values: Theoretical advances and empirical tests in 20 countries." Advances in experimental social psychology. Vol. 25. Academic Press, 1992. 1-65.
Cat object containing item parameters for graded response model fit with responses to the Self-Transcendence (Schwartz Values) inventory
data(sv_selftransc_cat)
data(sv_selftransc_cat)
An object of class Cat
of length 1.
Cat object containing item parameters for graded response model fit with 8,415 response profiles by myPersonalit Project and 718 response profiles collected by YouGov in June 2018. The sample from myPersonality Project was a convenience sample, and the respondents from YouGov were matched to a sampling frame on gender, age, race, and education.
See Cat-class
for details regarding the Cat object structure.
See grmCat
for details regarding the graded response model.
A normal prior was chosen with mean from the theta estimates from the YouGov sample (.004) and a standard deviation (1.2) wide enough to envelope the range of estimated theta values across both samples.
Note that due to how the item parameters were estimated, large, positive values indicate "more" of the latent trait.
Response options for the Schwartz Values survey are:
0 - means the value is not at all important, it is not relevant as a guiding principle for you. 3 - means the value is important. 6 - means the value is very important.
-1 is for rating any values opposed to the principles that guide you. 7 is for rating a value of supreme importance as a guiding principle in your life; ordinarily there are no more than two such values.
However, for computerized adaptive testing methods, the 0-7 response option range as been shifted to a 1-9 range.
The wording of the question items:
q1
EQUALITY (equal opportunity for all)
q17
A WORLD AT PEACE (free of war and conflict)
q24
UNITY WITH NATURE (fitting into nature)
q26
WISDOM (a mature understanding of life)
q29
A WORLD OF BEAUTY (beauty of nature and the arts)
q30
SOCIAL JUSTICE (correcting injustice, care for the weak)
q35
BROADMINDED (tolerant of different ideas and beliefs)
q38
PROTECTING THE ENVIRONMENT (preserving nature)
q33
LOYAL (faithful to my friends, group)
q45
HONEST (genuine, sincere)
q49
HELPFUL (working for the welfare of others)
q52
RESPONSIBLE (dependable, reliable)
q54
FORGIVING (willing to pardon others)
See https://dataverse.harvard.edu/dataverse/pdsl for the raw YouGov and/or Qualtrics data.
Stillwell, David, and Michal Kosinski. 2007. "myPersonality Project." https://sites.google.com/michalkosinski.com/mypersonality
Schwartz, Shalom H. "Universals in the content and structure of values: Theoretical advances and empirical tests in 20 countries." Advances in experimental social psychology. Vol. 25. Academic Press, 1992. 1-65.
Cat object containing item parameters for graded response model fit with responses to the 40-item Systemizing Quotient personality inventory
data(systemizing_cat)
data(systemizing_cat)
An object of class Cat
of length 1.
Cat object containing item parameters for graded response model fit with 13,256 response profiles collected by the Open Source Psychometrics Project in 2012, 3050 response profiles collected by Qualtrics in June 2018, and 1500 response profiles collected by YouGov in June 2018. The sample from the Open Source Psychometrics Project was a convenience sample, and the respondents from YouGov were matched to a sampling frame on gender, age, race, and education.
See Cat-class
for details regarding the Cat object structure.
See grmCat
for details regarding the graded response model.
A normal prior was chosen with mean from the theta estimates from the YouGov sample (.033) and a standard deviation (1.4) wide enough to envelope the range of estimated theta values across both samples.
Note that due to how the item parameters were estimated, large, positive values indicate "more" of the latent trait.
Response options are 1=Strongly disagree; 2=Slightly disagree; 3=Slightly agree; 4=Strongly agree
The wording of the question items:
q1
When I listen to a piece of music, I always notice the way it's structured.
q4
I prefer to read non-fiction than fiction.
q5
If I were buying a car, I would want to obtain specific information about its engine capacity.
q6
When I look at a painting, I do not usually think about the technique involved in making it.
q7
If there was a problem with the electrical wiring in my home, I'd be able to fix it myself.
q11
I rarely read articles or webpages about new technology.
q12
I do not enjoy games that involve a high degree of strategy.
q13
I am fascinated by how machines work.
q15
In math, I am intrigued by the rules and patterns governing numbers.
q18
I find it difficult to understand instruction manuals for putting appliances together.
q19
When I look at an animal, I like to know the precise species it belongs to.
q20
If I were buying a computer, I would want to know exact details about its hard drive capacity and processor speed.
q23
When I cook, I do not think about exactly how different methods and ingredients contribute to the final product.
q24
I find it difficult to read and understand maps.
q25
If I had a collection (e.g. CDs, coins, stamps), it would be highly organized.
q26
When I look at a piece of furniture, I do not notice the details of how it was constructed.
q28
When I learn about historical events, I do not focus on exact dates.
q29
When I read the newspaper, I am drawn to tables of information, such as football league scores or stock market indices.
q30
When I learn a language, I become intrigued by its grammatical rules.
q31
I find it difficult to learn my way around a new city.
q32
I do not tend to watch science documentaries on television or read articles about science and nature.
q33
If I were buying a stereo, I would want to know about its precise technical features.
q34
I find it easy to grasp exactly how odds work in betting.
q35
I am not very meticulous when I carry out D.I.Y.
q37
When I look at a building, I am curious about the precise way it was constructed.
q38
When an election is being held, I am not interested in the results for each constituency.
q40
I find it difficult to understand information the bank sends me on different investment and saving systems.
q41
When traveling by train, I often wonder exactly how the rail networks are coordinated.
q42
When I buy a new appliance, I do not read the instruction manual very thoroughly.
q43
If I were buying a camera, I would not look carefully into the quality of the lens.
q44
When I read something, I always notice whether it is grammatically correct.
q45
When I hear the weather forecast, I am not very interested in the meteorological patterns.
q48
When I look at a mountain, I think about how precisely it was formed.
q49
I can easily visualize how the highways in my region link up.
q51
When I'm in a plane, I do not think about the aerodynamics.
q53
When I am walking in the country, I am curious about how the various kinds of trees differ.
q55
I am interested in knowing the path a river takes from its source to the sea.
q56
I do not read legal documents very carefully.
q57
I am not interested in understanding how wireless communication works.
q60
I do not care to know the names of the plants I see.
See https://dataverse.harvard.edu/dataverse/pdsl for the raw YouGov and/or Qualtrics data.
See https://openpsychometrics.org/_rawdata/, maintained by Eric Jorgenson, for the raw Open Source Psychometrics Project site data.
Baron-Cohen, Simon, Jennifer Richler, Dheraj Bisarya, Nhishanth Gurunathan, and Sally Wheelwright. "The systemizing quotient: an investigation of adults with Asperger syndrome or high-functioning autism, and normal sex differences." Philosophical Transactions of the Royal Society of London. Series B: Biological Sciences 358, no. 1430 (2003): 361-374.
Open Source Psychometrics Project. https://openpsychometrics.org/_rawdata/
This function object of class Cat
.
## S4 method for signature 'Cat' toJSONCat(catObj)
## S4 method for signature 'Cat' toJSONCat(catObj)
catObj |
A |
The function toJSONCat
returns a JSON object with list elements corresponding to information stored in the catObj
.
See Cat-class
for required Cat
object slots.
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil
An object of class Cat
created using the tpmCat
function with the first twenty questions of the polknowMT
dataset.
data(tpm_cat)
data(tpm_cat)
An object of class Cat
. See Cat-class
for more details.
## Not run: ## How this Cat object was created data(polknowMT) tpm_cat <- tpmCat(polknowMT[,1:20], quadraturePoints = 100, start.val = "random") ## End(Not run) ## How to load this Cat object for usage data(tpm_cat)
## Not run: ## How this Cat object was created data(polknowMT) tpm_cat <- tpmCat(polknowMT[,1:20], quadraturePoints = 100, start.val = "random") ## End(Not run) ## How to load this Cat object for usage data(tpm_cat)
This function fits Birnbaum's three parameter model for binary data and populates the fitted values for discrimination, difficulty, and guessing parameters to an object of class Cat
.
## S4 method for signature 'data.frame' tpmCat(data, quadraturePoints = 21, ...) ## S4 method for signature 'tpm' tpmCat(data, quadraturePoints = NULL, ...)
## S4 method for signature 'data.frame' tpmCat(data, quadraturePoints = 21, ...) ## S4 method for signature 'tpm' tpmCat(data, quadraturePoints = NULL, ...)
data |
A data frame of manifest variables or an object of class |
quadraturePoints |
A numeric to be passed into the |
... |
arguments to be passed to methods. For more details about the arguments, see |
The data
argument of the function tpmCat
is either a data frame or an object of class tpm
from the ltm
package. If it is a data frame each row represents a respondent and each column represents a question item. If it is an object of the class tpm
, it is output from the tpm
function in the ltm
package.
The quadraturePoints
argument of the function tpmCat
is used only when the data
argument is a data frame. quadraturePoints
is then passed to the tpm
function from the ltm
package when fitting Birnbaum's three parameter model to the data and is used when approximating the value of integrals.
The function tpmCat
returns an object of class Cat
with changes to the following slots:
difficulty
A vector consisting of difficulty parameters for each item.
discrimination
A vector consisting of discrimination parameters for each item.
model
The string "tpm"
, indicating this Cat
object corresponds to Birnbaum's three parameter model.
See Cat-class
for default values of Cat
object slots. See Examples and setters
for example code to change slot values.
In case the Hessian matrix at convergence is not positive definite try to use start.val = "random"
.
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil
Baker, Frank B. and Seock-Ho Kim. 2004. Item Response Theory: Parameter Estimation Techniques. New York: Marcel Dekker.
Birnbaum, Allan. 1968. Some Latent Trait Models and their Use in Inferring an Examinee's Ability. In F. M. Lord and M. R. Novick (Eds.), Statistical Theories of Mental Test Scores, 397-479. Reading, MA: Addison-Wesley.
Rizopoulos, Dimitris. 2006. “ltm: An R Package for Latent Variable Modeling and Item Response Theory Analyses." Journal of Statistical Software 17(5):1-25.
Cat-class
, ltmCat
, polknowMT
, probability
## Creating Cat objects from large datasets is computationally expensive ## Load the Cat object created from the above code data(tpm_cat) ## Slots that have changed from default values getModel(tpm_cat) getDifficulty(tpm_cat) getDiscrimination(tpm_cat) ## Changing slots from default values setEstimation(tpm_cat) <- "MLE" setSelection(tpm_cat) <- "MFI"
## Creating Cat objects from large datasets is computationally expensive ## Load the Cat object created from the above code data(tpm_cat) ## Slots that have changed from default values getModel(tpm_cat) getDifficulty(tpm_cat) getDiscrimination(tpm_cat) ## Changing slots from default values setEstimation(tpm_cat) <- "MLE" setSelection(tpm_cat) <- "MFI"