surp.fit | R Documentation |
This function is called by function smooth.surp()
and computes the
penalized verstion of the objective function value, its derivative vector
and the second derivative matrix, as well as their unpenalized versions.
Also returned are alternative fitting objects: the residual matrix,
the root-mean-square of the matrix fit, and the entropy value.
surp.fit(Bvec, surpList)
Bvec |
The K by M-1 parameter matrix defining the fit to the data in row-wise column vector format for use with function lnsrch(). |
surpList |
A list object containing objects M, binctr, Sbin, wtvec, Kmat, Zmat and Phimat. |
A named list of class surpFd
with these members:
PENSSE |
value of the penalized fitting criterion. |
DPENSSE |
gradient of the penalized fitting criterion. |
D2PENSSE |
hessian of the fitting criterion. |
SSE |
value of the error sum of squares. |
DSSE |
gradient of the error sum of squares. |
D2SSE |
hessian of the error sum of squares. |
DvecSmatDvecB |
cross derivative DvecSmatDvecX times DvecXmatDvecB of the surprisal curve and the basis coordinates. |
Rmat |
residual matrix for the fit to the surprisal matrix. |
RMSE |
root-mean-squared scalar fit value. |
Entropy |
entropy of the fit to the data. |
Juan Li and James Ramsay
Ramsay, J. O., Li J. and Wiberg, M. (2020) Full information optimal scoring. Journal of Educational and Behavioral Statistics, 45, 297-315.
Ramsay, J. O., Li J. and Wiberg, M. (2020) Better rating scale scores with information-based psychometrics. Psych, 2, 347-360.
eval.surp
,
smooth.surp
,
Sbinsmth
# Assemble the objects in the list arguments Bmat and surpList
SfdList1 <- Quant_13B_problem_parmList$SfdList[[1]]
Bmat <- SfdList1$Sfd$coef
binctr <- Quant_13B_problem_parmList$binctr
M <- SfdList1$M
Sbasis <- SfdList1$Sfd$basis
Zmat <- SfdList1$Zmat
Sbin <- SfdList1$Sbin
Phimat <- fda::eval.basis(binctr, Sbasis)
Snbasis <- Sbasis$nbasis
Kmat <- matrix(0,Snbasis,Snbasis)
wtvec <- NULL
Bvec <- matrix(Bmat, Snbasis*(M-1),1,byrow=TRUE)
# display coefficient matrix
print(round(Bmat,2))
# set up argument surpList
surpList <- list(binctr=binctr, Sbin=Sbin, wtvec=wtvec,
Kmat=Kmat, Zmat=Zmat, Phimat=Phimat, M=M)
# run surp.fit
result <- surp.fit(Bvec, surpList)
print(paste("Error sum of squares =",round(result$SSE,3)))
print(paste("Gradient norm =",round(norm(result$DSSE),5)))
print("Entropy of item = at bin centres")
print(round(result$Entropy,3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.