public class IrmGPCM extends AbstractItemResponseModel
Modifier and Type | Field and Description |
---|---|
protected double |
D |
protected double[] |
proposalStep |
protected double[] |
step |
protected ItemParamPrior[] |
stepPrior |
protected double[] |
stepStdError |
groupId, isFixed, maxCategory, maxWeight, minCategory, minWeight, name, ncat, ncatM1, scoreWeight
Constructor and Description |
---|
IrmGPCM(double discrimination,
double[] step,
double D)
Default constructor
|
Modifier and Type | Method and Description |
---|---|
double |
acceptAllProposalValues()
Proposal values for every item parameter are obtained at each iteration of the estimation routine.
|
double |
addPriorsToLogLikelihood(double ll,
double[] iparam)
Adds prior probabilities to the loglikelihood.
|
double[] |
addPriorsToLogLikelihoodGradient(double[] loglikegrad,
double[] iparam)
Adds log-prior probabilities to the item loglikelihood.
|
double |
cumulativeProbability(double theta,
int category)
Not implemented.
|
double |
derivTheta(double theta)
First derivative of item response model with respect to theta.
|
double |
expectedValue(double theta)
Computes the expected value using parameters stored in the object.
|
double |
getDifficulty()
Gets the item difficulty parameter.
|
double |
getDifficultyStdError()
Gets the item difficulty standard error.
|
double |
getDiscrimination()
Gets item discrimination.
|
double |
getDiscriminationStdError()
Gets the standard error for the item discrimination estimate.
|
double |
getGuessing()
Gets the pseudo-guessing (i.e.
|
double |
getGuessingStdError()
Gets the guessing parameter estimate standard error.
|
double[] |
getItemParameterArray() |
int |
getNumberOfEstimatedParameters()
Does not count the first step because it is fixed to zero
|
int |
getNumberOfParameters()
Counts the first step which is always 0
|
double |
getProposalDifficulty()
A proposal difficulty value is obtained during each iteration of the estimation routine.
|
double |
getScalingConstant() |
double |
getSlipping()
Gets the slipping (i.e.
|
double |
getSlippingStdError()
Gets the slipping parameter estimate standard error.
|
double[] |
getStepParameters()
Polytomous item response models may have step parameters.
|
double[] |
getStepStdError()
Gets that standard errors for each step parameter estimate.
|
double[] |
getThresholdParameters()
Polytomous item response models may use an overall item difficulty parameter and two or more threshold
parameters.
|
double[] |
getThresholdStdError()
Gets the array of standard errors fort eh threshold parameter estimates.
|
IrmType |
getType()
Gets the type of item response model.
|
double[] |
gradient(double theta,
double[] iparam,
int k,
double D)
Gradient of item response model with respect to (wrt) item parameters.
|
double[] |
gradient(double theta,
int category)
Gradient of item response model with respect to (wrt) item parameters.
|
void |
incrementMeanMean(org.apache.commons.math3.stat.descriptive.moment.Mean meanDiscrimination,
org.apache.commons.math3.stat.descriptive.moment.Mean meanDifficulty)
Mean/mean linking coefficients are computed from teh mean item difficulty and mean item discrimination.
|
void |
incrementMeanSigma(org.apache.commons.math3.stat.descriptive.moment.Mean mean,
org.apache.commons.math3.stat.descriptive.moment.StandardDeviation sd)
Mean/sigma linking coefficients are computed from teh mean and standard deviation of item difficulty.
|
double |
itemInformationAt(double theta)
Computes the item information function at theta.
|
double[] |
nonZeroPrior(double[] param)
If the prior density for a parameter is zero, adjust parameter to the nearest non zero value.
|
double |
probability(double theta,
double[] iparam,
int category,
double D)
Computes the probability of responding in category k using item parameters passed to the method using the
iparam argument.
|
double |
probability(double theta,
int category)
Computes probability of a response using parameters stored in the object.
|
void |
scale(double intercept,
double slope)
Computes a linear transformation of item parameters.
|
void |
setDifficulty(double difficulty)
Set difficulty parameter to an existing value.
|
void |
setDifficultyPrior(ItemParamPrior difficultyPrior) |
void |
setDifficultyStdError(double stdError)
Item difficulty standard error may be computed external to the class.
|
void |
setDiscrimination(double discrimination)
Set discrimination parameter to an existing value.
|
void |
setDiscriminationPrior(ItemParamPrior prior) |
void |
setDiscriminationStdError(double stdError)
The standard error may be computed external to the class.
|
void |
setGuessing(double guessing)
Set lower asymptote parameter to an existing value.
|
void |
setGuessingPrior(ItemParamPrior guessingPrior) |
void |
setGuessingStdError(double stdError)
The guessing parameter standard error may be computed external to the class.
|
void |
setProposalDifficulty(double difficulty)
A proposal difficulty value is obtained during each iteration of the estimation routine.
|
void |
setProposalDiscrimination(double discrimination)
Set the proposed discrimination estimate.
|
void |
setProposalGuessing(double guessing)
A proposal guessing parameter value is obtained during each iteration of the estimation routine.
|
void |
setProposalSlipping(double slipping)
A proposal slipping parameter value is obtained during each iteration of the estimation routine.
|
void |
setProposalStepParameters(double[] step) |
void |
setProposalThresholds(double[] thresholds)
Sets the proposed threshold parameters estimates to particular values.
|
void |
setSlipping(double slipping)
Set upper asymptote parameter to an existing value.
|
void |
setSlippingPrior(ItemParamPrior slippingPrior) |
void |
setSlippingStdError(double slipping)
The slipping parameter standard error may be computed external to the class.
|
void |
setStandardErrors(double[] x) |
void |
setStepParameters(double[] step) |
void |
setStepPriorAt(ItemParamPrior prior,
int k) |
void |
setStepStdError(double[] stdError)
Sets the standard error for the step parameter estimates.
|
void |
setThresholdParameters(double[] thresholds)
Sets the threshold parameters to particular values.
|
void |
setThresholdStdError(double[] stdError)
Set the threshold standard errors.
|
java.lang.String |
toString()
Displays the item parameter values and standard errors.
|
double |
tSharpExpectedValue(double theta,
double intercept,
double slope)
Computes the expected value using parameters stored in the object.
|
double |
tSharpProbability(double theta,
int category,
double intercept,
double slope)
Returns the probability of a response with a linear transformation of the parameters.
|
double |
tStarExpectedValue(double theta,
double intercept,
double slope)
Computes the expected value using parameters stored in the object.
|
double |
tStarProbability(double theta,
int category,
double intercept,
double slope)
Returns the probability of a response with a linear transformation of the parameters.
|
defaultScoreWeights, getGroupId, getItemFitStatistic, getItemScoring, getMaxScoreWeight, getMinScoreWeight, getName, getNcat, getScoreWeights, isFixed, setFixed, setGroupId, setItemFitStatistic, setItemScoring, setName, setScoreWeights
protected double D
protected double[] step
protected double[] proposalStep
protected double[] stepStdError
protected ItemParamPrior[] stepPrior
public IrmGPCM(double discrimination, double[] step, double D)
discrimination
- item discrimination parametersstep
- an array of m step parameters. The first step parameter should be fixed to 0.D
- scaling constant tha is either 1 or 1.7 (or 1.712)public double probability(double theta, double[] iparam, int category, double D)
theta
- person ability parameteriparam
- an array of all item parameters. The order is [0] discrimination parameter,
[1:length] array of step parameters.category
- response category for which probability is sought.D
- scaling constant tha is either 1 or 1.7public double probability(double theta, int category)
theta
- person ability parametercategory
- response category for which probability is sought.public double expectedValue(double theta)
theta
- person ability valuepublic double cumulativeProbability(double theta, int category)
theta
- a person ability valuecategory
- response categorypublic double[] gradient(double theta, int category)
theta
- person ability valuecategory
- category for which the gradientAt is sought.public double[] gradient(double theta, double[] iparam, int k, double D)
theta
- person ability valueiparam
- array of item parameters. The order is iparam[0] = discrimination,
iparam[1] = step1 (fixed to zero), iparam[2] = step 2, iparam[3] = step 3, ..., iparam[m+1] = step m.k
- zero based index of the response category i.e. k = 0, 1, 2, ..., m.D
- scaling constant that is either 1 or 1.7public double derivTheta(double theta)
theta
- a person ability value.public double itemInformationAt(double theta)
ItemResponseModel
theta
- person ability value.public double[] nonZeroPrior(double[] param)
ItemResponseModel
public void setDiscriminationPrior(ItemParamPrior prior)
public void setStepPriorAt(ItemParamPrior prior, int k)
public void setDifficultyPrior(ItemParamPrior difficultyPrior)
public void setGuessingPrior(ItemParamPrior guessingPrior)
public void setSlippingPrior(ItemParamPrior slippingPrior)
public double addPriorsToLogLikelihood(double ll, double[] iparam)
ItemResponseModel
public double[] addPriorsToLogLikelihoodGradient(double[] loglikegrad, double[] iparam)
ItemResponseModel
MarginalMaximumLikelihoodEstimation
.public void incrementMeanSigma(org.apache.commons.math3.stat.descriptive.moment.Mean mean, org.apache.commons.math3.stat.descriptive.moment.StandardDeviation sd)
ItemResponseModel
mean
- item difficulty mean.sd
- item difficulty standard deviation.public void incrementMeanMean(org.apache.commons.math3.stat.descriptive.moment.Mean meanDiscrimination, org.apache.commons.math3.stat.descriptive.moment.Mean meanDifficulty)
ItemResponseModel
meanDiscrimination
- item discrimination mean.meanDifficulty
- item difficulty mean.public void scale(double intercept, double slope)
intercept
- intercept transformation coefficient.slope
- slope transformation coefficient.public double tStarProbability(double theta, int category, double intercept, double slope)
theta
- examinee proficiency parametercategory
- item responseintercept
- intercept coefficient of linear transformationslope
- slope (i.e. scale) parameter of the linear transformationpublic double tStarExpectedValue(double theta, double intercept, double slope)
theta
- person ability value.intercept
- intercept linking coefficient.slope
- slope linking coefficient.public double tSharpProbability(double theta, int category, double intercept, double slope)
theta
- examinee proficiency valuecategory
- item responseintercept
- linking coefficient for interceptslope
- linking coefficient for slopepublic double tSharpExpectedValue(double theta, double intercept, double slope)
theta
- examinee proficiency valueintercept
- linking coefficient for interceptslope
- linking coefficient for slopepublic double[] getItemParameterArray()
public void setStandardErrors(double[] x)
public IrmType getType()
ItemResponseModel
public int getNumberOfParameters()
public int getNumberOfEstimatedParameters()
public double getScalingConstant()
public double getDifficulty()
ItemResponseModel
public void setDifficulty(double difficulty)
ItemResponseModel
ItemResponseModel.setProposalDifficulty(double)
.public double getProposalDifficulty()
ItemResponseModel
public void setProposalDifficulty(double difficulty)
ItemResponseModel
difficulty
- proposed item difficulty value.public double getDifficultyStdError()
ItemResponseModel
public void setDifficultyStdError(double stdError)
ItemResponseModel
stdError
- item difficulty standard error.public double getDiscrimination()
ItemResponseModel
public void setDiscrimination(double discrimination)
ItemResponseModel
ItemResponseModel.setProposalDiscrimination(double)
.public void setProposalDiscrimination(double discrimination)
ItemResponseModel
discrimination
- proposed item discrimination value.public double getDiscriminationStdError()
ItemResponseModel
public void setDiscriminationStdError(double stdError)
ItemResponseModel
stdError
- item discrimination standard error.public double getGuessing()
ItemResponseModel
public void setGuessing(double guessing)
ItemResponseModel
ItemResponseModel.setProposalGuessing(double)
.public void setProposalGuessing(double guessing)
ItemResponseModel
guessing
- proposed guessing parameter estimate.public double getGuessingStdError()
ItemResponseModel
public void setGuessingStdError(double stdError)
ItemResponseModel
stdError
- standard error for the guessing parameter estimate.public void setSlipping(double slipping)
ItemResponseModel
ItemResponseModel.setProposalSlipping(double)
.public void setProposalSlipping(double slipping)
ItemResponseModel
slipping
- proposed slipping parameter estimate.public void setSlippingStdError(double slipping)
ItemResponseModel
slipping
- standard error for the slipping parameter estimate.public double getSlipping()
ItemResponseModel
public double getSlippingStdError()
ItemResponseModel
public double[] getStepParameters()
ItemResponseModel
public void setStepParameters(double[] step)
public void setProposalStepParameters(double[] step)
public double[] getStepStdError()
ItemResponseModel
public void setStepStdError(double[] stdError)
ItemResponseModel
stdError
- an array of standard errors for the step parameters.public double[] getThresholdParameters()
ItemResponseModel
public void setThresholdParameters(double[] thresholds)
ItemResponseModel
ItemResponseModel.setFixed(boolean)
.thresholds
- array of threshold parameters.public void setProposalThresholds(double[] thresholds)
ItemResponseModel
ItemResponseModel.setFixed(boolean)
.thresholds
- array of proposed threshold parameter estimates.public double[] getThresholdStdError()
ItemResponseModel
public void setThresholdStdError(double[] stdError)
ItemResponseModel
stdError
- an array of standard errors for the threshold paramter estimates.public double acceptAllProposalValues()
ItemResponseModel
public java.lang.String toString()
toString
in class java.lang.Object