psychotree/0000755000176200001440000000000013614542502012441 5ustar liggesuserspsychotree/NAMESPACE0000644000176200001440000000254513063735655013701 0ustar liggesusers## imported packages (with generics etc.) import( "stats", "graphics", "psychotools", "partykit", "Formula" ) importFrom("grid", "gpar", "grid.layout", "unit", "grid.lines", "grid.points", "grid.polyline", "grid.rect", "grid.text", "grid.xaxis", "grid.yaxis", "popViewport", "pushViewport", "upViewport", "viewport" ) importFrom("grDevices", "extendrange", "gray.colors") export( ## trees "raschtree", "rstree", "pctree", "bttree", "mpttree", ## panel-generating visualization functions "node_profileplot", "node_regionplot", "node_btplot", "node_mptplot" ) ## methods for raschtree objects S3method("plot", "raschtree") S3method("print", "raschtree") S3method("predict", "raschtree") S3method("itempar", "raschtree") ## methods for rstree objects S3method("plot", "rstree") S3method("print", "rstree") S3method("predict", "rstree") S3method("itempar", "rstree") S3method("threshpar", "rstree") ## methods for pctree objects S3method("plot", "pctree") S3method("print", "pctree") S3method("predict", "pctree") S3method("itempar", "pctree") S3method("threshpar", "pctree") ## methods for bttree objects S3method("plot", "bttree") S3method("predict", "bttree") S3method("print", "bttree") S3method("itempar", "bttree") ## methods for mpttree objects S3method("coef", "mpttree") S3method("plot", "mpttree") S3method("print", "mpttree") psychotree/data/0000755000176200001440000000000012506774003013354 5ustar liggesuserspsychotree/data/DIFSim.rda0000644000176200001440000000264513614171370015125 0ustar liggesusersBZh91AY&SY{\P?ݐPP@@Pc@ &y4b 4i2 SA$"$2@ hz hiFA2h&F!HHF4h4M@4 hiFA2h&F!*z6i:"UDUaQEA a]ޣur:Wo:P[R"!3 9\3yճ痆1_afMV8ADo9ўk[]^O- \Y^ҧC-6b"шj(&ATTDUUX)ð3{wf >=H*(DPTUMEg)ժ*@HB,+m^f"g;<*%zZ7[88BAClVH4jiN"+AIQ6|fqd[5̚5 FL@fTAUd(y]Cw7>E5U>inw/ ȕQs*Pk5j-S gMIP!B> !8Ю̨%" qn2T h8,)37$فU1> P+ؤ†": ꈐvrjAn,-8K ll1"J5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B ]c 5mrX.6:8=`|JEmW["Y@̵&+x/HcB)s#ڶ>كrfvZ39Muܨ"T{mN։f4IS9YZ& Id&xL8 ]AV$ol%> ~QGB#4kT꘯Z g6tzIhkv(\&Z\(+aT7L *V KqW6FaKv9uTf:K?_EF+jy6;. >ǣ皴&N+^ w%\_#*m<܃s( ^gv0g*u@~Fե% wkTVkyFr z*H[o * 1l]^ pfd`">0 YZpsychotree/data/Topmodel2007.rda0000644000176200001440000000245713614171370016147 0ustar liggesusersBZh91AY&SY_B@?@@< b  OHQ =OHQACM@h` 2h   4ha!44ɣ@2 @h%?T)ShL 2`&&A!iF2#CL4 $O*iC ̷۬"3Zqu+]pe̵Eqj£-ur\dV˷-TȄd we2+j14njw5$㉻Z;j7}Z5tsZw wr(&# "Q3v /vE-hjq$/6՛垻-m%ͮzŝ\x]C͗=Ș`&W2kn9"-\k#=,(20]b7:Zf<^\wL;}y滫qɎsyZQ;9-3\ոLZkq0Ȑ0 ŊQ $L$&2{o[g0Z^7$k.m嶺^k>y9ttJ9o4ɍO½41KJiɉOiՆ8*mˋk^nafz-U=mALY{,[kjc̱.)ID ]$07$fE,`ɦ@dРDD BjWUB5|_jl+3r21S%Ȥ"&ZO)Mrv,ئi#C}+=U] D6]Z`Ϗoxy6íu>լ *q|[<^R~vP9*2mb`HNGqXenBHY8ǸpMl8Nߔ/0ASM4k x"rE8P_psychotree/data/EuropeanValuesStudy.rda0000644000176200001440000004501213614171370020034 0ustar liggesusersBZh91AY&SYh_DDGDDDDDDDDDTE|q I 3@ T-2 PJP@0|x @( (UAܚUISC@@SPcSMhLC@h i!0@jxB!&@h 򙴆'꞉M3SC@d 4(m@IꒉL4d44hM @ &Fa Li0 4 2@*j* h4hC ih! i='G(a@m0%5)ɁqU|=u )ɣ0mԂ`j?< 6d(b׶@1c*G2 :f) RE2fFjgD#@eܻ3P7>azo i-h<.ly|/-n =G$GGylNߋ)%n:Î]qݣgN~Ym~#=stO> ՝k}վP+=:=;؟0M97X=# z^cb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$d@1dJAHh#Hh S6YL2Ah 2hIF  `,DdLDD@R H"&Sc3%PlȰi$i `M bb3B &#h $2J#I"Lۮa;DLco}`P=>(RWWݲS6Qͤ .bÉa|i}]jg^Er:^G'TwcPLE,o']q'7(xJ5pdq5ǡ,8$S0*hO#xJļAxGٛCEE d4&b\!oj#1`jGɿQ\UH"Vv؛u!U @Z$@0A6^#%xtkEVV Ĭ ײf$-Ъm{1'֐2&귄~(δy rՊm0jj5IR h=7zFMuU@* P ^ԘQVœ஡`UHD/@(R @~zY{Ӝ^#72R,,n$[ T,, ?YEs'8Wg2X9^#Es&rNg2mfeQ*sbfEQ5"UT˩m)+1)3&D]-o^uyRWUQUO+MZԥEd<^Qwgu:)9ʊ݇*̜ȦdL+5)m%e@䇆d'7SÆBQC; 0 & rowSums(s1) < 12) ## fit rating scale tree model for the first other-to-blame situation rst <- rstree(s1 ~ anger + gender, data = VerbalAggression) ## print tree (with and without parameters) print(rst) print(rst, FUN = function(x) " *") ## show summary for terminal panel nodes summary(rst) ## visualization plot(rst, type = "regions") plot(rst, type = "profile") ## extract item and threshold parameters coef(rst) itempar(rst) threshpar(rst) ## inspect parameter stability tests in all splitting nodes if(require("strucchange")) { sctest(rst, node = 1) sctest(rst, node = 2) } options(digits = o$digits) ## IGNORE_RDIFF_END } \keyword{tree} psychotree/man/pctree.Rd0000644000176200001440000001212413614151735014771 0ustar liggesusers\name{pctree} \alias{pctree} \alias{plot.pctree} \alias{print.pctree} \alias{predict.pctree} \alias{itempar.pctree} \alias{threshpar.pctree} \title{Partial Credit Trees} \description{ Recursive partitioning (also known as trees) based on partial credit models. } \usage{ pctree(formula, data, na.action, nullcats = c("keep", "downcode", "ignore"), reltol = 1e-10, deriv = c("sum", "diff"), maxit = 100L, \dots) \method{predict}{pctree}(object, newdata = NULL, type = c("probability", "cumprobability", "mode", "median", "mean", "category-information", "item-information", "test-information", "node"), personpar = 0, \dots) \method{plot}{pctree}(x, type = c("regions", "profile"), terminal_panel = NULL, tp_args = list(...), tnex = 2L, drop_terminal = TRUE, ...) } \arguments{ \item{formula}{A symbolic description of the model to be fit. This should be of type \code{y ~ x1 + x2} where \code{y} should be a matrix with items in the columns and observations in the rows and \code{x1} and \code{x2} are used as partitioning variables.} \item{data}{a data frame containing the variables in the model.} \item{na.action}{a function which indicates what should happen when the data contain missing values (\code{NA}s).} \item{nullcats}{character. How null categories should be treated. See \code{\link[psychotools]{pcmodel}} for details.} \item{deriv}{character. If "sum" (the default), the first derivatives of the elementary symmetric functions are calculated with the sum algorithm. Otherwise ("diff") the difference algorithm (faster but numerically unstable) is used.} \item{reltol, maxit}{arguments passed via \code{\link[psychotools]{pcmodel}} to \code{\link[stats]{optim}}.} \item{\dots}{arguments passed to the underlying functions, i.e., to \code{\link[partykit]{mob_control}} for \code{pctree}, and to the underlying \code{predict} and \code{plot} methods, respectively.} \item{object, x}{an object of class \code{"raschtree"}.} \item{newdata}{optional data frame with partitioning variables for which predictions should be computed. By default the learning data set is used.} \item{type}{character specifying the type of predictions or plot. For the \code{predict} method, either just the ID of the terminal \code{"node"} can be predicted or some property of the model at a given person parameter (specified by \code{personpar}).} \item{personpar}{numeric person parameter (of length 1) at which the predictions are evaluated.} \item{terminal_panel, tp_args, tnex, drop_terminal}{arguments passed to \code{\link[partykit]{plot.modelparty}}/\code{\link[partykit]{plot.party}}.} } \details{ Partial credit trees are an application of model-based recursive partitioning (implemented in \code{\link[partykit]{mob}}) to partial credit models (implemented in \code{\link[psychotools]{pcmodel}}). Various methods are provided for \code{"pctree"} objects, most of them inherit their behavior from \code{"modelparty"} objects (e.g., \code{print}, \code{summary}, etc.). For the PCMs in the nodes of a tree, \code{coef} extracts all item and threshold parameters except those restricted to be zero. \code{itempar} and \code{threshpar} extract all item and threshold parameters (including the restricted ones). The \code{plot} method by default employs the \code{\link{node_regionplot}} panel-generating function and the \code{\link{node_profileplot}} panel-generating function is provided as an alternative. } \references{ Komboz B, Zeileis A, Strobl C (2018). Tree-Based Global Model Tests for Polytomous Rasch Models. \emph{Educational and Psychological Measurement}, \bold{78}(1), 128--166. \doi{10.1177/0013164416664394} } \value{ An object of S3 class \code{"pctree"} inheriting from class \code{"modelparty"}. } \seealso{\code{\link[partykit]{mob}}, \code{\link[psychotools]{pcmodel}}, \code{\link{rstree}}, \code{\link{raschtree}}} \examples{ o <- options(digits = 4) ## verbal aggression data from package psychotools data("VerbalAggression", package = "psychotools") ## use response to the second other-to-blame situation (train) VerbalAggression$s2 <- VerbalAggression$resp[, 7:12] ## exclude subjects who only scored in the highest or the lowest categories VerbalAggression <- subset(VerbalAggression, rowSums(s2) > 0 & rowSums(s2) < 12) ## fit partial credit tree model pct <- pctree(s2 ~ anger + gender, data = VerbalAggression) ## print tree (with and without parameters) print(pct) print(pct, FUN = function(x) " *") ## show summary for terminal panel nodes summary(pct) ## visualization plot(pct, type = "regions") plot(pct, type = "profile") ## extract item and threshold parameters coef(pct) itempar(pct) threshpar(pct) ## inspect parameter stability tests in the splitting node if(require("strucchange")) sctest(pct, node = 1) options(digits = o$digits) \donttest{ ## partial credit tree on artificial data from Komboz et al. (2018) data("DIFSimPC", package = "psychotree") pct2 <- pctree(resp ~ gender + age + motivation, data = DIFSimPC) plot(pct2, ylim = c(-4.5, 4.5), names = paste("I", 1:8)) } } \keyword{tree} psychotree/man/mpttree.Rd0000644000176200001440000000602713614151773015176 0ustar liggesusers\name{mpttree} \alias{mpttree} \alias{coef.mpttree} \alias{plot.mpttree} \alias{print.mpttree} \alias{predict.mpttree} \encoding{latin1} \title{MPT Trees} \description{ Recursive partitioning (also known as trees) based on multinomial processing tree (MPT) models. } \usage{ mpttree(formula, data, na.action, cluster, spec, treeid = NULL, optimargs = list(control = list(reltol = .Machine$double.eps^(1/1.2), maxit = 1000)), \dots) } \arguments{ \item{formula}{a symbolic description of the model to be fit. This should be of type \code{y ~ x1 + x2} where \code{y} should be a matrix of response frequencies and \code{x1} and \code{x2} are used as partitioning variables.} \item{data}{an optional data frame containing the variables in the model.} \item{na.action}{a function which indicates what should happen when the data contain \code{NA}s, defaulting to \code{\link[stats]{na.pass}}.} \item{cluster}{optional vector (typically numeric or factor) with a cluster ID to be employed for clustered covariances in the parameter stability tests.} \item{spec, treeid, optimargs}{arguments for the MPT model passed on to \code{\link[psychotools]{mptmodel}}.} \item{\dots}{arguments passed to \code{\link[partykit]{mob_control}}.} } \details{ MPT trees (Wickelmaier & Zeileis, 2018) are an application of model-based recursive partitioning (implemented in \code{\link[partykit]{mob}}) to MPT models (implemented in \code{\link[psychotools]{mptmodel}}). Various methods are provided for \code{"mpttree"} objects, most of them inherit their behavior from \code{"mob"} objects (e.g., \code{print}, \code{summary}, etc.). The \code{plot} method employs the \code{\link{node_mptplot}} panel-generating function. } \value{ An object of S3 class \code{"mpttree"} inheriting from class \code{"modelparty"}. } \references{ Wickelmaier F, Zeileis A (2018). Using Recursive Partitioning to Account for Parameter Heterogeneity in Multinomial Processing Tree Models. \emph{Behavior Research Methods}, \bold{50}(3), 1217--1233. \doi{10.3758/s13428-017-0937-z} } \seealso{\code{\link[partykit]{mob}}, \code{\link[psychotools]{mptmodel}}.} \examples{ o <- options(digits = 4) ## Source Monitoring data data("SourceMonitoring", package = "psychotools") ## MPT tree sm_tree <- mpttree(y ~ sources + gender + age, data = SourceMonitoring, spec = mptspec("SourceMon", .restr = list(d1 = d, d2 = d))) plot(sm_tree, index = c("D1", "D2", "d", "b", "g")) ## extract parameter estimates coef(sm_tree) ## parameter instability tests in root node if(require("strucchange")) sctest(sm_tree, node = 1) ## storage and retrieval deficits in psychiatric patients data("MemoryDeficits", package = "psychotools") MemoryDeficits$trial <- ordered(MemoryDeficits$trial) ## MPT tree sr_tree <- mpttree(cbind(E1, E2, E3, E4) ~ trial + group, data = MemoryDeficits, cluster = ID, spec = mptspec("SR2"), alpha = 0.1) ## extract parameter estimates coef(sr_tree) options(digits = o$digits) } \keyword{tree} psychotree/man/DIFSim.Rd0000644000176200001440000000340413406140316014553 0ustar liggesusers\name{DIFSim} \alias{DIFSim} \alias{DIFSimPC} \title{Artificial Data with Differential Item Functioning} \description{ Artificial data simulated from a Rasch model and a partial credit model, respectively, where the items exhibit differential item functioning (DIF). } \usage{ data(DIFSim) data(DIFSimPC) } \format{ Two data frames containing 200 and 500 observations, respectively, on 4 variables. \describe{ \item{resp}{an \code{\link[psychotools]{itemresp}} matrix with binary or polytomous results for 20 or 8 items, respectively.} \item{age}{age in years.} \item{gender}{factor indicating gender.} \item{motivation}{ordered factor indicating motivation level.} } } \details{ The data are employed for illustrations in Strobl et al. (2015) and Komboz et al. (2018). See the manual pages for \code{\link{raschtree}} and \code{\link{pctree}} for fitting the tree models.. } \references{ Komboz B, Zeileis A, Strobl C (2018). Tree-Based Global Model Tests for Polytomous Rasch Models. \emph{Educational and Psychological Measurement}, \bold{78}(1), 128--166. \doi{10.1177/0013164416664394} Strobl C, Kopf J, Zeileis A (2015). Rasch Trees: A New Method for Detecting Differential Item Functioning in the Rasch Model. \emph{Psychometrika}, \bold{80}(2), 289--316. \doi{10.1007/s11336-013-9388-3} } \seealso{\code{\link{raschtree}}, \code{\link{pctree}}} \examples{ ## data data("DIFSim", package = "psychotree") data("DIFSimPC", package = "psychotree") ## summary of covariates summary(DIFSim[, -1]) summary(DIFSimPC[, -1]) ## empirical frequencies of responses plot(DIFSim$resp) plot(DIFSimPC$resp) ## histogram of raw scores hist(rowSums(DIFSim$resp), breaks = 0:20 - 0.5) hist(rowSums(DIFSimPC$resp), breaks = 0:17 - 0.5) } \keyword{datasets} psychotree/man/raschtree.Rd0000644000176200001440000001123513614155235015470 0ustar liggesusers\name{raschtree} \alias{raschtree} \alias{print.raschtree} \alias{plot.raschtree} \alias{predict.raschtree} \alias{itempar.raschtree} \title{Rasch Trees} \description{ Recursive partitioning (also known as trees) based on Rasch models. } \usage{ raschtree(formula, data, na.action, reltol = 1e-10, deriv = c("sum", "diff", "numeric"), maxit = 100L, \dots) \method{predict}{raschtree}(object, newdata = NULL, type = c("probability", "cumprobability", "mode", "median", "mean", "category-information", "item-information", "test-information", "node"), personpar = 0, \dots) \method{plot}{raschtree}(x, type = c("profile", "regions"), terminal_panel = NULL, tp_args = list(...), tnex = 2L, drop_terminal = TRUE, ...) } \arguments{ \item{formula}{A symbolic description of the model to be fit. This should be of type \code{y ~ x1 + x2} where \code{y} should be a binary 0/1 item response matrix and \code{x1} and \code{x2} are used as partitioning variables.} \item{data}{a data frame containing the variables in the model.} \item{na.action}{a function which indicates what should happen when the data contain missing values (\code{NA}s).} \item{deriv}{character. Which type of derivatives should be used for computing gradient and Hessian matrix? Analytical with sum algorithm (\code{"sum"}), analytical with difference algorithm (\code{"diff"}, faster but numerically unstable), or numerical. Passed to \code{\link[psychotools]{raschmodel}}.} \item{reltol, maxit}{arguments passed via \code{\link[psychotools]{raschmodel}} to \code{\link[stats]{optim}}.} \item{\dots}{arguments passed to the underlying functions, i.e., to \code{\link[partykit]{mob_control}} for \code{raschtree}, and to the underlying \code{predict} and \code{plot} methods, respectively.} \item{object, x}{an object of class \code{"raschtree"}.} \item{newdata}{optional data frame with partitioning variables for which predictions should be computed. By default the learning data set is used.} \item{type}{character specifying the type of predictions or plot. For the \code{predict} method, either just the ID of the terminal \code{"node"} can be predicted or some property of the model at a given person parameter (specified by \code{personpar}).} \item{personpar}{numeric person parameter (of length 1) at which the predictions are evaluated.} \item{terminal_panel, tp_args, tnex, drop_terminal}{arguments passed to \code{\link[partykit]{plot.modelparty}}/\code{\link[partykit]{plot.party}}.} } \details{ Rasch trees are an application of model-based recursive partitioning (implemented in \code{\link[partykit]{mob}}) to Rasch models (implemented in \code{\link[psychotools]{raschmodel}}). Various methods are provided for \code{"raschtree"} objects, most of them inherit their behavior from \code{"modelparty"} objects (e.g., \code{print}, \code{summary}, etc.). For the Rasch models in the nodes of a tree, \code{coef} extracts all item parameters except the first one which is always restricted to be zero. \code{itempar} extracts all item parameters (including the first one) and by default restricts their sum to be zero (but other restrictions can be used as well). The \code{plot} method by default employs the \code{\link{node_profileplot}} panel-generating function and the \code{\link{node_regionplot}} panel-generating function is provided as an alternative. Rasch tree models are introduced in Strobl et al. (2015), whose analysis for the \code{\link{SPISA}} data is replicated in \code{vignette("raschtree", package = "psychotree")}. Their illustration employing artificial data is replicated below. } \references{ Strobl C, Kopf J, Zeileis A (2015). Rasch Trees: A New Method for Detecting Differential Item Functioning in the Rasch Model. \emph{Psychometrika}, \bold{80}(2), 289--316. \doi{10.1007/s11336-013-9388-3} } \value{ An object of S3 class \code{"raschtree"} inheriting from class \code{"modelparty"}. } \seealso{\code{\link[partykit]{mob}}, \code{\link[psychotools]{raschmodel}}, \code{\link{rstree}}, \code{\link{pctree}}} \examples{ o <- options(digits = 4) ## artificial data data("DIFSim", package = "psychotree") ## fit Rasch tree model rt <- raschtree(resp ~ age + gender + motivation, data = DIFSim) plot(rt) ## extract item parameters itempar(rt) ## inspect parameter stability tests in all splitting nodes if(require("strucchange")) { sctest(rt, node = 1) sctest(rt, node = 2) } ## highlight items 3 and 14 with DIF ix <- rep(1, 20) ix[c(3, 14)] <- 2 plot(rt, ylines = 2.5, cex = c(0.4, 0.8)[ix], pch = c(19, 19)[ix], col = gray(c(0.5, 0))[ix]) options(digits = o$digits) } \keyword{tree} psychotree/man/CEMSChoice.Rd0000644000176200001440000000706713406574715015371 0ustar liggesusers\name{CEMSChoice} \alias{CEMSChoice} \encoding{latin1} \title{CEMS University Choice Data} \description{ Preferences of 303 students from WU Wien for different CEMS universities. } \usage{data("CEMSChoice")} \format{ A data frame containing 303 observations on 10 variables. \describe{ \item{preference}{Paired comparison of class \code{\link{paircomp}}. Preferences for all 15 paired comparisons from 6 objects: London, Paris, Milano, St. Gallen, Barcelona, Stockholm.} \item{study}{Factor coding main discipline of study: commerce, or other (economics, business administration, business education).} \item{english}{Factor coding knowledge of English (good, poor).} \item{french}{Factor coding knowledge of French (good, poor).} \item{spanish}{Factor coding knowledge of Spanish (good, poor).} \item{italian}{Factor coding knowledge of Italian (good, poor).} \item{work}{Factor. Was the student working full-time while studying?} \item{gender}{Factor coding gender.} \item{intdegree}{Factor. Does the student intend to take an international degree?} \item{preference1998}{Paired comparison of class \code{\link{paircomp}}. This is like \code{preference} but the comparisons between Barcelona an Stockholm are (erroneously) reversed, see below.} } } \details{ Students at Wirtschaftsuniversitt Wien (\url{http://www.wu.ac.at/}) can study abroad visiting one of currently 17 CEMS universities (Community of European Management Schools and International Companies). Dittrich et al. (1998) conduct and analyze a survey of 303 students to examine the student's preferences for 6 universities: London School of Economics, HEC Paris, Universit Commerciale Luigi Bocconi (Milano), Universitt St. Gallen, ESADE (Barcelona), Handelshgskolan i Stockholm. To identify reasons for the preferences, several subject covariates (including foreign language competence, gender, etc.) have been assessed. Furthermore, several object covariates are attached to \code{preference} (and \code{preference1998}): the universities' field of \code{specialization} (economics, management science, finance) and location (Latin country, or other). The correct data are available in the online complements to Dittrich et al. (1998). However, the accompanying analysis was based on an erroneous version of the data in which the choices for the last comparison pair (Barcelona : Stockholm) were accidentally reversed. See the corrigendum in Dittrich et al. (2001) for further details. The variable \code{preference} provides the correct data and can thus be used to replicate the analysis from the corrigendum (Dittrich et al. 2001). For convenience, the erroneous version is provided in \code{preference1998} which can therefore be used to replicate the (incorrect) original analysis (Dittrich et al. 1998). } \source{ The Royal Statistical Society Datasets Website. } \references{ Dittrich R, Hatzinger R, Katzenbeisser W (1998). Modelling the Effect of Subject-Specific Covariates in Paired Comparison Studies with an Application to University Rankings, \emph{Journal of the Royal Statistical Society C}, \bold{47}, 511--525. Dittrich R, Hatzinger R, Katzenbeisser W (2001). Corrigendum: Modelling the Effect of Subject-Specific Covariates in Paired Comparison Studies with an Application to University Rankings, \emph{Journal of the Royal Statistical Society C}, \bold{50}, 247--249. } \seealso{\code{\link{paircomp}}} \examples{ data("CEMSChoice", package = "psychotree") summary(CEMSChoice$preference) covariates(CEMSChoice$preference) } \keyword{datasets} psychotree/man/bttree.Rd0000644000176200001440000000774013614151722015000 0ustar liggesusers\name{bttree} \alias{bttree} \alias{plot.bttree} \alias{print.bttree} \alias{predict.bttree} \alias{itempar.bttree} \title{Bradley-Terry Trees} \description{ Recursive partitioning (also known as trees) based on Bradley-Terry models. } \usage{ bttree(formula, data, na.action, cluster, type = "loglin", ref = NULL, undecided = NULL, position = NULL, \dots) \method{predict}{bttree}(object, newdata = NULL, type = c("worth", "rank", "best", "node"), \dots) } \arguments{ \item{formula}{A symbolic description of the model to be fit. This should be of type \code{y ~ x1 + x2} where \code{y} should be an object of class \code{\link[psychotools]{paircomp}} and \code{x1} and \code{x2} are used as partitioning variables.} \item{data}{an optional data frame containing the variables in the model.} \item{na.action}{A function which indicates what should happen when the data contain \code{NA}s, defaulting to \code{\link[stats]{na.pass}}.} \item{cluster}{optional vector (typically numeric or factor) with a cluster ID to be employed for clustered covariances in the parameter stability tests.} \item{type}{character indicating the type of auxiliary model in \code{bttree} and the type of predictions in the \code{predict} method, respectively. For the auxiliary model see \code{\link[psychotools]{btmodel}}. For the \code{predict} method, four options are available: the fitted \code{"worth"} parameter for each alternative, the corresponding \code{"rank"}, the \code{"best"} alternative or the predicted \code{"node"} number.} \item{ref, undecided, position}{arguments for the Bradley-Terry model passed on to \code{\link[psychotools]{btmodel}}.} \item{\dots}{arguments passed to \code{\link[partykit]{mob_control}}.} \item{object}{fitted model object of class \code{"bttree"}.} \item{newdata}{optionally, a data frame in which to look for variables with which to predict. If omitted, the original observations are used.} } \details{ Bradley-Terry trees are an application of model-based recursive partitioning (implemented in \code{\link[partykit]{mob}}) to Bradley-Terry models for paired comparison data (implemented in \code{\link[psychotools]{btmodel}}). Details about the underlying theory and further explanations of the illustrations in the example section can be found in Strobl, Wickelmaier, Zeileis (2011). Various methods are provided for \code{"bttree"} objects, most of them inherit their behavior from \code{"mob"} objects (e.g., \code{print}, \code{summary}, etc.). \code{itempar} behaves analogously to \code{coef} and extracts the worth/item parameters from the BT models in the nodes of the tree. The \code{plot} method employs the \code{\link{node_btplot}} panel-generating function. } \value{ An object of S3 class \code{"bttree"} inheriting from class \code{"modelparty"}. } \references{ Strobl C, Wickelmaier F, Zeileis A (2011). Accounting for Individual Differences in Bradley-Terry Models by Means of Recursive Partitioning. \emph{Journal of Educational and Behavioral Statistics}, \bold{36}(2), 135--153. \doi{10.3102/1076998609359791} } \seealso{\code{\link[partykit]{mob}}, \code{\link[psychotools]{btmodel}}} \examples{ o <- options(digits = 4) ## Germany's Next Topmodel 2007 data data("Topmodel2007", package = "psychotree") ## BT tree tm_tree <- bttree(preference ~ ., data = Topmodel2007, minsize = 5, ref = "Barbara") plot(tm_tree, abbreviate = 1, yscale = c(0, 0.5)) ## parameter instability tests in root node if(require("strucchange")) sctest(tm_tree, node = 1) ## worth/item parameters in terminal nodes itempar(tm_tree) ## CEMS university choice data data("CEMSChoice", package = "psychotree") summary(CEMSChoice$preference) ## BT tree cems_tree <- bttree(preference ~ french + spanish + italian + study + work + gender + intdegree, data = CEMSChoice, minsize = 5, ref = "London") plot(cems_tree, abbreviate = 1, yscale = c(0, 0.5)) itempar(cems_tree) options(digits = o$digits) } \keyword{tree} psychotree/DESCRIPTION0000644000176200001440000000255413614542502014155 0ustar liggesusersPackage: psychotree Title: Recursive Partitioning Based on Psychometric Models Version: 0.15-3 Date: 2020-01-29 Authors@R: c(person(given = "Achim", family = "Zeileis", role = c("aut", "cre"), email = "Achim.Zeileis@R-project.org", comment = c(ORCID = "0000-0003-0918-3766")), person(given = "Carolin", family = "Strobl", role = "aut", email = "Carolin.Strobl@psychologie.uzh.ch"), person(given = "Florian", family = "Wickelmaier", role = "aut"), person(given = "Basil", family = "Komboz", role = "aut"), person(given = "Julia", family = "Kopf", role = "aut")) Depends: R (>= 2.15.0), partykit (>= 0.8-4), psychotools (>= 0.4-0) Suggests: colorspace, strucchange Imports: graphics, grDevices, grid, stats, Formula Description: Recursive partitioning based on psychometric models, employing the general MOB algorithm (from package partykit) to obtain Bradley-Terry trees, Rasch trees, rating scale and partial credit trees, and MPT trees. License: GPL-2 | GPL-3 NeedsCompilation: no Packaged: 2020-01-29 02:50:32 UTC; zeileis Author: Achim Zeileis [aut, cre] (), Carolin Strobl [aut], Florian Wickelmaier [aut], Basil Komboz [aut], Julia Kopf [aut] Maintainer: Achim Zeileis Repository: CRAN Date/Publication: 2020-01-30 12:00:02 UTC psychotree/build/0000755000176200001440000000000013614171367013547 5ustar liggesuserspsychotree/build/vignette.rds0000644000176200001440000000052613614171367016111 0ustar liggesusersuQj0T<@Kz- &J = y dH2~yӕmJzF3+BHByB92%K׆Y^9)J~[U@/0kwB+ZjC3p7e,rIwP_>+Tϒ{ h2J_DK>5@jl+1!µ6!nX 6cAyޖheҦs>?˺w94ouEߍGL]k+ԦnAY|̤pnr ݽ@w&8Gt'd\ҷ,hqTwii*-#nmX̱miYpsychotree/build/partial.rdb0000644000176200001440000012275713614171352015704 0ustar liggesusers[wɶ.A$)JJRI A7@A$EQ%VI"TWVH@be&$:ٽtnmwݾ_m{1c嘙_A0RD$5*M)/bΘqH&ttuxѓt^p<LO.[L`RosI|ǭozn5׸[_f&h&oZ^鞫[zd{fTZ+L{}U5=ߨo/f{⡲mx~+"$# Ebbzeת6Bh;mē6ȁS*f釫GG3[J^ФNy=(pZg%!'وjxz\׿k?ˏتsQJ5l,NY5e'DSȟvsO[ C>ē瞁^7kU<Yi*ӹ50l*Vy+% fLo 'uG> =QG>Rux=mlIAJ̙o9.\Fیm&{O!?{K>(}&3I(}e]k4Ιs}":ajڳļS9B8Poiɘ,!jCVA1c6ppMfV붳Em7< ƨΪLvFKKd&cȏqy_9UdȖpjt e_]ېoC{ /e{ 47.7<L5.}@X |N)/B_ph:Nq X\J)gl5D,?hh&8p6㌑CK, ,㐏'f^ +U˙}m.ɓED9KJ&f\GqʴlL!jFMYW]!_z7x~lxEˋ`+bsy^P6 @>и/ƍV~( Z#\:5 U+ 'YF1MWAj j3NqV;s=4ǪcWڨ Y J+Mܑ.D9Po PdeʲYwÄ}R|û~`Bxzzz{[q\J) ?p4Z,-LL<31>5&y}^.-Ic7Afi<%Z(Nkd/wc [ܔdD*Ih;rf^/=f_GFE]iz~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by ö~P%~OhvC2ʜ+­*}ZASOSar#:`c }p$L.bspşGCLQ06<,D?Aȃ#LqjtK coZo6Zh? j?m䚹,^5,eykQ.oPK=ϳ9"YiR}瀨W 0e%y_ D܀h9?(s('ܵ%_@wɔF(o+k3<:?4 tOANnζo46UD&=Up:hȁfZo*Lf!Nڻqx%Ox MBģ ww쌊KA`'~.]cԖ6GccSFirfcTH8Xryu3Wo;,xK̃(h`lUˋ3[#U T- h?o^(gEeRVQpsychotree/tests/0000755000176200001440000000000012213624634013604 5ustar liggesuserspsychotree/tests/Examples/0000755000176200001440000000000013614153537015367 5ustar liggesuserspsychotree/tests/Examples/psychotree-Ex.Rout.save0000644000176200001440000006306313614157125021743 0ustar liggesusers R version 3.6.2 (2019-12-12) -- "Dark and Stormy Night" Copyright (C) 2019 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > pkgname <- "psychotree" > source(file.path(R.home("share"), "R", "examples-header.R")) > options(warn = 1) > library('psychotree') Loading required package: partykit Loading required package: grid Loading required package: libcoin Loading required package: mvtnorm Loading required package: psychotools > > base::assign(".oldSearch", base::search(), pos = 'CheckExEnv') > base::assign(".old_wd", base::getwd(), pos = 'CheckExEnv') > cleanEx() > nameEx("CEMSChoice") > ### * CEMSChoice > > flush(stderr()); flush(stdout()) > > ### Name: CEMSChoice > ### Title: CEMS University Choice Data > ### Aliases: CEMSChoice > ### Keywords: datasets > > ### ** Examples > > data("CEMSChoice", package = "psychotree") > summary(CEMSChoice$preference) > = < NA's London : Paris 186 26 91 0 London : Milano 221 26 56 0 Paris : Milano 121 32 59 91 London : StGallen 208 22 73 0 Paris : StGallen 165 19 119 0 Milano : StGallen 135 28 140 0 London : Barcelona 217 19 67 0 Paris : Barcelona 157 37 109 0 Milano : Barcelona 104 67 132 0 StGallen : Barcelona 144 25 134 0 London : Stockholm 250 19 34 0 Paris : Stockholm 203 30 70 0 Milano : Stockholm 157 46 100 0 StGallen : Stockholm 155 50 98 0 Barcelona : Stockholm 172 41 90 0 > covariates(CEMSChoice$preference) specialization location London economics other Paris management science latin Milano economics latin StGallen finance other Barcelona management science latin Stockholm finance other > > > > cleanEx() > nameEx("DIFSim") > ### * DIFSim > > flush(stderr()); flush(stdout()) > > ### Name: DIFSim > ### Title: Artificial Data with Differential Item Functioning > ### Aliases: DIFSim DIFSimPC > ### Keywords: datasets > > ### ** Examples > > ## data > data("DIFSim", package = "psychotree") > data("DIFSimPC", package = "psychotree") > > ## summary of covariates > summary(DIFSim[, -1]) age gender motivation Min. :16.00 male :109 1:23 1st Qu.:31.00 female: 91 2:41 Median :45.00 3:45 Mean :45.84 4:35 3rd Qu.:60.00 5:41 Max. :74.00 6:15 > summary(DIFSimPC[, -1]) age gender motivation Min. :20.00 male :239 1:125 1st Qu.:35.00 female:261 2: 88 Median :49.00 3: 96 Mean :49.69 4: 90 3rd Qu.:64.00 5:101 Max. :80.00 > > ## empirical frequencies of responses > plot(DIFSim$resp) > plot(DIFSimPC$resp) > > ## histogram of raw scores > hist(rowSums(DIFSim$resp), breaks = 0:20 - 0.5) > hist(rowSums(DIFSimPC$resp), breaks = 0:17 - 0.5) > > > > cleanEx() > nameEx("EuropeanValuesStudy") > ### * EuropeanValuesStudy > > flush(stderr()); flush(stdout()) > > ### Name: EuropeanValuesStudy > ### Title: European Values Study > ### Aliases: EuropeanValuesStudy > ### Keywords: datasets > > ### ** Examples > > ## data > data("EuropeanValuesStudy", package = "psychotree") > summary(EuropeanValuesStudy$paircomp) > < NA's order : decisions 2136 1293 155 order : prices 2178 949 457 decisions : prices 1694 1335 555 order : freedom 2358 761 465 decisions : freedom 1732 860 992 prices : freedom 1558 1066 960 > > ## Not run: > ##D ## Bradley-Terry tree resulting in similar results compared to > ##D ## the (different) tree approach of Lee and Lee (2010) > ##D evs <- na.omit(EuropeanValuesStudy) > ##D bt <- bttree(paircomp ~ gender + eduage + birthyear + marital + employment + income + country2, > ##D data = evs, alpha = 0.01) > ##D plot(bt, abbreviate = 2) > ## End(Not run) > > > > cleanEx() > nameEx("SPISA") > ### * SPISA > > flush(stderr()); flush(stdout()) > > ### Name: SPISA > ### Title: SPIEGEL Studentenpisa Data (Subsample) > ### Aliases: SPISA > ### Keywords: datasets > > ### ** Examples > > ## data > data("SPISA", package = "psychotree") > > ## summary of covariates > summary(SPISA[,-1]) gender age semester elite spon female:417 Min. :18.0 2 :173 no :836 never :303 male :658 1st Qu.:21.0 4 :123 yes:239 <1/month :127 Median :23.0 6 :116 1-3/month:107 Mean :23.1 1 :105 1/week : 79 3rd Qu.:25.0 5 : 99 2-3/week : 73 Max. :40.0 3 : 98 4-5/week : 60 (Other):361 daily :326 > > ## histogram of raw scores > hist(rowSums(SPISA$spisa), breaks = 0:45 + 0.5) > > ## Not run: > ##D ## See the following vignette for a tree-based DIF analysis > ##D vignette("raschtree", package = "psychotree") > ## End(Not run) > > > > cleanEx() > nameEx("Topmodel2007") > ### * Topmodel2007 > > flush(stderr()); flush(stdout()) > > ### Name: Topmodel2007 > ### Title: Attractiveness of Germany's Next Topmodels 2007 > ### Aliases: Topmodel2007 > ### Keywords: datasets > > ### ** Examples > > data("Topmodel2007", package = "psychotree") > summary(Topmodel2007$preference) > < Barbara : Anni 121 71 Barbara : Hana 98 94 Anni : Hana 75 117 Barbara : Fiona 101 91 Anni : Fiona 81 111 Hana : Fiona 113 79 Barbara : Mandy 130 62 Anni : Mandy 114 78 Hana : Mandy 130 62 Fiona : Mandy 131 61 Barbara : Anja 123 69 Anni : Anja 112 80 Hana : Anja 130 62 Fiona : Anja 119 73 Mandy : Anja 92 100 > xtabs(~ gender + I(age < 30), data = Topmodel2007) I(age < 30) gender FALSE TRUE male 48 48 female 48 48 > > > > cleanEx() > nameEx("bttree") > ### * bttree > > flush(stderr()); flush(stdout()) > > ### Name: bttree > ### Title: Bradley-Terry Trees > ### Aliases: bttree plot.bttree print.bttree predict.bttree itempar.bttree > ### Keywords: tree > > ### ** Examples > > o <- options(digits = 4) > > ## Germany's Next Topmodel 2007 data > data("Topmodel2007", package = "psychotree") > > ## BT tree > tm_tree <- bttree(preference ~ ., data = Topmodel2007, minsize = 5, ref = "Barbara") > plot(tm_tree, abbreviate = 1, yscale = c(0, 0.5)) > > ## parameter instability tests in root node > if(require("strucchange")) sctest(tm_tree, node = 1) Loading required package: strucchange Loading required package: zoo Attaching package: ‘zoo’ The following objects are masked from ‘package:base’: as.Date, as.Date.numeric Loading required package: sandwich gender age q1 q2 q3 statistic 17.08798 3.236e+01 12.6320 19.83922 6.7586 p.value 0.02149 7.915e-04 0.1283 0.00668 0.7452 > > ## worth/item parameters in terminal nodes > itempar(tm_tree) Barbara Anni Hana Fiona Mandy Anja 3 0.1889 0.16993 0.3851 0.1142 0.09232 0.04958 5 0.1746 0.12305 0.2625 0.2254 0.10188 0.11259 6 0.2659 0.21278 0.1609 0.1945 0.06275 0.10310 7 0.2585 0.05573 0.1531 0.1605 0.16427 0.20792 > > ## CEMS university choice data > data("CEMSChoice", package = "psychotree") > summary(CEMSChoice$preference) > = < NA's London : Paris 186 26 91 0 London : Milano 221 26 56 0 Paris : Milano 121 32 59 91 London : StGallen 208 22 73 0 Paris : StGallen 165 19 119 0 Milano : StGallen 135 28 140 0 London : Barcelona 217 19 67 0 Paris : Barcelona 157 37 109 0 Milano : Barcelona 104 67 132 0 StGallen : Barcelona 144 25 134 0 London : Stockholm 250 19 34 0 Paris : Stockholm 203 30 70 0 Milano : Stockholm 157 46 100 0 StGallen : Stockholm 155 50 98 0 Barcelona : Stockholm 172 41 90 0 > > ## BT tree > cems_tree <- bttree(preference ~ french + spanish + italian + study + work + gender + intdegree, + data = CEMSChoice, minsize = 5, ref = "London") > plot(cems_tree, abbreviate = 1, yscale = c(0, 0.5)) > itempar(cems_tree) London Paris Milano StGallen Barcelona Stockholm 3 0.2083 0.12682 0.15936 0.06905 0.42506 0.01135 4 0.4315 0.08630 0.34017 0.05205 0.06060 0.02939 7 0.3325 0.42215 0.05478 0.06144 0.09252 0.03656 8 0.3989 0.22586 0.08578 0.13480 0.09108 0.06360 9 0.4104 0.09624 0.07697 0.15767 0.16424 0.09451 > > options(digits = o$digits) > > > > cleanEx() detaching ‘package:strucchange’, ‘package:sandwich’, ‘package:zoo’ > nameEx("mpttree") > ### * mpttree > > flush(stderr()); flush(stdout()) > > ### Name: mpttree > ### Title: MPT Trees > ### Aliases: mpttree coef.mpttree plot.mpttree print.mpttree > ### predict.mpttree > ### Keywords: tree > > ### ** Examples > > o <- options(digits = 4) > > ## Source Monitoring data > data("SourceMonitoring", package = "psychotools") > > ## MPT tree > sm_tree <- mpttree(y ~ sources + gender + age, data = SourceMonitoring, + spec = mptspec("SourceMon", .restr = list(d1 = d, d2 = d))) > plot(sm_tree, index = c("D1", "D2", "d", "b", "g")) > > ## extract parameter estimates > coef(sm_tree) D1 d g b D2 3 0.6245 0.4417 0.6285 0.1178 0.7420 4 0.5373 0.2643 0.5144 0.2045 0.7179 5 0.6349 0.4456 0.4696 0.1948 0.6120 > > ## parameter instability tests in root node > if(require("strucchange")) sctest(sm_tree, node = 1) Loading required package: strucchange Loading required package: zoo Attaching package: ‘zoo’ The following objects are masked from ‘package:base’: as.Date, as.Date.numeric Loading required package: sandwich sources gender age statistic 2.848e+01 9.0034 16.9298 p.value 8.805e-05 0.2925 0.2489 > > ## storage and retrieval deficits in psychiatric patients > data("MemoryDeficits", package = "psychotools") > MemoryDeficits$trial <- ordered(MemoryDeficits$trial) > > ## MPT tree > sr_tree <- mpttree(cbind(E1, E2, E3, E4) ~ trial + group, + data = MemoryDeficits, cluster = ID, spec = mptspec("SR2"), alpha = 0.1) > > ## extract parameter estimates > coef(sr_tree) c r u 3 0.4611 0.4730 0.4239 4 0.4508 0.2438 0.3248 7 0.3738 0.2733 0.3090 8 0.4342 0.5557 0.4534 9 0.5978 0.8345 0.5842 > > options(digits = o$digits) > > > > cleanEx() detaching ‘package:strucchange’, ‘package:sandwich’, ‘package:zoo’ > nameEx("pctree") > ### * pctree > > flush(stderr()); flush(stdout()) > > ### Name: pctree > ### Title: Partial Credit Trees > ### Aliases: pctree plot.pctree print.pctree predict.pctree itempar.pctree > ### threshpar.pctree > ### Keywords: tree > > ### ** Examples > > o <- options(digits = 4) > > ## verbal aggression data from package psychotools > data("VerbalAggression", package = "psychotools") > > ## use response to the second other-to-blame situation (train) > VerbalAggression$s2 <- VerbalAggression$resp[, 7:12] > > ## exclude subjects who only scored in the highest or the lowest categories > VerbalAggression <- subset(VerbalAggression, rowSums(s2) > 0 & rowSums(s2) < 12) > > ## fit partial credit tree model > pct <- pctree(s2 ~ anger + gender, data = VerbalAggression) > > ## print tree (with and without parameters) > print(pct) Partial credit tree Model formula: s2 ~ anger + gender Fitted party: [1] root | [2] gender in female: n = 220 | s2S2WantCurse-C2 s2S2DoCurse-C1 s2S2DoCurse-C2 s2S2WantScold-C1 | 1.486 1.169 3.239 1.097 | s2S2WantScold-C2 s2S2DoScold-C1 s2S2DoScold-C2 s2S2WantShout-C1 | 2.903 2.006 4.791 1.618 | s2S2WantShout-C2 s2S2DoShout-C1 s2S2DoShout-C2 | 3.768 3.198 6.705 | [3] gender in male: n = 67 | s2S2WantCurse-C2 s2S2DoCurse-C1 s2S2DoCurse-C2 s2S2WantScold-C1 | 0.5547 -0.2179 -0.1240 0.8065 | s2S2WantScold-C2 s2S2DoScold-C1 s2S2DoScold-C2 s2S2WantShout-C1 | 1.7020 0.2919 1.7719 1.5697 | s2S2WantShout-C2 s2S2DoShout-C1 s2S2DoShout-C2 | 3.6675 2.1006 5.4388 Number of inner nodes: 1 Number of terminal nodes: 2 Number of parameters per node: 11 Objective function (negative log-likelihood): 899.9 > print(pct, FUN = function(x) " *") Partial credit tree Model formula: s2 ~ anger + gender Fitted party: [1] root | [2] gender in female * | [3] gender in male * Number of inner nodes: 1 Number of terminal nodes: 2 Number of parameters per node: 11 Objective function (negative log-likelihood): 899.9 > > ## show summary for terminal panel nodes > summary(pct) $`2` Partial credit model Item category parameters: Estimate Std. Error z value Pr(>|z|) s2S2WantCurse-C2 1.486 0.303 4.90 9.6e-07 *** s2S2DoCurse-C1 1.169 0.265 4.42 9.9e-06 *** s2S2DoCurse-C2 3.239 0.478 6.78 1.2e-11 *** s2S2WantScold-C1 1.097 0.266 4.12 3.8e-05 *** s2S2WantScold-C2 2.903 0.473 6.13 8.5e-10 *** s2S2DoScold-C1 2.006 0.270 7.44 1.0e-13 *** s2S2DoScold-C2 4.791 0.508 9.44 < 2e-16 *** s2S2WantShout-C1 1.618 0.268 6.04 1.5e-09 *** s2S2WantShout-C2 3.768 0.486 7.75 9.0e-15 *** s2S2DoShout-C1 3.198 0.296 10.80 < 2e-16 *** s2S2DoShout-C2 6.705 0.575 11.66 < 2e-16 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Log-likelihood: -689 (df = 11) Number of iterations in BFGS optimization: 17 $`3` Partial credit model Item category parameters: Estimate Std. Error z value Pr(>|z|) s2S2WantCurse-C2 0.555 0.548 1.01 0.31136 s2S2DoCurse-C1 -0.218 0.507 -0.43 0.66709 s2S2DoCurse-C2 -0.124 0.780 -0.16 0.87361 s2S2WantScold-C1 0.807 0.464 1.74 0.08195 . s2S2WantScold-C2 1.702 0.789 2.16 0.03105 * s2S2DoScold-C1 0.292 0.453 0.64 0.51902 s2S2DoScold-C2 1.772 0.800 2.21 0.02681 * s2S2WantShout-C1 1.570 0.465 3.37 0.00074 *** s2S2WantShout-C2 3.667 0.878 4.18 3.0e-05 *** s2S2DoShout-C1 2.101 0.485 4.33 1.5e-05 *** s2S2DoShout-C2 5.439 1.038 5.24 1.6e-07 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Log-likelihood: -211 (df = 11) Number of iterations in BFGS optimization: 18 > > ## visualization > plot(pct, type = "regions") > plot(pct, type = "profile") > > ## extract item and threshold parameters > coef(pct) s2S2WantCurse-C2 s2S2DoCurse-C1 s2S2DoCurse-C2 s2S2WantScold-C1 2 1.4864 1.1691 3.239 1.0970 3 0.5547 -0.2179 -0.124 0.8065 s2S2WantScold-C2 s2S2DoScold-C1 s2S2DoScold-C2 s2S2WantShout-C1 2 2.903 2.0057 4.791 1.618 3 1.702 0.2919 1.772 1.570 s2S2WantShout-C2 s2S2DoShout-C1 s2S2DoShout-C2 2 3.768 3.198 6.705 3 3.667 2.101 5.439 > itempar(pct) s2S2WantCurse s2S2DoCurse s2S2WantScold s2S2DoScold s2S2WantShout s2S2DoShout 2 -1.1646 -0.288 -0.4561 0.4877 -0.02374 1.445 3 -0.8069 -1.146 -0.2332 -0.1983 0.74950 1.635 > threshpar(pct) s2S2WantCurse-C1 s2S2WantCurse-C2 s2S2DoCurse-C1 s2S2DoCurse-C2 2 -1.908 -0.4213 -0.7386 0.1626 3 -1.084 -0.5296 -1.3022 -0.9903 s2S2WantScold-C1 s2S2WantScold-C2 s2S2DoScold-C1 s2S2DoScold-C2 2 -0.8108 -0.1013 0.09792 0.8775 3 -0.2777 -0.1887 -0.79234 0.3958 s2S2WantShout-C1 s2S2WantShout-C2 s2S2DoShout-C1 s2S2DoShout-C2 2 -0.2893 0.2418 1.290 1.599 3 0.4855 1.0135 1.016 2.254 > > ## inspect parameter stability tests in the splitting node > if(require("strucchange")) sctest(pct, node = 1) Loading required package: strucchange Loading required package: zoo Attaching package: ‘zoo’ The following objects are masked from ‘package:base’: as.Date, as.Date.numeric Loading required package: sandwich anger gender statistic 16.2334 4.354e+01 p.value 0.9578 1.746e-05 > > options(digits = o$digits) > > > > > cleanEx() detaching ‘package:strucchange’, ‘package:sandwich’, ‘package:zoo’ > nameEx("raschtree") > ### * raschtree > > flush(stderr()); flush(stdout()) > > ### Name: raschtree > ### Title: Rasch Trees > ### Aliases: raschtree print.raschtree plot.raschtree predict.raschtree > ### itempar.raschtree > ### Keywords: tree > > ### ** Examples > > o <- options(digits = 4) > > ## artificial data > data("DIFSim", package = "psychotree") > > ## fit Rasch tree model > rt <- raschtree(resp ~ age + gender + motivation, data = DIFSim) > plot(rt) > > ## extract item parameters > itempar(rt) resp1 resp2 resp3 resp4 resp5 resp6 resp7 resp8 resp9 resp10 3 0.41354 1.7416 4.053 0.2700 -0.2995 -1.237 -0.1562 0.12779 -1.831 -0.5928 4 0.05796 0.7298 1.026 0.8747 0.2539 -1.175 -1.0231 -0.07179 -1.419 0.1883 5 0.31447 0.4851 2.699 0.4851 -0.5527 -1.372 -0.7737 -0.06814 -1.504 0.5433 resp11 resp12 resp13 resp14 resp15 resp16 resp17 resp18 resp19 resp20 3 0.1278 -1.831 -1.065 -2.0719 -1.2368 1.9610 1.961 -0.15621 -0.5928 0.4135 4 -0.9493 -1.336 -1.175 0.5897 1.0258 1.3536 2.078 0.05798 -0.9493 -0.1367 5 0.6024 -1.864 -1.245 0.3145 0.9134 0.6623 1.589 -0.06814 -0.7178 -0.4442 > > ## inspect parameter stability tests in all splitting nodes > if(require("strucchange")) { + sctest(rt, node = 1) + sctest(rt, node = 2) + } Loading required package: strucchange Loading required package: zoo Attaching package: ‘zoo’ The following objects are masked from ‘package:base’: as.Date, as.Date.numeric Loading required package: sandwich age gender motivation statistic 6.126e+01 0 86.252 p.value 3.613e-04 NA 0.926 > > ## highlight items 3 and 14 with DIF > ix <- rep(1, 20) > ix[c(3, 14)] <- 2 > plot(rt, ylines = 2.5, cex = c(0.4, 0.8)[ix], + pch = c(19, 19)[ix], col = gray(c(0.5, 0))[ix]) > > options(digits = o$digits) > > > > cleanEx() detaching ‘package:strucchange’, ‘package:sandwich’, ‘package:zoo’ > nameEx("rstree") > ### * rstree > > flush(stderr()); flush(stdout()) > > ### Name: rstree > ### Title: Rating Scale Trees > ### Aliases: rstree plot.rstree print.rstree predict.rstree itempar.rstree > ### threshpar.rstree > ### Keywords: tree > > ### ** Examples > > ## IGNORE_RDIFF_BEGIN > o <- options(digits = 4) > > ## verbal aggression data from package psychotools > data("VerbalAggression", package = "psychotools") > > ## responses to the first other-to-blame situation (bus) > VerbalAggression$s1 <- VerbalAggression$resp[, 1:6] > > ## exclude subjects who only scored in the highest or the lowest categories > VerbalAggression <- subset(VerbalAggression, rowSums(s1) > 0 & rowSums(s1) < 12) > > ## fit rating scale tree model for the first other-to-blame situation > rst <- rstree(s1 ~ anger + gender, data = VerbalAggression) > > ## print tree (with and without parameters) > print(rst) Rating scale tree Model formula: s1 ~ anger + gender Fitted party: [1] root | [2] gender in female | | [3] anger <= 23: n = 173 | | s1S1DoCurse s1S1WantScold s1S1DoScold s1S1WantShout s1S1DoShout | | 0.5054 0.5054 1.0954 1.0688 1.9563 | | C2 | | 0.8887 | | [4] anger > 23: n = 41 | | s1S1DoCurse s1S1WantScold s1S1DoScold s1S1WantShout s1S1DoShout | | -0.6582 0.3610 0.2247 0.5922 0.8799 | | C2 | | -0.7253 | [5] gender in male: n = 68 | s1S1DoCurse s1S1WantScold s1S1DoScold s1S1WantShout s1S1DoShout | -0.48160 0.35253 -0.06342 1.01438 1.60990 | C2 | 0.87640 Number of inner nodes: 2 Number of terminal nodes: 3 Number of parameters per node: 6 Objective function (negative log-likelihood): 975.8 > print(rst, FUN = function(x) " *") Rating scale tree Model formula: s1 ~ anger + gender Fitted party: [1] root | [2] gender in female | | [3] anger <= 23 * | | [4] anger > 23 * | [5] gender in male * Number of inner nodes: 2 Number of terminal nodes: 3 Number of parameters per node: 6 Objective function (negative log-likelihood): 975.8 > > ## show summary for terminal panel nodes > summary(rst) $`3` Rating scale model Item location and threshold parameters: Estimate Std. Error z value Pr(>|z|) s1S1DoCurse 0.505 0.157 3.21 0.0013 ** s1S1WantScold 0.505 0.157 3.21 0.0013 ** s1S1DoScold 1.095 0.166 6.58 4.6e-11 *** s1S1WantShout 1.069 0.166 6.44 1.2e-10 *** s1S1DoShout 1.956 0.194 10.08 < 2e-16 *** C2 0.889 0.157 5.65 1.6e-08 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Log-likelihood: -612 (df = 6) Number of iterations in BFGS optimization: 11 $`4` Rating scale model Item location and threshold parameters: Estimate Std. Error z value Pr(>|z|) s1S1DoCurse -0.658 0.316 -2.08 0.0374 * s1S1WantScold 0.361 0.303 1.19 0.2331 s1S1DoScold 0.225 0.301 0.75 0.4550 s1S1WantShout 0.592 0.308 1.92 0.0545 . s1S1DoShout 0.880 0.318 2.77 0.0056 ** C2 -0.725 0.347 -2.09 0.0367 * --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Log-likelihood: -132 (df = 6) Number of iterations in BFGS optimization: 12 $`5` Rating scale model Item location and threshold parameters: Estimate Std. Error z value Pr(>|z|) s1S1DoCurse -0.4816 0.2566 -1.88 0.06058 . s1S1WantScold 0.3525 0.2548 1.38 0.16650 s1S1DoScold -0.0634 0.2519 -0.25 0.80121 s1S1WantShout 1.0144 0.2731 3.71 0.00020 *** s1S1DoShout 1.6099 0.3034 5.31 1.1e-07 *** C2 0.8764 0.2568 3.41 0.00064 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Log-likelihood: -232 (df = 6) Number of iterations in BFGS optimization: 12 > > ## visualization > plot(rst, type = "regions") > plot(rst, type = "profile") > > ## extract item and threshold parameters > coef(rst) s1S1DoCurse s1S1WantScold s1S1DoScold s1S1WantShout s1S1DoShout C2 3 0.5054 0.5054 1.09541 1.0688 1.9563 0.8887 4 -0.6582 0.3610 0.22465 0.5922 0.8799 -0.7253 5 -0.4816 0.3525 -0.06342 1.0144 1.6099 0.8764 > itempar(rst) s1S1WantCurse s1S1DoCurse s1S1WantScold s1S1DoScold s1S1WantShout s1S1DoShout 3 -0.8552 -0.3498 -0.34978 0.240193 0.2135 1.1010 4 -0.2333 -0.8915 0.12775 -0.008599 0.3589 0.6466 5 -0.4053 -0.8869 -0.05277 -0.468721 0.6091 1.2046 > threshpar(rst) s1S1WantCurse-C1 s1S1WantCurse-C2 s1S1DoCurse-C1 s1S1DoCurse-C2 3 -1.2996 -0.4108 -0.7941 0.09459 4 0.1294 -0.5959 -0.5289 -1.25411 5 -0.8435 0.0329 -1.3251 -0.44870 s1S1WantScold-C1 s1S1WantScold-C2 s1S1DoScold-C1 s1S1DoScold-C2 3 -0.7941 0.09459 -0.2042 0.68456 4 0.4904 -0.23487 0.3540 -0.37123 5 -0.4910 0.38543 -0.9069 -0.03052 s1S1WantShout-C1 s1S1WantShout-C2 s1S1DoShout-C1 s1S1DoShout-C2 3 -0.2308 0.657908 0.6567 1.545 4 0.7216 -0.003693 1.0093 0.284 5 0.1709 1.047277 0.7664 1.643 > > ## inspect parameter stability tests in all splitting nodes > if(require("strucchange")) { + sctest(rst, node = 1) + sctest(rst, node = 2) + } Loading required package: strucchange Loading required package: zoo Attaching package: ‘zoo’ The following objects are masked from ‘package:base’: as.Date, as.Date.numeric Loading required package: sandwich anger gender statistic 23.61167 0 p.value 0.01672 NA > > options(digits = o$digits) > ## IGNORE_RDIFF_END > > > > ### *