Home
Bazan, JL – Bayesian modeling user manual
Contents
1. Binary Regression Item Response Theory Ei pk 1 1 1 1 0 0 o 0 0 o 0 0 11 4 This will open the dialog box Binary Regression Data Binary Regression Da ta 5 Afterward select the dependent variable and covariates variable you want In this case y and x respectively Click and drag the variables Also you must to indicate if will use all the data or only a part of them considering the options in Cases In the example select All Binary Regression Data ME 12 6 Then click Models This will open the dialog box Binary Regression Models Here you must to select the models that will be used in this example only select the model skew logit and do click in OK Binary Regression E x Symmetric Links 4 Logit Probit cAssymetric Links Cloglog Power Logit Scobit fv Skew Logit 5Skew Probit cos BBB Standard 7 Two type of files are generated corresponding for the selected models and for data In this case Skew Logit Model and Binary Regression Data Both files are readable in WinBUGS or OpenBUGS 13 BayesianModeling File Edit Models Help 3 B LE Skew Logit Model ee IH cm c Pp Li E Binary Regression Item Response Theory Skew Logit Hodel model I for i in 1 n t m i lt beta 1 berta z x i muz i m i tdelta sigqma y i z3 1 dlogis muz i 1 IT lo 1 4 1 up y i 1 V i dno
2. However for most of the models presented here there is no program that generates codes for WinBUGS or OpenBUGS This is facilitated using BayesianModeling The IRT models implemented in BayesianModeling classified according to its links are 32 e Symmetric logistic 1L 2L 3L probit 1P 2P 3P e Asymmetric LPE 1LPE 2LPE 3LPE RLPE 1RLPE 2RLPE 3RLPE skew probit 1SP 2SP All codes for IRT models are established considering the likelihood function presented here and considering the priors suggested with the exception of the skew probit IRT models which use an augmented likelihood function version In BayesianModeling when a specific code is generated for a IRT model also References to justify the model and the choices of priors are showed 2 4 Application Math data set The program BayesianModeling generates the syntaxes necessary for the Bayesian estimation of several models of the Item Response Theory for posterior use in WinBUGS see Spiegelhalter et al 1996 or OpenBUGS Spiegelhalter et al 2007 program using diverse MCMC methods For this only is necessary to have a file of text with the data generated from any statistics program or from Excel In each column usually appear the names of the items in the first line As an example consider a data set of 14 items from a Mathematical test developed by the Unity of Measurement of the Educative Quality of Peru for the National Evaluation of the sixth degree
3. I 7 a mo 0 ms c mi Ag Where is a pdf of normal distribution and Til 7a 73 ral correspond to the prior distributions of item parameters a bj c and respectively In the special case of size of small samples we suggested the use of the following prior specification a HN pa 07 with ua 1 and o 0 5 E a 1 1126 and V a 0 3747 where H N correspond the positive normal or Half normal distribution b N py 07 with y 0 and e 2 E b 0 and V b 2 e Beta 5 17 E c 0 227 V c 0 0076 For LPE and RLPE models A gamma 0 25 0 25 E A 1 V A 4 j E 1 6 For Ogive skew normal model 6 Unif 1 1 where 1 lt 6 lt land A Bayesian Inference in IRT models is facilitated with the use of different methods MCMC implemented in WinBUGS or OpenBUGS software An introduction to MCMC methods is given in Gilks Richardson and Spiegelhalter 1996 For more details about the use of these softwares for Bayesian Inference we suggest the book of Congdon 2005 Congdon 2010 and Ntzoufras 2009 For traditional IRT models Bugs codes are available by example in Curtis 2010 Fox 2010 Bazan Valdivieso and Calder n 2010 Also Bayesian Inference for some traditional IRT models using R package MCMCpack Martin Quinn and Park 2011 and Matlab package IRTuno Sheng 2008a IRTmu2no Sheng 2008b IRTm2noHA Sheng 2010 are available
4. 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 Item Response Data txt y 1 y1 2 y 3 y 4 vy 5 v 6 yvi 7 y 8 y 9 y y 13 y 14 1 1 1 6 In the data file select the list of the variables that are placed in the first row and click load data a WinBUGS14 Te eee ee TOT RA 21 Skew Probit 25P Model bit E r xl VA Specification Tool AXI lo 1 e 50 lo 2 lt 0 Zs y O N delta V 4m l1 delt check model e up 1 lt 0 up 2 lt 50 f Zs y 1 N delta Vtm 1 delta mu c mean theta l du sd theta compile num af chains fi Joadinits for chain EE gemmis data list n 131 1513 load your data in other file Inits list a c 1 0 1 0 0 b c 0 0 0 0 0 delta c 0 0 0 0 OD theta c 0 5 0 F 0 5 0 5 0 5 0 5 0 0 5 0 5 0 5 0 5 0 41 7 In the dialogue box Specification tool indicate the number of chains that want to generate in the text box num of chains Once specified the number of chains to generate in this example 1 chain do click compile In the left corner below has to appear model compiled LE File Tools Edit Attributes Info Model Inference Options Doodle Jump Map Text Window Help Skew Probit 25P Model bct i XI 83 Specification Tool j discrimination check model joad data a j dnorm 1 2 1 0 t diff
5. 2009 In Binary Regression models there is consensus about the prior specification for regression coefficients thus is assumed f N 0 0 for j 1 k with o to be large and this case is considered c 1000 In relation with the shape parameter associated with the link for Scobit and Power logit models is assumed gamma 1 1 E A 1 V A 1 and for skew probit models Unif 1 1 where 1 lt land 73 In addition is assumed independent priors as 1 8 0 J 636 With 7 r2 as indicated above Bayesian Inference is facilitated with the use of different MCMC methods implemented in WinBUGS or OpenBUGS software using a minimum programming For more details about the use of these software for Bayesian Inference and usual Binary regression models we suggest the book of Congdon 2005 Congdon 2010 and Ntzoufras 2009 An introduction to MCMC methods is given in Gilks Richardson and Spiegelhalter 1996 Also Bayesian Inference for some traditional Binary models considering R packages as arm bayesm DPpackage LaplacesDemon MCMCpack are available However for most of the models presented here there is no program that generates codes for WinBUGS or OpenBUGS with exception of BRMUW Bazan 2010 a previous version of this program in Spanish In contrast BUGS codes for all Binary regression models presented here are facilitated using BayesianModeling The Binary regression models imp
6. p 29 z u Where t 0 en a PC it represents the distribution accumulated of a c normal distribution bivariate with parameters H 1 0 and Q OM and A VI 2 This links were proposed by Bazan Bolfarine y Branco 2006 and 2010 and as especial cases of this general formulation the implemented links in the BayesianModeling are the following e If 4 0 1 4 A A obtains the asymmetric probit link proposed in Chen et al 1999 named as CDS skew probit e If 1 0 1 A obtain the asymmetric probit link proposed by Baz n Branco and Bolfarine 2006 named as BBB skew probit 1 28 T j A A i e If w 532 A with 6 EST obtain the standard asymmetric probit link Baz n Bolfarine y Branco 2006 y 2010 named here as Standard skew probit In these three links is the shape parameter that controls the asymmetry so we have for negative values positive of has negative asymmetry positive These three models can see also as belonging to the kind of mixes of eliptic distributions proposed by Basu and Mukhopadhyay 2000 given by 2 F F f 0 00 gt HC v dG v Where G is the cdf of a variable in 0 00 gt and H is an eliptic distribution For instance the CDS skew probit considers a kind of mixes of normal where the measure of mix is the positive normal distribution with density function given by g x 2 x x gt 0 with being the function of d
7. 525 0 5 0 5 0 2 0 5 0 5 0 5 0 5 0 25 U 2 0 5 0 5 0 5 0 5 0 5 0 5 0 2 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 Bazan J Bolfarine H Leandro A R 2006 Sensi prior specification for the probit normal IRT model a aq Item Response Data bxt 1 vI 2 ylI 3 vI 4 I gt y I 6 y 13 v 14 Cf initial values generated model initialized I IL me REESE REESE PHRASES 9 Click Model Update R WinBUGS14 File Tools Edit Attributes Info Model Inference Skew Probit 25P Model bd data Monitor Met list n 131 k 14 load your data in oth Save State Inits list a c 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 b c 0 0 0 0 0 0 U0 0 0 0 0 0 0 0 0 0 delta c u Mi 0 0 0 0 0 0 0 0 0 0 0 0 10 This will open the dialogue box Update tool In the text box updates enter the number of iterations that requires and then click update E S Update Tool fon refresh f100 ae am iteration 200 owerrelax V adapting 43 While the program does the iterations in the left corner below will appear the following message model is updating until the iterations finish when the following message 4000 updates took 61 s appears 11 Then should specify that parameters need the program save for this go to Inference gt Samples which will open the dialogue bo
8. Jump Map Text Window Help Skew Probit 25P ModeLtct F25P model for i in 1 n for 7 an 1 k m i j a j theta i b j miz 1 j m i j delta j V 1i j Zs i j dnorm muz i j preczs j I lo y i j 1 up y i j 1 V i j dnorm 0 1 1 0 H fabilities priors for i in l n theta i dnorm O0 1 I fitems priors for j in 1 k usual priors Bazan et al 2007 f difficuly intercept with prior similar to bilog 4 Item Response Data txt vI 1 vI 21 v 3 vI 31 vE 51 yL vyp 7 v 8 yr 3 vf 10 vr 11 y 12 v 13 y 14 E wu dk ot p up wu p up cp ww a 2 Having activated the window of Skew Probit 2SP Model txt click Model gt Specification File Tools Edit Attributes Info Model Inference Options Specification Skew Probit 25P Model txt F25P Update 1 Monitor Met model for i in 1 n 4 Save State for in irk t AS m 1 j a j the MEER muz i j lt m i j Script 3 This will open the dialogue box Specification Tool 39 p Specification Tool check model load data compile num of chains load mits for chain mH gen Inite 4 Select the model highlighting the word model and click check model In the left corner below has to appear model is syntactically correct that indicates that the syntax of the model has been properly formulated IE WinBUGS14 File Tools Edit Attributes Info Model Inference Opt
9. dE O 1 T i e the file called MathData dat See section 2 5 1 and the syntax of the model generated in BayesianModeling will have to copy only the syntax of the model In the example below implement the 2SP model 45 model for i in 1 n for J in ERE wia lt a thera lab 7 muz i j lt m i jJ delta j V i jJ Zs i j dnorm muz i j preczs jl I lo y i jl ll upe y i j1 1 Vp pr dnorm 0 1 I 0 tabilities priors for i in 1 n 4 theta i dnorm 0 1 items priors for J in 1 k 4 usual priors Bazan et al 2006 difficulty intercept with prior similar to bilog b jJj dnorm 0 0 5 discrimination a j dnorm 1 2 I 0 difficulty centred in zero belg lt bal mean LT Bazan et al 2006 delta j dunif 1 1 preczs j lt 1 1 pow delta j 2 lambda j delta j sqrt preczs jl lo 1 50 lo 2 lt 0 Zs y 0 N delta V m 1 delta 2 I 50 0 up 1 0 up 2 lt 50 Zs y 1 N delta V m 1 delta 2 I 0 50 mu lt mean thetal du lt sd theta data list n 131 k 14 load your data in other file TAES Ix spo Oy Le LO EO OL 0s DONG La Ue O docto D 05 0s DODDO 0 050070 00 00 20 delts0 050 0 270 50 07 05 05050700040 0 070 ERR Pen 053 Ds 3 Ue SD DU 7 0 UU Ds O DUO D Dy Us OF Os S Og Os a Ong Os O OD RE Dio a Deo ETP TE Uv Uu eU meo et eg uper bu vo Dig s D D Oe 5 104 Og Og 0 5 07 0540 255 NSK 0 940 934 0 O Oy O eoa 02 OS Ut DO UD Dp Eon Us D
10. in load data 18 54 winbuGsi4 2 Skew Logit Modeltxt JM xt 3 Specification Toal Skew Logit Model model A rs tm for i in 1 n A num of chains m i lt beta 1 beta 2 x i A muz i lt m i delta sigma V i z3 i dlogis muz i 1 I loly i 1 upl y il 1 Teach nits for chain ra V i dnorm 0 1 I 0 gen init for 3 in 1 k I beta j dnorm 0 0 1 0E 3 H delta dunif 1 1 lambdaz delta sqrt 1 pow delta 2 sigmac 1 sqrt l pow delta 2 lo 1 58 16 2 0 up 1 0 up 2 50 Inits list beta c 0 0 0 0 delta 0 5 Data List n 481 k 2 4 zs Binary Regression Data bxt 1 1 65807 l 1 6507 1 1 68907 1 1 6507 1 1 6907 1 1 6807 o 1 6907 The dialogue box Specification tool specifies the number of chains that want to generate in the box of text num of chains Once specified the number of chains to generate in this example 1 chain do click in compile In the left corner below has to appear model compiled 19 A WinBUGS14 E Skew Logit Model tet Skew Logit Model model I for i in l in I m i lt beta 1 beta 2 x 1 muz i lt m i delta sigma V i z5 i dlog s muz i 1 1 1o0 y 11 1 up y 1 1 V i dnorm 0 1 I 0 H gen inits for j in l k I beta j dnorm 0 0 1 0E 3 delta dunif 1 1 lambdacx delta sqrt l pow delta 2 sigmac 1 sqrt l pow delta 2
11. lo 1 50 lo 2 lt 0 up 1 z 0 up z2 z 50 num of chains load inits Inits list beta c 0 0 0 0 delta 0 5 Data list n 481 k 2 amp Binary Regression Data txt v x 1 31 6507 1 31 6807 1 1 65807 1 31 6807 1 31 6507 1 1 4907 1 Select the line under Inits in the file of the model and do click in load inits Then do click in gen inits This generates the initial values for the Bayesian Estimation In the left corner below has to appear initial values generated model initialized 20 EE WinBUGS14 File Tools Edit Attributes Info Model Inference Options E ei Skew Logit Model txct Skew Logit Model model for i in lin i1 m i lt beta 1 beta 2 x i muz i m i delta sigqma V i zs i dlogis muz i 1 I lo y i 1 upl y i 1 V i dnorm 0 1 I 0 H for j in l k I beta j dnorm 0 0 1 0E 3 H delta dunif 1 1 lambdacx delta sqrt 1 pow delta 2 sigmac l1 sqrt l pow delta 2 lo 1 lt 50 lo 2 0 up 1 0 up 2 lt 350 Inits HEER beta c 0 0 0 0 delta 0 5 Data list n 481 9 2 Binary Regression Data bdt v x 5907 5907 5907 6907 5907 5907 65807 9 Do click in Model Update m WinBUGS14 Skew Logit Model model for i in iin 1 Save State m i lt beta l muz 1 lt m i delt zs i dlogis muz i V i
12. of 1998 which were applied to a sample of 131 students of sixth degree of high socioeconomic level These data have been used in Bazan Branco and Bolfarine 2006 and Bazan Bolfarine and Leandro 2006 The released items are a sampling from a test that appears published in the following link In the table appears the identification corresponding to the number of item with the number in the UMEQ test Number of item of Math data 11213141516171819110 11 12 13 14 33 Number ofitem inthe UMEQ tet 1 8 9 1 2 13 21 5 5 7730 2 16 The data file can be found in the file zip of the program and has the following structure IQ 102 EQS 204 IOS ALOG 107 AE EZ Ao dhe i dl O l T O dag O O il 1 1 1 al 1 il is O 1 ii i 1 O 1 O O i O 1 1 As an example of application we consider an IRT model with asymmetric link in this case we consider the skew normal ogive model with parameters of difficulty and of discrimination this is a two parameter skew probit IRT model 2SP Yili n Bernoulli pi pa P Y 1 0a ni Bon Mis Aj Mij 050 bj 1 131 1 14 where A gt 0 is a parameter of penalty and sy denote the skew normal cdf 2 5 Use of the BayesianModeling We described the use of the BayesianModeling to implements the 2SP IRT model to the data of MathData dat described in the previous section For more details of this application review Baz n Branco and Bolfarine 2006 2
13. 05 aj bj B may where 5 is the cdf of the logistic distribution indexed by the parameter A gt 0 and evaluated in m For LPE model Fj L m i and for RLPE model Pee L mi Depending that function of distribution specifies will have 2LPE or 2RLPE IRT models In the first case this characterize by Film 1 1 es IA And the second case by mi 14e 7v These correspond to the cdf of the Scobit distribution and Burr of type II respectively 30 Note that Fi m 4 1 Fi m or Fo m 4 1 Flm and F y Fo are asymmetric but it holds that F5 mi Fi mi Or Fi Mij 1 Fa mis In both models can also interpret like a parameter of penalty or bonus of similar way to the case of the model of skew normal ogive model given by Baz n Branco and Bolfarine 2006 More details of this model can review in Bolfarine y Baz n 2010 Particular cases and extensions considering one parameter or three parameters are possible Thus ILPE IRLPE 3LPE and 3RLPE are another IRT models implemented in BayesianModeling 2 3 Bayesian estimation in IRT Considering the distribution Bernoulli for the response variable the likelihood function for IRT model in the three parameter IRT model is given by n k L a b A 4 y E 7 as b GO Fy fa i b ey i 1 j l Where F a 0 b c is the cdf of an asymmetric distribution indexed by the parameter A assoc
14. 5 1 Generate the syntax of the model 1 Go to File gt Open 34 2 BayesianModeling Pa New Ctrl N Open Ctri A Save Ctrl G Save as Ctrl Q hud M ath Data 3 d at Recent Escritorio k Ma Files of type Archivo de Datos TET 3 Click Item Response Theory 35 BayesianModeling ip File Edit Models Help adl qe Em Bt r Binary Regression Item Response Theory go Item Response Theor LJ bl E 12 FAMILUS MathData be Iro1 I02 103 104 105 I 1 o 1 115 1 1 1 1 D H p ope p js a ps ps ps pa e pas H o Ap H pop op H po ak ja ops Es ope op ba p 4 This will open the dialogue box Item Response Data Item Response Data X Variables Variables Items Cases C Al C Less than C More than C Between and Models Cancel 5 Then select the items that will be used As well as to indicate if will use all the data or only a part of them 36 In our case will select all the variables as items and then click in All Item Response Data 6 Then click in Models to open the dialogue box Item Response Theory Here have to select the models that will be used in this example only select the 2SP model and click OK 37 7 This generates two data files the file with the syntax of the model chosen in WinBUGS Skew Probit 2SP Model and anoth
15. BayesianModeling User Manual Version 1 0 December 201 I Jorge Luis Baz n PhD Department of Sciences Pontifical Catholic University of Peru email jlbazan pucp edu pe Home Page http argos pucp edu pe jlbazan Index Page Introduction 3 1 Binary Regression D 1 1 Binary Regression Models 9 1 2 Binary Regression with Asymmetric Links 5 1 3 Bayesian Inference in Binary Regression 8 1 4 Application Beetles data set 9 1 5 Use of the BayesianModeling 10 1 5 1 Generate the syntax of the model 11 1 5 2 Bayesian estimation using WinBUGS or OpenBugs 15 1 5 3 Bayesian estimation using WinBUGS or OpenBugs in R 22 2 Item Response Theory 26 2 1 Item Response Theory Models 27 2 2 IRT models with asymmetric links 29 2 3 Bayesian Inference in IRT 31 2 4 Application Math data set 33 2 5 Use of the BayesianModeling 34 2 5 1 Generate the syntax of the model 35 2 5 2 Bayesian Estimation using WinBUGS or OpenBugs 38 2 5 3 Bayesian Estimation using WinBUGS or OpenBugs in R 45 3 References 50 Introduction BayesianModeling is a java software development tool to generate syntax of several models of Binary Regression and Item Response Theory under a Bayesian approach using Markov chain Monte Carlo MCMC methods Subsequently the syntax can be executed in the programs OpenBUGS Spiegelhalter Thomas Best Lunn 2007 WinBUGS Spiegelhalter Thomas Best Lunn 2003 or in R program R Development Core Team 2004
16. UGS the latter makes use of function openbugs and requires the CRAN package BRugs In addition because of the large number of parameters in IRT models execution may be delayed 49 References Albert J 2009 Bayesian Computation with R Springer Verlag Basu S Mukhopadhyay S 2000 Binary response regression with normal scale Mixtures links In DK Dey SK Ghosh BK Mallick eds Generalized Linear Models A Bayesian Perspective New York Marcel Dekker Bazan JL 2010 Manual de uso de BRMUW Version 1 0 Software Departamento de Ciencias PUCP URL http argos pucp edu pe jlbazan download ManualdeusoBRMUW pdf Bazan JL Branco MD Bolfarine H 2006 A skew item response model Bayesian Analysis 1 861 892 Bazan JL Bolfarine H Branco MD 2010 A framework for skew probit links in Binary regression Communications in Statistics Theory and Methods 39 678 697 Bazan JL Bolfarine H Branco MD 2006 A generalized skew probit class link for binary regression Technical report RT MAE 2006 05 Department of Statistics University of Sao Paulo URL http argos pucp edu pe jlbazan download gspversion14 pdf Bazan JL Bolfarine H Leandro AR 2006 Sensitivity analysis of prior specification for the probit normal IRT model an empirical study Estadistica Journal of the Inter American Statistical Institute 58 170 171 17 42 URL http argos pucp edu pe jlbazan download bazane
17. as burn in program is the program that will be used to implement the Bayesian inference n burnin is the number of iterations that will be discharged as burn in Then the following command implements the Bayesian estimation and the simulations are stored in the object out ODD e bugs data inits parameters to save c a p delta model File Fr MILUS modelirt exe nichsrnsel n cters24000 n burnin 4000 program WinBUGS 6 If type out in the line of commands of R obtain a summary of the simulation gt out Infere nce for Bugs model at F MILUS modelirtctxt fit using WinBUGS 1 chains each with 24000 iterations first 4000 discarded n thin 20 n sims 1000 iterations saved mean sd 2 058 25 50 15 91 99 a 1 DOS Dez QUNM Ds mE 06 1 0 a 2 dad OZ is 0 Gul OZ 0 4 06 a 3 DO Diez Ved O33 UD 0 46 00 a 4 D Des 0 3 0 6 0 28 Lel 15 6 a S ga Qr Dl ES 0 4 0 6 Ls a 6 OSS 042 0 0 Yina DRESS 0 4 0 7 ey Ug 0 3 DS 0 6 OS Lg L a 8 PG O25 OS Duc a9 Led Ler a 9 Dez Died Du Dub OZ 0785 eS a 10 0 4 0 2 aed isa 0 4 0 6 DENS a 11 ded PES 94 6 dos Lo Date 2 4 a 12 Deb De O20 Dod QS 0 4 Ded a 13 0 4 0 2 Ocak OS 0 4 0 256 0 9 a 14 DA Des CeO Oe 0 4 0 6 Jed 48 Pu DL ID lene eZ o aim O20 p 9 0 4 x UR S au Ds 0 6 00 b 3 0 0 0 4 20 0 4 O20 05 Ds b 4 Ls 10 6 ul Saye piled pe iso bip medo 025 clics 1 4 cred 00 S pred b 6 Qu3 Did DES sed OP 036 dl ca BETY SL OG Qc Se 16 ga ee 95
18. b 8 skes QUO e Spa 1 4 O 052 519 cO ed vun ze zx n 0 4 om E 3 IP JUS usd 1 4 LO M 00 SA SE GT 543 BB xe Ein 040 la AEA 0 4 0 4 0 4 0 0 0 4 OS 1 0 b 13 0 9 Qu SO Pl LS 0 Gud b 14 pap re O PES 2 4 dug Luo Eu urs delta 1 DE 07 5 oes 0 4 O20 OD dled delta 2 Sol 025 c OU Oise ol DSZ Oo delta 3 Do DS cog 0 4 Os D 0 4 Du delta 4 ile Go 509 PES sOy Oe 2 ames de lea gt OL Qu cU OES A a O23 079 delta 6 Os DS NS 0 4 0 9 0 4 Le delta 7 SIL Ung e D agi m OS 09 delta 8 Dd Tu pa N OZ Osa 09 delta 9 rull 1055 OS 0 4 e ud QS ONES delta 10 e D Oe Ud S509 529 052 ONES gs9 delta 11 Su DU cu O VED Ol D eg delta 12 Da OS cu xi eo 050 0 4 D e delta l3 EO 05 0 4 DENS 0 4 LEO delta 14 Lo ES KONE pact DENS O29 deviance 3095 9 66 3 3703 9 3914 0 3365 0 3904 0 3963 0 DIC info using the rule pb Dbar Dhat pD gt Sa Vand DIG gt 3905 7 DIC is an estimate of expected predictive error lower deviance is better Note that for now we just asked for monitoring the parameters a b and delta But if it requires could ask for 0 7 Finally for more details in the command bugs can consult Help writing in the line of commands bugs Note You can specify Bug directory The directory that contains the WinBUGS executable If the global option R2WinBUGS bugs directory is not NULL it will be used as the default Also you can specify the program to use either winbugs WinBUGS or openbugs OpenB
19. considered a ICC given by F x L x where x L x 7 gt denotes the cdf of a logistic variable This induces in the language of the et generalized linear models to a logit link function This model is known as the logistic model and empathizing the link is named here as 2L model Particular cases The IRT model admits diverse formulations which depend basically of as it considers the ICC In its simplest version could take a 1 and consider an ICC of the form P Y 1 0i b F 0 b This is called of one parameter IRT model and when probit or logit links are considered we have 1P or 1L IRT model respectively In a general way we could consider an ICC of the form P Y 1 wi 5 03 6 cj 1 c F a 8i b Where the parameter c 0 1 indicates the probability that very low ability individuals will get this item j correct by chance and F is the distribution function This is known as the three parameter IRT model If c 0 the model is reduced to the two parameters IRT model Again when probit or logit links are considered we have 3P or 3L IRT model respectively The IRT model with logit link The IRT model with logit link or logistic model is probably the model more used in IRT The version of three parameters for this model establishes that the probability that the person 7 hit the item 7 is given by 1 P Yiz 110 03 Dj 6 6j 17 6 ay 28 where usually is ass
20. ct reason why I desire to express my gratefulness Among them to the colleagues Oscar Millones Christian Bayes and Miluska Osorio for theirs aid during the revision of the present version of the application and the user guide I also am thankful to Martin Iberico Margareth Sequeiros and Pedro Curich for the computational support in some of the stages of the project Thank you very much to my family for its patience and support Installation instructions can be found in the included README file BayesianModeling can run smoothly in any operating systems such as Windows Mac OS Linux in which the Java Virtual Machine and Perl are supported Java Java SE Runtime Environment 1 6 or later Perl Perl v5 10 or later RAM 512M The BayesianModeling package was introduced at the II Conbratri 2011 http 187 45 202 74 conbratri 1 Binary Regression 1 1 A Binary Regression Models Consider y yi 2 Yn a nx 1 vector of n independent dichotomous random variables assuming that y I with probability p and y 0 with probability 1 p and X 1 Tin a k x 1 vector of covariates where z may equals 1 corresponding to an intercept i 1 n Moreover X denotes the n x k design matrix with rows z and B B1 Pk is a k x 1 vector of regression coefficients Binary regression models assume that p F n i 1 n where F denotes a cumulative distribution function cdf The inverse function F is t
21. dnorm 0 1 Y Update Maornitor Met y P geniis F LE p compile a load inits num of chains 1 ra forehain l up v i 1 21 10 This will open the dialogue box Update tool In the text box Update Tool type the number of iterations that are required and afterwards does click in update Updates 1000 refresh 100 lo update thin 1 iteration over relax Iv adapting 11 Then you must to specify the parameters to be monitored for this go to Inference gt Samples which will open the dialogue box Sample monitor tool In the text box node type the name of the parameters and then do click in set this has to be done for each parameter In the example is beta and delta pia Sample Monitor Tool 3 xj node beta chains fi ho a percentiles i 1000000 D a clear E trace history 30 stats coda uentis bar diag auta cor 95 density 12 Repeat the step 10 as necessary to generate more iterations In addition by considering the dialogue box Sample Monitor Tool you can calculate posterior statistics of the parameters doing click in stats button obtain a trace plots of the chains doing click in history button an estimation of the posterior density doing click in density button and other more statistics of the chains can be calculated using this dialogue box If you want to save the actual values for further analysis click on coda on the Sample Moni
22. ensity of the standard normal Another interesting case when mixture of the positive normal with H the cumulative distribution function of the logistic distribution it is considered as skew logistic or Skew logit see Chen Dey and Shao 2001 that also is implemented in BayesianModeling 1 3 Bayesian Estimation in Binary Regression Considering the distribution Bernoulli for the variable response the likelihood function is given by L 8 0 y X Fo o 1 Febr Where F is the cdf of an asymmetric distribution indexed by the shape parameter 0 associated with the asymmetric link For Power Logit and Scobit 0 A For skew probit and skew logit 0 6 The logit probit cloglog scobit and power logit links consider this likelihood function however skew probit and skew logit links consider other versions of the likelihood function considering augmented versions that are discussed in the specific references of these models In the Bayesian Inference the parameters of interest are assumed like random variables and so is need establishes a priori probability distributions that reflects our previous knowledge of its behavior Combining the likelihood function and the priori distributions we can obtain the posteriori distributions of the parameters of interest In the present work we consider priors that they are vague proper priors with known distributions but variance big as well as independence between priors see Nzoufras
23. er file with the syntax of the data Item Response Data S Bayes Modeling File Edit Models Help Ph q Pr Binary Regression Hos HE pons Theory o Skew Probit 25P Model fi in l n I for 3 in lik i1 m 1 j a j theta i b jl muz i j c m i j delta j VI i j 25 1 dnorm muz 1 3 preczs 3 l 1lofvy 1 731 1 up y V i1 j dnorm 0 1 I 0 fabilities priors for i in 1 n i1 theta 1 dnorm 0 1 y 1 y 2 31 3 yEL 41 vt 5 v0 6 L7 v1 8 E21 v 10 yv 11 v 12 vt 1 1 O 1 1 1 1 1 1 kB rm O88 8 S C O d g ho H 5 H BR CD Ff C o fed B O Rh B RE C sp d pa Boc o a C ho g B d pa aa d g Boc o 5 od Rh R C p O d d pa B C o To d d g pe o p 2 BayesianModeling generates two files one that contains the model of Binary regression with the link selected and another file that contains the data set Both files in format txt have to be saved to be opened in the program WinBUGS or OpenBUGS to do the appropriate analysis of Bayesian inference 2 5 2 Bayesian Estimation using WinBUGS or OpenBUGS For a appropriate analysis of Bayesian inference of the model generated make the following 38 1 Open the files with the syntax of the model and of the data previously generated by the BayesianModeling in WinBUGS or OpenBUGS PA WinBUGS14 Fie Tools Edit Attributes Info Model Inference Options Doodle
24. iated with the asymmetric ICC The Logistic logit Normal ogive probit LPE and RLPE consider this likelihood function however skew probit IRT consider other version of the likelihood function considering augmented version that is discussed in the specific references of this model In WinBUGS the implementation of this procedure is not direct because it requires of a correct specification of the indicator variables Main details can find in Bazan Branco and Bolfarine 2006 In the Bayesian Inference the parameters of interest are assumed like random variables and so is need establishes a priori probability distributions that reflects our previous knowledge of its behavior Combining the likelihood function and the priori distributions we can obtain the posteriori distributions of the parameters of interest In the present work we consider priors that they are vague proper priors with known distributions but variance big as well as independence between priors see Nzoufras 2009 In traditional 31 IRT models priors are discussed in Albert 1992 Johnson and Albert 1999 Patz and Junker 1999 Sahu 2002 Rupp Dey and Zumbo 2004 Bazan Bolfarine and Leandro 2006 Fox 2010 In IRT models there is consensus about the prior specification for latent trait thus is assumed 0 N 0 1 for i 1 n However about item parameter there is several proposals Here is assumed independent priors as n k 7 0 a b c A I 0
25. iculy centred in zero BELE So BE cesar sample mum of chains 1 Bazan et al 2006 delta j dunif 1 1 preczs j 1 1 pow delta j 2 load inits for chain hn B lambda j z delta j l sqrt preczs jl i ixi lo 1 lt 50 lo 2 lt 0 Z5 y 0 N delta V m 1 delt up 1 lt 0 up 2 lt 50 Zs y 1 N delta Vm 1 delta mu lt mean theta du lt sd thetal gen inits data list n 131 k 14 load your data in other file Inits Item Response Data bxt inode compiled 5 8 Select the line under Inits in the file of the model and click load inits Then click gen inits This generates the initial values for the Bayesian estimation In the left corner below has to appears initial values generated model initialized 42 HE File Tools Edit Attributes Info Model Inference Options Doodle Jump Text Help di skew Probit 25 Model BEE A check model load data data list n 131 1 11 load your data in other file num of chains 1 for chain fi E Inits BEER c 1 0 1 0 0 b c 0 0 0 0 0 0 0 5 0 F F F delta c 0 0 O theta c 0 5 B B B LU ISIBISIH IDID 5 B 5H 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 d 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 05 2 0 25 0 5 0 5 0 5 0 5 0 5 0 25 0 0 5 0 5 D0 5 0 5 0 5 0 5 0 5 0 5 D U m 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 525 0 5 0 2 0 2 0 5 0
26. ions New York Springer Fu ZH Tao J Shi NZ 2009 Bayesian estimation in the multidimensional three parameter logistic model Journal of Statistical Computation and Simulation 79 819 835 Gilks W Richardson S Spiegelhalter D 1996 Markov Chain Monte Carlo in Practice Chapman amp Hall London 51 Gilks WR Wild P 1992 Adaptive rejection sampling for Gibbs sampling Applied Statistics 41 337 348 Johnson V Albert J 1999 Ordinal Data Modeling New York Springer Verlag Lord FM 1952 A theory of test scores New York Psychometric Society Martin AD Quinn KM Park JH 2011 MCMCpack Markov Chain Monte Carlo in R Journal of Statistical Software 42 9 1 21 Nagler J 1994 Scobit An alternative estimator to Logit and Probit American Journal of Political Science 38 1 230 255 Ntzoufras I 2009 Bayesian Modeling Using WinBugs Wiley Series in Computational Statistics Hoboken USA Patz RJ Junker BW 1999 A straightforward approach to Markov Chain Monte Carlo methods for item response models Journal of Educactional and Behavioral Statistics 24 146 178 Prentice RL 1976 A Generalization of the probit and logit methods for Dose response curves Biometrika 32 4 761 768 R Development Core Team 2004 R A Language and Environment for Statistical Computing R Foundation for Statistical Computing Vienna Austria URL http www R project o
27. ions Doodle Jump Map Text Window Help Skew Probit 25P Model txt P fel ES 8 Specification Toal de E check model load data node lg for i in 1 n I compile num of chains f for j in 1 k I m i j lt a j theta i b j muz i j lt m i j delta j V i j aad inite for chain h B Zs i j dnorm muz i j preczs j I lo vIi j 1 o V i j dnorm 0 1 1 0 gen mite fabilities priors for i in itn I theta i dnorm 0 1 items priors tor j 1m 1 k t t usual priors Bazan et al 2007 t difficuly intercept with prior Item Response Data txt v 1 vI 2 v 3 vE 4 vf 5 YL v 7 vL 81 yL 98 y 13 vI 14 model is syntactically correct Pe _ _ _______ a AAA 5 Select in the Skew Probit 25P Model txt file the line under data and do click load data In the left corner below appears data loaded indicating that the data have been loaded 40 PA WinBUGS14 File Tools Edit Attributes Info Model Inference Options Doodle we lh Text Window Help lo 1 50 lo 2 lt 0 Zs y 0 N delta V m 1 delt up 1 0 up 2 lt 50 Zs y 1 N delta V m 1 delta mu lt mean theta du lt sd theta omite forchan P Ej data list n 131 k 14 gen tits load your data in other file Inits list a c 1 0 0 b c 0 0 0 delta c 0 0 0 theta c 0 r 0 5 0 5 0 5 0 dd Vo o o e Mitel e Medi 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5
28. is in F MILUS beetles txt datos read table F MILUS beetles txt header TRUE sep na strings NA dec strip white TRUE 23 3 Create a list that contain the data and the information of the size of the data set typing n nrow datos k ncol datos data lt c as list datos list n n k k 4 Create a program that generates the initials values typing inits lt function list beta rep 0 k delta 0 5 5 Finally with the command bugs implements the Bayesian estimation Here will explain in brief the syntax of the command Bugs parameters to save is a vector with the names of the parameters of the model which simulations we wish to save model file is the direction where finds the file of the model n chains is the number of chains to be generated n iter is the number of the total iterations of each chain n burnin is the number of iterations to be discharged as burn in program is the program that will be used to implement the Bayesian estimation With the following command the Bayesian estimation is implemented and the simulations are saved in the object out out lt bugs data inits parameters to save c beta lambda model file P MILUS modelbr txt n chains 1 Miter 44000 n burnin 4000 program WinBUGS 6 If we type out in the line of commands of the R a summary of the simulation is obtained 24 gt out Inference for Bugs model at G MILUS modelbr txt fit u
29. it Modeltxt Skew Logit Model model for i in itn I m i beta 1 beta 2 x i muz i lt m i delta 3igma V i zs i Alogis muz i 1 I lo vy i 1 up v i 1 V i dnorm 0 1 1 0 1 for J in iik I beta j dnorm 0 0 1 0E 3 1 f delta dunif 1 1 lambdac delta sqrt l pow delta 2 sigma 1 sqrt l1 pow delta z lo 1 lt 50 lo 2 0 up il lt 0 up 2 50 Binary Regression Data bxt 15 2 Click in Model gt Specification having active the window of the file Skew Logit Model txt PA WinBUGS14 File Tools Edit Attributes Info Model Inference Options Doodle Map Text Skew Logit Model tct S Spence ane Skew Logit Model Update Monitor Met model I for i in lin i gave Stale m i lt betafi 21 1 Seed muz i lt m i delt z3 i dlogis muz i V i dnorm 0 1 I7 Script 1 up y i 1 3 This will open the dialogue box Specification Tool me Specification Tool X check model load data compile num of chains load mit for chain ia gen mite 4 Select the word model highlighting it with the cursor and do click in check model In the below left corner has to appear model is syntactically correct that indicates the syntax of the model is properly formulated 16 WinBUGS14 check model load data for i in 1 n I E d num of chains 1 m i lt beta 1 beta 2 x i py
30. l muz 1 lt m il delta sigma Y i TR m r q zs i dlogis mz 1 1 1 1 10 v 1 1 1 up v 11 1 loadinits for chain r B V i dnorm 0 1 1 0 l l I gen imite for in irk 4 beta j dnorm 0 0 1 0E 3 H delta dunif 1 1 lambda delta sqrt l pow delta z2 sigmac 1 sqrt l pow delta 2 lo 1 lt 50 lo 2 lt 0 up 1 lt 0 up 2 50 Binary Regression Data bdt del is syntactically correct 4T 10 5 Select in the file of the model the line under Data list and do click in load data In the below left corner appears data loaded indicating that the data have been read 17 WinBUG514 File Tools Edit Attributes Info Model Inference Options Doodle Map Text Window Help EN oe sas crm ni 4 Skew Logit Modeltxt loj Skew Logit Model model for i in 1 n I m i lt beta l beta 2 x i muaz i m i tdelta sigma y i zs i dlogis muz i 1 I lo y i 1 up y i 1 V i dnorm 0 1 I 0 I gen inits for fj un l k I beta j dnorm 0 0 1 0E 3 delta dunif 1 1 lambdac delta sqrt l pow delta 2 sigma 1 sqrt l pow delta 2 lo 1 58 lo z2 8 up 1 0 up 2 50 Inits list beta c 0 0 0 0 delta 0 5 Data list nm 481 k 2 4 Binary Regression Data txt y 1 x 6907 6907 6907 6907 6907 6907 Es Specification Tool 6 In the data file Binary Regression Data txt select the names of the variables x and y and do click
31. lemented in BayesianModeling classified according to its links are e Symmetric probit logit e Asymmetric cloglog scobit power logit skew logit skew probit CDS BBB and standard All codes for Binary regression models are established considering the likelihood function presented here and considering the priors suggested with the exception of the skew logit and skew probit models which use an augmented likelihood function version In BayesianModeling when a specific code is generated for a Binary regression model also References to justify the model and the choices of priors are showed 1 4 Application Beetles data set The BayesianModeling program generates the necessary syntax for the Bayesian estimation of several models of binary regression in the WinBUGS program see Spiegelhalter et al 1996 or OpenBUGS Spiegelhalter et al 2007 using diverse methods MCMC For this only is necessary to have a text file with the data generated from any statistics program or from Excel In the columns normally appear the names of the variables in the first line and in the first column should appear the response variable As example consider the group of data Beetles logistic probit and extreme value models of the WinBUGS The group of data is denominated as beetles txt that is found in this downloads of the program The variables used in beetles txt are y 1 if the beetle died after 5 hours of being exposed to carbon disulfide 0
32. lo 2 0 Zs y 0 N delta V m 1 delta 2 I 50 0 up 1 lt 0 up 2 lt 50 Zs y 1 N delta V m 1 delta 2 I 0 50 mu lt mean thetal du lt sd thetal Then to implement the Bayesian estimation in R will follow the next steps to use the library R2WinBUGS Remember to install it previously 1 In R download the library R2WinBUGS with the following command library R2WinBUGS 2 Read the data the MathData dat file for this example is placed in the folder F MILUS MathData dat datos lt read table F MILUS MathData dat header TRUE sep na strings NA dec strip white TRUE 3 Create a list that contain the data and the information of the number of persons and items using the following command n nrow datos k ncol datos data lt list y as matrix datos n 131 k 14 47 4 Create a program that will generate initial values inits lt function list a rep 1 k b rep 0 k delta rep 0 k theta rep n 0 5 5 Finally the command bugs implements the Bayesian estimation Here will explain in brief the syntax of the command bugs parameters to save is a vector with the names of the parameters of the model which simulations want to store model file is the name of the file where the model is saved n chains is the number of chains that will be generated n iter is the number of total iterations of each chain n burnin is the number of iterations that will be discharged
33. otherwise x concentration of carbon disulfide that a beetle was exposed The data file has the following structure y X 1 ke i 120007 1 Lada Y As an application example we consider the following model y Bernoulli r m F ni ni Pi fox 1 2 481 Where F corresponds to the skew logit link see Chen Dey and Shao 2001 More details in Bazan Bolfarine y Branco 2010 1 5 Use of BayesianModeling 1 5 1 Use of the BayesianModeling to generate the syntax of the model We will use the BayesianModeling to implement the model of binary regression with skew logit link for the data beetles txt described in the previous section To start using the program you must Open your data file before of choose the models for them 1 Go to File gt Open BayesianModeling Edit Models Help New Ctri N Open Ctri A Close Save Ctrl G Save aS Exit Ctrl Q 10 2 Navigate to the directory that contains your dataset files Select the data set file you want work The program can open data file in ASCII format csv txt and dat Lookin Datos A 19 MathData dat Recent Escritorio Lk Documents A E i Equipo x Red File name Files of type Archivo de Datos csv dat txt 3 To select the model you want Click on Binary Regression button or Go to Models gt Binary Regression BayesianModeling rn e File Edit Models Help PH B I
34. re the ICC has its maximum slope Values as a lt 0 are not expected The parametric space for the parameter b is arbitrary and to be the same as 0 than by the usual take values in the line real Another parameterization very common for the predictor linear latent is m a 0 b This parametrizaci n is very important from the computational point of view since it facilitates the computational time of convergence When it used this parameterization b the previous parameter of difficulty can be obtained doing in the obtained result a Generally this parameterization is preferred in the Bayesian Inference and also in BayesianModeling In The Two Parameter IRT model the conjoint density of the vector of multivariate responses Y Y Y y with Y Yj1 Yip given the vector of latent variables 01 0 and the vector of parameters of the items n 7 7 can be written as fY 8 m JIJ Fon 9 1 F mij t px uEET The proof of this result is direct by considering the latent conditional independence The first IRT binary model was introduced by Lord 1952 with an ICC given by F x x being the cdf of a standard normal variable This model is known in the psychometric literature as normal ogive model which corresponds in the context of Generalize Linear Models for a probit link function and empathizing this can be named as 2P model 24 On the other hand Birbaum 1968
35. rg Rupp A Dey DK Zumbo B 2004 To Bayes or Not to Bayes from Whether to When Applications of Bayesian Methodology to Item Response Modeling Structural Equations Modeling 11 424 451 Sahu SK 2002 Bayesian estimation and model choice in item response models Journal Statistical Computing Simulation 72 217 232 Samejima F 2000 Logistic positive exponent family of models Virtue of asymmetric item characteristic curves Psychometrika 65 3 319 335 22 Sheng Y 2008a Markov Chain Monte Carlo Estimation of Normal Ogive IRT Models in MATLAB Journal of Statistical Software 25 8 1 15 Sheng Y 2008b A MATLAB Package for Markov Chain Monte Carlo with a Multi unidimensional IRT Model Journal of Statistical Software 28 10 1 19 Sheng Y 2010 Bayesian Estimation of MIRT Models with General and Specific Latent Traits in MATLAB Journal of Statistical Software 34 3 1 27 Spiegelhalter DJ Thomas A Best NG Gilks WR 1996 BUGS 0 5 examples Vol 1 Version i Cambridge UK University of Cambridge Spiegelhalter DJ Thomas A Best NG Lunn D 2003 WinBUGS Version 1 4 Users Manual MRC Biostatistics Unit Cambridge URL http www mrc bsu cam ac uk bugs Spiegelhalter DJ Thomas A Best NG Lunn D 2007 OpenBUGS User Manual version 3 0 2 MRC Biostatistics Unit Cambridge Sturtz S Ligges U Gelman A 2005 R2WinBUGS A Package for Running WinBUGS from R Jo
36. rm 0 1 I 0 in lik 4 beta j dnorm 0 0 1 0E 3 delta dunif 1 1 lambda delta sqrt l pow delta 2 sigmax 1 sqrt l1 pow delta 2 EOC 50 lo 2 ie up 1 lt 0 up lt lt 50 Inits list beta c 0 0 0 0 delta 0 5 Data list n 481 k 2 2 Binary Regression Data o o ps 6907 6907 6907 6907 6907 6907 6907 6907 6907 6907 6907 6907 6907 6907 6907 ooo O a euo E ph oq pa pa pa p ph oa ph ps H These two files will have to be saved with format txt is to say Binary Regression Data txt and Skew Logit Model txt for its subsequent use To generate new models for other data is recommended to restart the program and follow the steps presented 14 1 5 2 Bayesian estimation using WinBUGS or OpenBUGS As we have seen the BayesianModeling generates two files one that contains the model of binary regression with the link selected and another that contains the data set Both files with txt format have to be opened in the WinBUGS or OpenBUGS program to make the correspondent analysis of inference Here we detail the steps that must be followed to perform the Bayesian inference in WinBUGS For details see Chapter 4 of Nzoufras 2009 1 Open the files with the syntax of the model and the previous generated data by the BayesianModeling in WinBUGS or OpenBUGS E WinBUGS14 File Tools Edit Attributes Info Model Inference Options Doodle Map Text a Skew Log
37. ry response of the person i that answer to the item j The items have binary outcomes i e the items are scored as 1 if correct and O if no e 1 a b are two parameters that represent respectively to the discrimination and the difficulty of the item 7 e 6 is the value of the latent variable or trait latent O for the person 7 and some occasions it is interpreted as the latent ability of the person 2 e pj isthe conditional probability given O 0 to respond correctly to item e fF iscalled the item characteristic curve ICC and e mj is a latent lineal predictor associated with the latent trait of the person 7 and the item parameters for the item 7 Observations The Two Parameter IRT model e satisfies the property of latent conditional independence it is for a person 7 the response Y to the different items are conditionally independent given the latent variable O 1 1 n e satisfies the property of latent monotonicity because is a function strictly no decreasing of 0 4 1 n e is one dimensional latent 26 e Flmi where i 1 n and j 1 k is the same for each case and FT is called the link function e Also is assumed that responses are independent between persons e The parameters of difficulty b and of discrimination a represent the location and inclination of the item respectively being a a proportional value to the inclination of the ICC in the point 5 and b is the point on 0 whe
38. sing WinBUGS 1 chains each with 44000 iterations first 4000 discarded n thin 40 n sims 1000 iterations saved mean Sd 324 5 25 50 15 DIS beta 1 6022 am au OA 023 00521 030909 beta 2 3550 Apo SI 3539 Dd 36 2 38 0 lambda Oan Wes EL S Osl OT 1523 deviance 102945 Lo 98641 1024 7 103540 T0400 104440 DIC info using the rule pD Dbar Dhat DD 29 3 amid DC wu i030 DIC is an estimate of expected predictive error lower deviance is better 7 Finally to greater details about the command bugs you can obtain help typing in the line of the commands the following bugs Note You can specify Bug directory The directory that contains the WinBUGS executable If the global option R2WinBUGS bugs directory is not NULL it will be used as the default Also you can specify the program to use either winbugs WinBUGS or openbugs OpenBUGS the latter makes use of function openbugs and requires the CRAN package BRugs 25 2 Item Response Theory 2 1 Item Response Theory models Consider data collected of n persons who have each given responses on different items of a test A Two Parameter Item Response Theory IRT model one dimensional and binary is a system in which for each person 7 has a unidimensional monotone latent variable model Y U defined by the following expressions Yiiuisn Bernoulli p pij P Yi 1 0i n F mi mi aj 8i by e Y is the manifest variable which model the bina
39. stadistica pdf Bazan JL Valdivieso L Calderon A 2010 Enfoque bayesiano en modelos de Teoria de Respuesta al Item Reporte de Investigaci n Serie B Nro 25 Departamento de Ciencias PUCP URL http argos pucp edu pe jlbazan download Reportef27 pdf 50 Birnbaum A 1968 Some Latent Trait Models and Their Use in Infering an Examinee s Ability In FM Lord MR Novick eds Statistical Theories of Mental Test Scores New York Addison Wesley Bolfarine H Bazan JL 2010 Bayesian estimation of the logistic positive Exponent IRT Model Journal of Educational Behavioral Statistics 35 6 693 713 Carlin BP Louis TA 2000 Bayes and Empirical Bayes Methods for Data Analysis Chapman amp Hall CRC London Boca Raton FL Collet D 2003 Modelling binary data Chapman amp Hall CRC Second Edition Boca Raton USA Congdon P 2010 Applied Bayesian Hierarchical Methods Chapman amp Hall CRC Congdon P 2005 Bayesian Models for Categorical Dates Wiley Chen MH Dey D Shao Q M 2001 Bayesian analysis of binary data using Skewed logit models Calcutta Statistical Association Bulletin 51 201 202 Curtis MS 2010 BUGS Code for Item Response Theory Journal of Statistical Software 36 1 1 34 Fischer G Molenaar I 1995 Rasch Models Foundations recent development and applications The Nerthelands Springer Verlag Fox JP 2010 Bayesian Item Response Modeling Theory and Applicat
40. through the libraries R2WinBUGS and R20penBUGS Sturtz Ligges and Gelman 2005 BRugs Thomas et al 2006 and rbugs This application is for your personal use and must not be used for any commercial purpose whatsoever without my explicit written permission The application is provided as is without warranty of any kind In order appropriately to implement the different models mentioned in the application you it must read in detail the literature suggested in the references and must be familiarized with the Bayesian Inference using MCMC BayesianModeling is thought for practitioners that given a data set they wish to know the syntax of diverse Binary Regression or Item Response models in bugs code Theory usually non available in diverse statistical programs including the program R This program write two files a bugs model file for each one of this models considering adequate priors lists with sensible starting values and size of the data set and a data set file in rectangular format both readable in WinBUGS or OpenBUGS This basic application can be considered a different version of BRMUW Bazan 2010 which was developed as part of the projects DAI 3412 4031 and 2009 0033 of Pontifical Catholic University of Peru with the purpose to disseminate models developed by the author This application together with some models has been developed for three late years and throughout that time various people have collaborated in this proje
41. tor Tool 1 5 3 Bayesian Estimation using WinBUGS or OPENBUGS in R As we have seen in the previous section with the two files that generates the BayesianModeling can implement the Bayesian Estimation using WinBUGS or 22 OpenBugs programs Also Bayesian estimation can be implemented by using R2WinBUGS or R2OpenBUGS Sturtz Ligges and Gelman 2005 packages for Running WinBUGS and OpeBUGS from R respectively or BRugs Thomas et al 2006 a collection of R functions that allow users to analyze graphical models using MCMC techniques Here we will need the file Beatles txt and the skewlogitModel txt syntax of the model generated in the BayesianModeling We copy all the syntax before Inits and save it in a file by example as modelbr txt Then the file modelbr txt would remain as model FOr Ca qnm Lem 4 m i lt beta 1 beta 2 x muz i m i delta sigma V ZS e SOLO as muz al EEE Y AI TL 2 Ono Emo dL or Bu i i i 1 uplylil l 1 for Xy xm lek d beta ly dnormtQ 0 L 0E 3 delta dunif 1 1 lambda lt delta sqrt 1 pow delta 2 sigma lt 1 sqrt 1 pow delta 2 Tole GO Lo 2d gt Us uppl ye Ue Up To implement the Bayesian estimation in R we follow the following steps to use the library R2WinBUGS 1 In R load the library R2WinBUGS installed previously with the following commando library RZWinBUGS 2 Read the data the file beetles txt for this Example
42. u 9 Usa ris Os y 0 v 97 029 10 4994 0 9 4 0 9 Ol Dr bp uo Du Og sg uo Olen gs 34 099 in 99 05 919 Oy Os Oy 00 09940 294 059 0 u D Ue Sw or coU DE rb Duos Dg O s Dp D ou Oe 370599 0 940 9 0 Oy Oey D 95 091 89 Baz n J Bolfarine H Leandro A R 2006 Sensitivity analysis of prior specification for the probit normal IRT model an empirical study Estad stica Journal of the Inter American Statistical Institute 58 170 171 17 42 Available in http www ime usp br jbazan download bazanestadistica pdf Baz n J L Branco D M amp Bolfarine 2006 A skew item response model Bayesian Analysis 1 861 892 This should copy the syntax before data and save it in a file for this example modelirt txt Then the file modelirt txt would remain 46 model for i in 1 n for J in 1 k I m i j lt a j theta i b muz i j lt m i jJ delta j 28 1 31 ar dnorm muz i J preczs j I loly i J3 1 uply i J3 1 MAPS dnorm 0 1 I 0 j VES abilities priors for i in 1 n theta i dnorm 0 1 items priors for J in 1 k usual priors Bazan et al 2006 difficulty intercept with prior similar to bilog bl3 dnorm 0 0 5 discrimination a j dnorm 1 2 I 0 difficulty centred in zero beau see be mea ola Bazan et al 2006 delta j dunif 1 1 preczs j lt 1 1 pow delta j 2 lambda j delta j l sqrt preczs j lo 1 50
43. u 1 0i ni Psn Mij Aj i MEER S DE EE 29 where A gt 0 is a parameter of asymmetry ni a 6 b is the latent linear predictor and Psy denote the cdf of a skew normal distributions with function of density dsn x A 20 7 Ax being the pdf of a standard normal variable Notice that if A 0 the normal ogive model 2P is obtained but as indicated in Bazan et al 2006 if A gt 0 the probability of correct response has a slow growth for low values of latent variable On the other hand if A 0 the probability of correct response has a quick growth for low values of the latent variable O Is because this behavior that this parameter is interpreted as a penalization parameter for item Main details about this model can be reviewed in Bazan et al 2006 In this formulation the link considered is the BBB skew probit link see Bazan Bolfarine and Branco 2010 and for this reason the model can be named also two parameter skew probit or 2SP IRT model When only difficulty parameter is considered we have the 1SP IRT model The LPE and RLPE models Logistic positive exponent LPE was proposed by Samejima 2000 A reversal version named Reflection Logistic positive exponent RLPE was formulated by Bolfarine and Bazan 2010 These models studied in Bolfarine and Bazan 2010 assume that the probability of correct response considering the abilities and the item parameters associates it given by pig P Yij 11
44. umed that D 1 although some authors consider also the value D 1 7 for approximating this model to the normal ogive model As particular cases have 1 e P Y No 1 ea 6 65 with Cj 0 and 1 o PU with y wc D The last model of a parameter is knows as well as the Rasch model but it has own interpretations and derivations see for example Fischer and Molenaar 1995 The BayesianModeling program allows implementing the code in WinBUGS for the models 1L 2L 3L 1P 2P and 3P IRT models By considering this links these models are symmetric IRT models In addition news IRT models with asymmetric links are considered also in BayesianModeling which are presented in the next section 2 2 IRT Models with asymmetric links In the traditional IRT models the asymmetric ICC are considered symmetrical this is the case of the logistic and of normal ogive models However as it has observed samejima 2000 Bazan et al 2006 and Bolfarine and Bazan 2010 asymmetric ICC can be incorporated considering a new parameter of item that controls the shape of the curve This asymmetry is necessary in many cases for a better modelization of answers with a low proportion of O s or 1 s Then will show three of these models The skew normal ogive model The skew normal ogive model was proposed by Baz n et al 2006 assuming that the probability of success considering the abilities and the item parameters associates it given by ps
45. urnal of Statistical Software 12 3 1 16 Thomas A O Hara B Ligges U Sturtz S 2006 Making BUGS Open R News 6 1 12 17 URL http CRAN R project org doc Rnews 53
46. x Sample monitor tool In the text box node type the name of the parameter and then click set this has to be done for each parameter p a Sample Monitor Tool 1 x node bo y ema A l percentiles E 100000 Zz A 5 clear trace histor densit clear st histor densis EE 90 stats coda quantiles bar diag auto cor 95 12 Repeat the step 10 generating more iterations that now have being saved by the WinBUGS or OpenBugs In the dialogue box Sample Monitor Tool can calculate posteriori statistics of the parameters clicking stats a historical of the chains clicking history an estimation of the posteriori density and others statistics of the chains can be calculated using this dialogue box 44 2 5 3 Bayesian Estimation using WinBUGS or OPENBUGS in R As we have seen in the previous section with the two files that generates the BayesianModeling can implement the Bayesian Estimation using WinBUGS or OpenBugs programs Also Bayesian estimation can be implemented by using R2WinBUGS or R2OpenBUGS Sturtz Ligges and Gelman 2005 packages for Running WinBUGS and OpeBUGS from R respectively or BRugs Thomas et al 2006 a collection of R functions that allow users to analyze graphical models using MCMC techniques For this will need the original text file with the data in columns TO LUZ T03 104 I05 106 diet LLZ TL L14 I 1 O 1 O TRE O O di dl dl di iL T i iL dd O 1 Ji Ak i O ik O O
47. ymmetric links A very popular example of asymmetric link is the complementary log log link or cloglog where the cdf of the Gumbel distribution is considered as defined by F t 1 exp ezp t Where the cdf is completely specified and it does not depend on any unknown additional parameter and it does not include any particular case as a symmetrical link This link is considered in Bayesian Modeling Information of how to implement the Bayesian estimation of the binary regression using the cloglog probit and logit links in WinBUGS or OpenBUGS can be seeing in the Example Beetles logistic probit and carries far estimates models of the Manual Nevertheless Bayesian approach to binary regression models considering other links as the discussed by Bazan Bolfarine and Branco 2006 and 2010 Prentice 1976 Nagler 1994 Chen Dey and Shao 1999 2001 are not available at the moment Asymmetric links considered in BayesianModeling are those that are obtained considering other cdf like the following POS ioe VE NG these links are asymmetric logit and are known as scobit and power logit respectively and include the logit link as special case when the parameter A 1 For a review of these links see Prentice 1976 and Nagler 1994 In BayesianModeling also are implemented three links that are based in the cdf of a skew normal distribution see Azzalini 1985 this cdf can be represented in general by the following way F t
48. ypically called the link function and n x 9 B2 i2 Cerri is the linear predictor Thus a binary regression model is given by y Bernoulli p p cem 352g When F a cdf of a symmetric distribution the response curve is has symmetric form about 0 5 Examples are obtained when Fis in the class of the elliptical distributions as for example standard normal logistic Student t double exponential and Cauchy distributions In the case that F is the cdf of a standard normal distribution we obtain the probit link F t e t and in the case that F is the cdf of a logistic distribution we obtain the logit link F t L t These links probit and logit are implemented in BayesianModeling et e 1 2 Asymmetric Links in Binary Regression As reported in the literature symmetric links are not always appropriate for modeling this kind of data Nagler 1994 Chen Dey and Shao 1999 among others showed the importance of appropriately choosing the link function and how sensitive is the inference if a symmetric link function is incorrectly used in the place of an asymmetric link The problem appears when the probability of a given binary response approaches 0 at a different rate than it approachesl Moreover examples are listed in different textbooks see for example Collet 2003 reporting situations where an asymmetric link is more appropriate than a symmetric one In this case it is necessary to consider as
Download Pdf Manuals
Related Search
Related Contents
Samsung 24" TV монитор с вграден високоговорител Наръчник за потребителя Istruzioni per l`uso Texas Instruments TMS320C6455 User's Manual US - Aqua Lung MRVII-C UE cover:MRVII-C UE cover Fujitsu MHV2160BT User's Manual serra corta piso USER MANUAL - Ascribe Data Systems Copyright © All rights reserved.
Failed to retrieve file