⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mcmcirtkdrob.rd

📁 使用R语言的马尔科夫链蒙特卡洛模拟(MCMC)源代码程序。
💻 RD
📖 第 1 页 / 共 2 页
字号:
    \eqn{(K+1) \times items}{(K+1) x items}.}    \item{k0}{\eqn{\delta_0}{delta0} is constrained to lie in the interval    between 0 and \code{k0}.}  \item{k1}{\eqn{\delta_1}{delta1} is constrained to lie in the interval    between 0 and \code{k1}.}  \item{c0}{Parameter governing the prior for    \eqn{\delta_0}{delta0}. \eqn{\delta_0}{delta0} divided by \code{k0} is    assumed to be follow a beta distribution with first parameter    \code{c0}.}  \item{d0}{Parameter governing the prior for    \eqn{\delta_0}{delta0}. \eqn{\delta_0}{delta0} divided by \code{k0} is    assumed to be follow a beta distribution with second parameter    \code{d0}.}  \item{c1}{Parameter governing the prior for    \eqn{\delta_1}{delta1}. \eqn{\delta_1}{delta1} divided by \code{k1} is    assumed to be follow a beta distribution with first parameter    \code{c1}.}  \item{d1}{Parameter governing the prior for    \eqn{\delta_1}{delta1}. \eqn{\delta_1}{delta1} divided by \code{k1} is    assumed to be follow a beta distribution with second parameter    \code{d1}.}    \item{store.item}{A switch that determines whether or not to    store the item parameters for posterior analysis.     \emph{NOTE: This typically takes an enormous amount of memory, so      should only be used if the chain is thinned heavily, or for      applications with a small number of items}.  By default, the    item parameters are not stored.}     \item{store.ability}{A switch that determines whether or not to store    the subject abilities for posterior analysis.  By default, the    item parameters are all stored.}  \item{drop.constant.items}{A switch that determines whether or not        items that have no variation	should be deleted before fitting the model. Default = TRUE.}      \item{...}{further arguments to be passed}       }\value{   An mcmc object that contains the posterior sample.  This    object can be summarized by functions provided by the coda package.}\details{  \code{MCMCirtKdRob} simulates from the posterior using  the slice sampling algorithm of Neal (2003).  The simulation proper is done in  compiled C++ code to maximize efficiency.  Please consult the  coda documentation for a comprehensive list of functions that  can be used to analyze the posterior sample.      The model takes the following form.  We assume that each  subject has an subject ability (ideal point) denoted  \eqn{\theta_j}{theta_j} \eqn{(K \times 1)}{(K x 1)},  and that each item has a scalar difficulty  parameter \eqn{\alpha_i}{alpha_i} and discrimination parameter  \eqn{\beta_i}{beta_i} \eqn{(K \times 1)}{(K x 1)}.  The observed choice by subject  \eqn{j}{j} on item \eqn{i}{i} is the observed data matrix which  is \eqn{(I \times J)}{(I * J)}.  The probability that subject \eqn{j}{j} answers item \eqn{i}{i}  correctly is assumed to be:  \deqn{\pi_{ij} = \delta_0 + (1 - \delta_0 - \delta_1)    /(1+\exp(\alpha_i - \beta_i \theta_j))}{pi_{ij} =    delta0 + (1 - delta0 - delta1)  / (1 + exp(alpha_i - beta_i * theta_j))}  This model was discussed in Bafumi et al. (2005).     We assume the following priors.  For the subject abilities (ideal points)  we assume independent standard Normal priors:  \deqn{\theta_{j,k} \sim \mathcal{N}(0,1)}{theta_j,k ~ N(0, 1)}  These cannot be changed by the user.  For each item parameter, we assume independent Normal priors:  \deqn{\left[\alpha_i, \beta_i \right]' \sim \mathcal{N}_{(K+1)}   (b_{0,i},B_{0,i})}{[alpha_i beta_i]' ~ N_(K+1) (b_0,i, B_0,i)}  Where \eqn{B_{0,i}}{B_0,i} is a diagonal matrix.  One can specify a separate prior mean and precision  for each item parameter. We also assume \eqn{\delta_0 / k_0 \sim    \mathcal{B}eta(c_0, d_0)}{delta0/k0 ~ Beta(c0, d0)} and  \eqn{\delta_1 / k_1 \sim    \mathcal{B}eta(c_1, d_1)}{delta1/k1 ~ Beta(c1, d1)}.     The model is identified by constraints on the item parameters and / or  ability parameters. See Rivers (2004) for a discussion of  identification of IRT models.      As is the case with all measurement models, make sure that you have plenty  of free memory, especially when storing the item parameters.}\references{   James H. Albert. 1992. ``Bayesian Estimation of Normal Ogive Item Response    Curves Using Gibbs Sampling." \emph{Journal of Educational Statistics}.     17: 251-269.   Joseph Bafumi, Andrew Gelman, David K. Park, and Noah   Kaplan. 2005. ``Practical Issues in Implementing and Understanding   Bayesian Ideal Point Estimation.'' \emph{Political Analysis}.       Joshua Clinton, Simon Jackman, and Douglas Rivers. 2004. ``The Statistical    Analysis of Roll Call Data."  \emph{American Political Science Review}.   98: 355-370.      Simon Jackman. 2001. ``Multidimensional Analysis of Roll Call Data   via Bayesian Simulation.'' \emph{Political Analysis.} 9: 227-241.      Valen E. Johnson and James H. Albert. 1999. \emph{Ordinal Data Modeling}.    Springer: New York.   Daniel Pemstein, Kevin M. Quinn, and Andrew D. Martin.  2007.     \emph{Scythe Statistical Library 1.0.} \url{http://scythe.wustl.edu}.   Radford Neal. 2003. ``Slice Sampling'' (with discussion). \emph{Annals of   Statistics}, 31: 705-767.      Martyn Plummer, Nicky Best, Kate Cowles, and Karen Vines. 2002.   \emph{Output Analysis and Diagnostics for MCMC (CODA)}.   \url{http://www-fis.iarc.fr/coda/}.         Douglas Rivers.  2004.  ``Identification of Multidimensional Item-Response   Models."  Stanford University, typescript.}\examples{   \dontrun{   ## Court example with ability (ideal point) and   ##  item (case) constraints   data(SupremeCourt)   post1 <- MCMCirtKdRob(t(SupremeCourt), dimensions=1,                   burnin=500, mcmc=5000, thin=1,                   B0=.25, store.item=TRUE, store.ability=TRUE,                   ability.constraints=list("Thomas"=list(1,"+"),                   "Stevens"=list(1,-4)),                   item.constraints=list("1"=list(2,"-")),                   verbose=50)   plot(post1)   summary(post1)   ## Senate example with ability (ideal point) constraints   data(Senate)   namestring <- as.character(Senate$member)   namestring[78] <- "CHAFEE1"   namestring[79] <- "CHAFEE2"   namestring[59] <- "SMITH.NH"   namestring[74] <- "SMITH.OR"   rownames(Senate) <- namestring   post2 <- MCMCirtKdRob(Senate[,6:677], dimensions=1,                         burnin=1000, mcmc=5000, thin=1,                         ability.constraints=list("KENNEDY"=list(1,-4),                                  "HELMS"=list(1, 4), "ASHCROFT"=list(1,"+"),                                  "BOXER"=list(1,"-"), "KERRY"=list(1,"-"),                                  "HATCH"=list(1,"+")),                         B0=0.1, store.ability=TRUE, store.item=FALSE,                         verbose=5, k0=0.15, k1=0.15,                         delta0.start=0.13, delta1.start=0.13)   plot(post2)   summary(post2)   }}\keyword{models}\seealso{\code{\link[coda]{plot.mcmc}},\code{\link[coda]{summary.mcmc}},\code{\link[MCMCpack]{MCMCirt1d}}, \code{\link[MCMCpack]{MCMCirtKd}}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -