Zelig/0000755000176200001440000000000013765157646011350 5ustar liggesusersZelig/NAMESPACE0000755000176200001440000000353213754260262012560 0ustar liggesusersimport(sandwich, methods, survival, jsonlite, dplyr, geepack, coda, Amelia, MatchIt, maxLik, survey) importFrom("AER", "tobit", "ivreg") importFrom("Formula", "as.Formula") importFrom("grDevices", "col2rgb", "heat.colors", "rgb") importFrom("graphics", "abline", "axis", "barplot", "box", "image", "layout", "lines", "par", "polygon", "text") importFrom("stats", "binomial", "complete.cases", "density", "glm", "lm", "lm.influence", "median", "model.frame", "model.matrix", "model.response", "na.omit", "quantile", "sd", "terms", "update", "ARMAacf", "rnorm", "pnorm") importFrom("MASS", "glm.nb", "rnegbin", "mvrnorm", "gamma.shape") importFrom("MCMCpack", "MCMCfactanal", "MCMClogit", "MCMCmnl", "MCMCregress", "MCMCoprobit", "MCMCpoisson", "MCMCprobit", "MCMCtobit") importFrom("quantreg", "rq", "summary.rq", "bandwidth.rq") importFrom("VGAM", "vglm") importClassesFrom("VGAM", "vglm") importMethodsFrom("VGAM", "coef", "fitted", "predict", "vcov") S3method(summary, Arima) exportPattern("^[[:alpha:]]+") exportClasses( "Zelig", "Zelig-ls", "Zelig-glm", "Zelig-ivreg", "Zelig-binchoice", "Zelig-logit", "Zelig-probit", "Zelig-gamma", "Zelig-exp", "Zelig-negbin", "Zelig-normal", "Zelig-poisson", "Zelig-lognorm", "Zelig-tobit", "Zelig-gee", "Zelig-binchoice-gee", "Zelig-logit-gee", "Zelig-probit-gee", "Zelig-gamma-gee", "Zelig-normal-gee", "Zelig-poisson-gee", "Zelig-bayes", "Zelig-factor-bayes", "Zelig-logit-bayes", "Zelig-mlogit-bayes", "Zelig-normal-bayes", "Zelig-oprobit-bayes", "Zelig-poisson-bayes", "Zelig-probit-bayes", "Zelig-tobit-bayes", "Zelig-weibull", "Zelig-timeseries", "Zelig-arima", "Zelig-ar", "Zelig-ma" ) Zelig/README.md0000644000176200001440000001636613764477201012632 0ustar liggesusers [![zelig-logo](man/figures/zelig.png)](https://zeligproject.org/) **Release:** [![CRAN Version](https://www.r-pkg.org/badges/version/Zelig)](https://CRAN.R-project.org/package=Zelig) ![CRAN Monthly Downloads](http://cranlogs.r-pkg.org/badges/last-month/Zelig) ![CRAN Total Downloads](http://cranlogs.r-pkg.org/badges/grand-total/Zelig) **Development:** [![Project Status: Active - The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/) [![Travis (LINUX) Build Status](https://travis-ci.org/IQSS/Zelig.svg?branch=master)](https://travis-ci.org/IQSS/Zelig) [![AppVeyor (Windows) Build Status](https://ci.appveyor.com/api/projects/status/github/IQSS/Zelig?branch=master&svg=true)](https://ci.appveyor.com/project/IQSS/Zelig) [![codecov](https://codecov.io/gh/IQSS/Zelig/branch/master/graph/badge.svg)](https://codecov.io/gh/IQSS/Zelig) [Dev-Blog](https://medium.com/zelig-dev) Zelig workflow overview ----------------------- All models in Zelig can be estimated and results explored presented using four simple functions: 1. `zelig` to estimate the parameters, 2. `setx` to set fitted values for which we want to find quantities of interest, 3. `sim` to simulate the quantities of interest, 4. `plot` to plot the simulation results. #### Zelig 5 reference classes Zelig 5 introduced [reference classes](http://adv-r.had.co.nz/R5.html). These enable a different way of working with Zelig that is detailed in [a separate vignette](http://docs.zeligproject.org/articles/zelig5_vs_zelig4.html). Directly using the reference class architecture is optional. They are not used in the examples below. Zelig Quickstart Guide ---------------------- Let’s walk through an example. This example uses the swiss dataset. It contains data on fertility and socioeconomic factors in Switzerland’s 47 French-speaking provinces in 1888 (Mosteller and Tukey, 1977, 549-551). We will model the effect of education on fertility, where education is measured as the percent of draftees with education beyond primary school and fertility is measured using the common standardized fertility measure (see Muehlenbein (2010, 80-81) for details). Installing and Loading Zelig ---------------------------- If you haven't already done so, open your R console and install Zelig. We recommend installing Zelig with the zeligverse package. This installs core Zelig and ancillary packages at once. install.packages('zeligverse') Alternatively you can install the development version of Zelig with: devtools::install_github('IQSS/Zelig') Once Zelig is installed, load it: library(zeligverse) Building Models --------------- Let’s assume we want to estimate the effect of education on fertility. Since fertility is a continuous variable, least squares (`ls`) is an appropriate model choice. To estimate our model, we call the `zelig()` function with three two arguments: equation, model type, and data: # load data data(swiss) # estimate ls model z5_1 <- zelig(Fertility ~ Education, model = "ls", data = swiss, cite = FALSE) # model summary summary(z5_1) ## Model: ## ## Call: ## z5$zelig(formula = Fertility ~ Education, data = swiss) ## ## Residuals: ## Min 1Q Median 3Q Max ## -17.036 -6.711 -1.011 9.526 19.689 ## ## Coefficients: ## Estimate Std. Error t value Pr(>|t|) ## (Intercept) 79.6101 2.1041 37.836 < 2e-16 ## Education -0.8624 0.1448 -5.954 3.66e-07 ## ## Residual standard error: 9.446 on 45 degrees of freedom ## Multiple R-squared: 0.4406, Adjusted R-squared: 0.4282 ## F-statistic: 35.45 on 1 and 45 DF, p-value: 3.659e-07 ## ## Next step: Use 'setx' method The -0.86 coefficient on education suggests a negative relationship between the education of a province and its fertility rate. More precisely, for every one percent increase in draftees educated beyond primary school, the fertility rate of the province decreases 0.86 units. To help us better interpret this finding, we may want other quantities of interest, such as expected values or first differences. Zelig makes this simple by automating the translation of model estimates into interpretable quantities of interest using Monte Carlo simulation methods (see King, Tomz, and Wittenberg (2000) for more information). For example, let’s say we want to examine the effect of increasing the percent of draftees educated from 5 to 15. To do so, we set our predictor value using the `setx()` and `setx1()` functions: # set education to 5 and 15 z5_1 <- setx(z5_1, Education = 5) z5_1 <- setx1(z5_1, Education = 15) # model summary summary(z5_1) ## setx: ## (Intercept) Education ## 1 1 5 ## setx1: ## (Intercept) Education ## 1 1 15 ## ## Next step: Use 'sim' method After setting our predictor value, we simulate using the `sim()` method: # run simulations and estimate quantities of interest z5_1 <- sim(z5_1) # model summary summary(z5_1) ## ## sim x : ## ----- ## ev ## mean sd 50% 2.5% 97.5% ## 1 75.30616 1.658283 75.28057 72.12486 78.48007 ## pv ## mean sd 50% 2.5% 97.5% ## [1,] 75.28028 9.707597 75.60282 57.11199 94.3199 ## ## sim x1 : ## ----- ## ev ## mean sd 50% 2.5% 97.5% ## 1 66.66467 1.515977 66.63699 63.66668 69.64761 ## pv ## mean sd 50% 2.5% 97.5% ## [1,] 66.02916 9.441273 66.32583 47.19223 82.98039 ## fd ## mean sd 50% 2.5% 97.5% ## 1 -8.641488 1.442774 -8.656953 -11.43863 -5.898305 At this point, we’ve estimated a model, set the predictor value, and estimated easily interpretable quantities of interest. The `summary()` method shows us our quantities of interest, namely, our expected and predicted values at each level of education, as well as our first differences–the difference in expected values at the set levels of education. Visualizations ============== Zelig’s `plot()` function plots the estimated quantities of interest: plot(z5_1) ![](man/figures/example_plot_graph-1.png) We can also simulate and plot simulations from ranges of simulated values: z5_2 <- zelig(Fertility ~ Education, model = "ls", data = swiss, cite = FALSE) # set Education to range from 5 to 15 at single integer increments z5_2 <- setx(z5_2, Education = 5:15) # run simulations and estimate quantities of interest z5_2 <- sim(z5_2) Then use the `plot()` function as before: z5_2 <- plot(z5_2) ![](man/figures/example_plot_ci_plot-1.png) Getting help ============ The primary documentation for Zelig is available at: . Within R, you can access function help using the normal `?` function, e.g.: ?setx If you are looking for details on particular estimation model methods, you can also use the `?` function. Simply place a `z` before the model name. For example, to access details about the `logit` model use: ?zlogit Zelig/data/0000755000176200001440000000000013764744322012251 5ustar liggesusersZelig/data/mid.tab.gz0000755000176200001440000014002613754260262014132 0ustar liggesusers4IU| Lw!8=&Aw?򼺸H&#*O w73UQY???o__?/]/ ?,+_ۿz}mULfO_[iecE!>[nkoͿTg%ʕio }F^_o-wP(#Sm}y~s_kіB\ư<噆2k1C|?UT7fٷ;]}Z2VR;7ejlLgRV[/ǖV*#7Q6噋=+n?~NG\kvvS2K.+?l*)}Z~njkiesB8+>Ʋϴ~p42+U{esK8mbƨ%B{e9ۇmld*\Pgw؛p֧[ODM0[wW;Mc30O{;lŮ:jsѧ}UuW[/gŅM\>r0GiڲSEv]M,5[=9YVm֯vaOVxfZ儥O!kgq_I@FlOojB7ۨ]kmJlGיX&sT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lR ji#{K9[0VV.lB}FAI>lØl;&CZo o #{n<ſD ?o൥UAk`Jdz Kc8DYBtKC;B3NrOgW"o^_OV W@PNKDs>)ǿZ.'f)ǽ< |$s4w+o٭3s5s3?h"5>2;[) R5> \$fQwsKЌb qd׀ |XwCUE7 8J?0Զ{ as2R wf,in>@mc}'`VH';(zYۉ [n>z º["":*H9rW-앫<нAGBCYeG}Uɔ2YL(듆_?M Qޠf&({RJ Lc*Rcΐǹ7)8UwHl'wOxWU6O-_PXLl(KX%i&,|e?kXET%q9@Pև߯nΠa}ņBo3\W ׀a:&=l叞T?dZelig/data/homerun.txt.gz0000755000176200001440000000331413754260262015105 0ustar liggesusers}n7 @|HY(U .~%Q8ѹcs_w8Ϗ׏7ϿN88^O~_o<8~?opb<0Y:d|bn(yx7FO>O_(O#n ?x<*wkxd֌7̓3輻N{ [wkX/ۻb,$8?KBEB4]W$Am);#XQ%@NJFS)N JS0Q鳔FRxRNkWw)F S/2FPʔ>@)ijA4>= )< }v(^i4%'Ay Nʔ)6]Ѣ[ Z ߗ$}0u$AqHԐ *}?wXzt!v$rNHWHG Gs.V$,PY+5N!/gZ1V $4bq!4:вDB]0 8!eUVIHh\ i!uՀ.Z* 8G-Xj\%!iՃU ZUE !issWs }dA2,s zjkA Ы# `N<-@}G/sA eG9in:tdAk^Ps-h:nLB8炣DB6d+ic1 u2¹^$Zelig/data/hoff.tab.gz0000755000176200001440000000044713754260262014305 0ustar liggesuserseAj1 }OI-y(e M!!Q6<K_3'r:O~}wjq{ހ@P(iB[?D8 (Z T+`h`zqiY]Qj0e‘E03FAG@[%rK6u:6OX7YrJ,>*{%4Ґ*1U/-''1-(Eza1ƽdK?{2=ݞ ;%_XVJ8xENCZelig/data/immi3.tab.gz0000755000176200001440000006174213754260262014406 0ustar liggesusers[49,ޫ($wr9fp0 ڽH7?duMtLt?1";WԐc>Ԟ_WmӖ[I[ӴFcg`[4WOCRKD-iY hxqC ?>)`RzQ=R蘱L񯿛}BK=6>1VB>9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5F \=_ird]3{Gewss^-40r L9qŀ~^dm{QCy`ʪYo}>~z+®>9LdlL!^CҧDYK/rwگ*[m#+z,;dZelig/data/MatchIt.url.tab.gz0000755000176200001440000000015513754260262015511 0ustar liggesusersM,I,Q())OKH,*K,JKM)),'LJC@x܂\Iz)%6ϵbTZelig/data/CigarettesSW.tab.gz0000644000176200001440000001011013764744322015715 0ustar liggesusers}ˎ =1XUKEgXd'^IlVvKFOۀ5sYwx\û_~Ͽ}ӏ~|ӿW_3s%d֗:{M)-9j(j]Scem|G#KNe#{J|G]Z[qϹևǢ߾#jk&ORԫ/'md>X\'''[[)yVg^SO|}<'a,>G#ė_\ozM4ko _%C}W56MՔϙ[+)4 uza hM[I{i{s}.#̵Q[`zJ@[BnÖFU(6U'W9a"ɗ9 ࣮)0ezt#px@$Tg8m-H9"A $/H4-셬ev2 륵ϭ2Q͘ U*@ԺxHit&â/q2|WRcݘBoVۿ@sk$sUk)m6m@7Ժ=Wp% :~T8ՉBkCmF#iYDVci+3pE /E\2t#\ P^ѩk[&$0ȩ9UIZ7:`:j`z JjnD@b~ѻ>[BaE Eld.D&IwWr8I7uWI|sIr?ooTޮ/D":+?EQP}OW=F ԵP?&}5$rxd{Ia6h^f^gj_Gx( jD<]u(8ێ$fQ`2&K 墩T? h|Fw^O@.vr%xId`n K-V`ē/I&\8i^e L=I3,%mh""xh"H2L ZcS&_(s,EW$ҍ ,竎j;hjMB""wdw,I݊p JEjW$t%ymdmp9oTy ]C+"xO[ɲS#՟FM:J|"秋]10aRd0#x>c"]ׄs UEF֐mX$/\et uζQ;t -:B(n?3|<C`6Kǹ$5q/*]SѾ<]C7/JᱲM{WWκ[ RFBRn>p300 ` N3}5Gmz+T^01/_gx9=Y 5&IJ3"T$aNZ(J?=}^)o}dd+eEM 3J28[s,UA8vwiRϬ.x^܎BXWu> .qj7W87IUI,6|40C:+-y,B90`r`U;d\#flOQkMjvQn/T25IYF/7Hˢ LDCuXmJF"P|U"c(RJJMS῿"(FmcAs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ɀ:P'd@ u2N:e5o1_VΪo_q 9?yOLZelig/data/Zelig.url.tab.gz0000755000176200001440000000125713754260262015236 0ustar liggesusersn0E veݠ-'@7-MAPI*uf(YJj$yKgՊM^RZCnzS2lv meYXtĸ j%q)B{SlqZ S<<UhTD֩v1UY-aVHb*GBZVqAE`iފ4qYZ7Vq(fZFqHE.hwͧ%x'uK`%û.7J'oKURZoS:f&";F/3Fc9 aWͦx0-Biw&ͪipjt4<5B z`)aU@;"x7,:T_34VMhOoTiBsZ@K*ݦUDU:=%G>4R- g4g"#">$w Ls#AXna^(]6!m4mjY[7.H7I7y*,Ro" .}4R11LhJ-j;7!w7F_Mh9U)O5gYV} M謧p6.8쎫4IEņ0t앇?G9j4乇C#`?Vk"c?(f?œ3Zelig/data/kmenta.txt.gz0000755000176200001440000000047313754260262014712 0ustar liggesusers5R9n1 `s"E7afKe.k|_s<.q?=ݎԢ5NfԌtGa3l.J4Q4^ҴȚEcaX4;(QQ5Hºɠ/V.̘z5&ExPZ)Qzv6.M¡֝&AIClYCxNbTӃ^dW!nNJCE3EM̗8E;iAEbc [5f"Q)ᑧfi4*uì|,*6B;T'-♈:Cة#狲 7R _aœr5SR+`Hиe/t3]\cdZ(mCK~`Ju̜dJ=#)JM-e|5tyҜ>>)~W DQQ~bZelig/data/bivariate.tab.gz0000755000176200001440000000062113754260262015323 0ustar liggesusersmQ D)O *jn6sA%ڪi ϏW?^}K>Vp+ӗx%"H&.aH #\6 ;FI$ !X&nч` sgA2q)hn7/;+–kf(,5FuS BQ L=-; .lܪQH:7CY8qx֘jovݧC5>2*9#d\". k@/6y_4n>Zelig/data/sna.ex.RData0000755000176200001440000005616113754260262014371 0ustar liggesuserszw</Bhi" JJ!JR"D4Jfe5H)>{ِP2߽u|y>7Mt)$$$"$"JO#!߄ ']9+$4m>ID|A Y $r6g@{=`86(9j&gl/ h۩(|PJg=݃y<zm (lumx7MgZS1|;K{-Ϣ</Gvp}3?~'X X|NनY` ~g[(Q%{=3TF_0_s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.85/I~+(7n@$t- @'YEswmAP]q달I'3zXaՔ=>n-OveEALZ7Ԯ/xذfOueU.XV=6K/Vly35]:%JBJ t|:dC\=g|ªڶeTi:o{w`dzI'1+f{vGIH!] 9E2.̿Muȳ-ۯ SMMM f$a!Op('"~D'/@h63ͶrfdΊ",C\^QXHm'Lv2OG}42xǑ2lK>;֬i=bFِ-0(4O\< LWՙzu[N7޳~/PRlg@P괡ϯ̯U!{]V.fO T؏ZuyNWISN7DWtZEWPIPaNBŝp&NKŃ:/O :YFpDMB~"fww¾UP8{U8!5華EIJu&y5}]_d( "A]2 vf2֜)e`Jtbg< 'B?M}*{!Q TCBGZ0maxWI:slk&aPjd҇ta6]S0#D Yfx\Ζ4n!')vLE~XBJߴShx邸V[ 1W^K?ma x3vDgnWv:Kڳϯ5'sYX8 5gHY7JKwqWOsrfO AϧY?lpwt8j_8!ۺk@Vx1dV95"c}1MOw䦑 = nRҚch@Zelig/man/0000755000176200001440000000000013764744322012113 5ustar liggesusersZelig/man/vcov-Zelig-method.Rd0000644000176200001440000000054013763512134015675 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-zelig.R \name{vcov,Zelig-method} \alias{vcov,Zelig-method} \title{Variance-covariance method for Zelig objects} \usage{ \S4method{vcov}{Zelig}(object) } \arguments{ \item{object}{An Object of Class Zelig} } \description{ Variance-covariance method for Zelig objects } Zelig/man/Zelig-weibull-class.Rd0000644000176200001440000001040113763512134016205 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-weibull.R \docType{class} \name{Zelig-weibull-class} \alias{Zelig-weibull-class} \alias{zweibull} \title{Weibull Regression for Duration Dependent Variables} \arguments{ \item{formula}{a symbolic representation of the model to be estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the dependent variable and \code{x1} and \code{x2} are the explanatory variables, and \code{y}, \code{x1}, and \code{x2} are contained in the same dataset. (You may include more than two explanatory variables, of course.) The \code{+} symbol means ``inclusion'' not ``addition.'' You may also include interaction terms and main effects in the form \code{x1*x2} without computing them in prior steps; \code{I(x1*x2)} to include only the interaction term and exclude the main effects; and quadratic terms in the form \code{I(x1^2)}.} \item{model}{the name of a statistical model to estimate. For a list of other supported models and their documentation see: \url{http://docs.zeligproject.org/articles/}.} \item{data}{the name of a data frame containing the variables referenced in the formula or a list of multiply imputed data frames each having the same variable names and row numbers (created by \code{Amelia} or \code{\link{to_zelig_mi}}).} \item{...}{additional arguments passed to \code{zelig}, relevant for the model to be estimated.} \item{by}{a factor variable contained in \code{data}. If supplied, \code{zelig} will subset the data frame based on the levels in the \code{by} variable, and estimate a model for each subset. This can save a considerable amount of effort. You may also use \code{by} to run models using MatchIt subclasses.} \item{cite}{If is set to 'TRUE' (default), the model citation will be printed to the console.} } \value{ Depending on the class of model selected, \code{zelig} will return an object with elements including \code{coefficients}, \code{residuals}, and \code{formula} which may be summarized using \code{summary(z.out)} or individually extracted using, for example, \code{coef(z.out)}. See \url{http://docs.zeligproject.org/articles/getters.html} for a list of functions to extract model components. You can also extract whole fitted model objects using \code{\link{from_zelig_model}}. } \description{ Weibull Regression for Duration Dependent Variables } \details{ In addition to the standard inputs, zelig() takes the following additional options for weibull regression: \itemize{ \item \code{robust}: defaults to FALSE. If TRUE, zelig() computes robust standard errors based on sandwich estimators based on the options in cluster. \item \code{cluste}r: if \code{robust = TRUE}, you may select a variable to define groups of correlated observations. Let x3 be a variable that consists of either discrete numeric values, character strings, or factors that define strata. Then \code{z.out <- zelig(y ~ x1 + x2, robust = TRUE, cluster = "x3", model = "exp", data = mydata)} means that the observations can be correlated within the strata defined by the variable x3, and that robust standard errors should be calculated according to those clusters. If robust=TRUErobust=TRUE but cluster is not specified, zelig() assumes that each observation falls into its own cluster. } Additional parameters avaialable to this model include: \itemize{ \item weights: vector of weight values or a name of a variable in the dataset by which to weight the model. For more information see: \url{http://docs.zeligproject.org/articles/weights.html}. \item bootstrap: logical or numeric. If \code{FALSE} don't use bootstraps to robustly estimate uncertainty around model parameters due to sampling error. If an integer is supplied, the number of boostraps to run. For more information see: \url{http://docs.zeligproject.org/articles/bootstraps.html}. } } \section{Methods}{ \describe{ \item{\code{zelig(formula, data, model = NULL, ..., weights = NULL, by, bootstrap = FALSE)}}{The zelig function estimates a variety of statistical models} }} \examples{ data(coalition) z.out <- zelig(Surv(duration, ciep12) ~ fract + numst2,model = "weibull", data = coalition) } \seealso{ Vignette: \url{http://docs.zeligproject.org/articles/zelig_weibull.html} } Zelig/man/eidat.Rd0000644000176200001440000000051213754260262013461 0ustar liggesusers\name{eidat} \alias{eidat} \title{Simulation Data for Ecological Inference} \description{ This dataframe contains a simulated data set to illustrate the models for ecological inference. } \usage{data(eidat)} \format{ A table containing 4 variables ("t0", "t1", "x0", "x1") and 10 observations. } \keyword{datasets} Zelig/man/Zelig-gamma-survey-class.Rd0000644000176200001440000000625313754260262017173 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-gamma-survey.R \docType{class} \name{Zelig-gamma-survey-class} \alias{Zelig-gamma-survey-class} \alias{zgammasurvey} \title{Gamma Regression with Survey Weights} \arguments{ \item{formula}{a symbolic representation of the model to be estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the dependent variable and \code{x1} and \code{x2} are the explanatory variables, and \code{y}, \code{x1}, and \code{x2} are contained in the same dataset. (You may include more than two explanatory variables, of course.) The \code{+} symbol means ``inclusion'' not ``addition.'' You may also include interaction terms and main effects in the form \code{x1*x2} without computing them in prior steps; \code{I(x1*x2)} to include only the interaction term and exclude the main effects; and quadratic terms in the form \code{I(x1^2)}.} \item{model}{the name of a statistical model to estimate. For a list of other supported models and their documentation see: \url{http://docs.zeligproject.org/articles/}.} \item{data}{the name of a data frame containing the variables referenced in the formula or a list of multiply imputed data frames each having the same variable names and row numbers (created by \code{Amelia} or \code{\link{to_zelig_mi}}).} \item{...}{additional arguments passed to \code{zelig}, relevant for the model to be estimated.} \item{by}{a factor variable contained in \code{data}. If supplied, \code{zelig} will subset the data frame based on the levels in the \code{by} variable, and estimate a model for each subset. This can save a considerable amount of effort. You may also use \code{by} to run models using MatchIt subclasses.} \item{cite}{If is set to 'TRUE' (default), the model citation will be printed to the console.} } \value{ Depending on the class of model selected, \code{zelig} will return an object with elements including \code{coefficients}, \code{residuals}, and \code{formula} which may be summarized using \code{summary(z.out)} or individually extracted using, for example, \code{coef(z.out)}. See \url{http://docs.zeligproject.org/articles/getters.html} for a list of functions to extract model components. You can also extract whole fitted model objects using \code{\link{from_zelig_model}}. } \description{ Gamma Regression with Survey Weights } \details{ Additional parameters avaialable to this model include: \itemize{ \item \code{weights}: vector of weight values or a name of a variable in the dataset by which to weight the model. For more information see: \url{http://docs.zeligproject.org/articles/weights.html}. \item \code{bootstrap}: logical or numeric. If \code{FALSE} don't use bootstraps to robustly estimate uncertainty around model parameters due to sampling error. If an integer is supplied, the number of boostraps to run. For more information see: \url{http://docs.zeligproject.org/articles/bootstraps.html}. } } \examples{ library(Zelig) data(api, package="survey") z.out1 <- zelig(api00 ~ meals + yr.rnd, model = "gamma.survey", weights = ~pw, data = apistrat) summary(z.out1) } \seealso{ Vignette: \url{http://docs.zeligproject.org/articles/zelig_gammasurvey.html} } Zelig/man/Zelig-relogit-class.Rd0000644000176200001440000001062013763512134016212 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-relogit.R \docType{class} \name{Zelig-relogit-class} \alias{Zelig-relogit-class} \alias{zrelogit} \title{Rare Events Logistic Regression for Dichotomous Dependent Variables} \arguments{ \item{formula}{a symbolic representation of the model to be estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the dependent variable and \code{x1} and \code{x2} are the explanatory variables, and \code{y}, \code{x1}, and \code{x2} are contained in the same dataset. (You may include more than two explanatory variables, of course.) The \code{+} symbol means ``inclusion'' not ``addition.'' You may also include interaction terms and main effects in the form \code{x1*x2} without computing them in prior steps; \code{I(x1*x2)} to include only the interaction term and exclude the main effects; and quadratic terms in the form \code{I(x1^2)}.} \item{model}{the name of a statistical model to estimate. For a list of other supported models and their documentation see: \url{http://docs.zeligproject.org/articles/}.} \item{data}{the name of a data frame containing the variables referenced in the formula or a list of multiply imputed data frames each having the same variable names and row numbers (created by \code{Amelia} or \code{\link{to_zelig_mi}}).} \item{...}{additional arguments passed to \code{zelig}, relevant for the model to be estimated.} \item{by}{a factor variable contained in \code{data}. If supplied, \code{zelig} will subset the data frame based on the levels in the \code{by} variable, and estimate a model for each subset. This can save a considerable amount of effort. You may also use \code{by} to run models using MatchIt subclasses.} \item{cite}{If is set to 'TRUE' (default), the model citation will be printed to the console.} } \value{ Depending on the class of model selected, \code{zelig} will return an object with elements including \code{coefficients}, \code{residuals}, and \code{formula} which may be summarized using \code{summary(z.out)} or individually extracted using, for example, \code{coef(z.out)}. See \url{http://docs.zeligproject.org/articles/getters.html} for a list of functions to extract model components. You can also extract whole fitted model objects using \code{\link{from_zelig_model}}. } \description{ Rare Events Logistic Regression for Dichotomous Dependent Variables } \details{ The relogit procedure supports four optional arguments in addition to the standard arguments for zelig(). You may additionally use: \itemize{ \item \code{tau}: a vector containing either one or two values for \code{tau}, the true population fraction of ones. Use, for example, tau = c(0.05, 0.1) to specify that the lower bound on tau is 0.05 and the upper bound is 0.1. If left unspecified, only finite-sample bias correction is performed, not case-control correction. \item \code{case.control}: if tau is specified, choose a method to correct for case-control sampling design: "prior" (default) or "weighting". \item \code{bias.correct}: a logical value of \code{TRUE} (default) or \code{FALSE} indicating whether the intercept should be corrected for finite sample (rare events) bias. } Additional parameters avaialable to many models include: \itemize{ \item \code{weights}: vector of weight values or a name of a variable in the dataset by which to weight the model. For more information see: \url{http://docs.zeligproject.org/articles/weights.html}. \item \code{bootstrap}: logical or numeric. If \code{FALSE} don't use bootstraps to robustly estimate uncertainty around model parameters due to sampling error. If an integer is supplied, the number of boostraps to run. For more information see: \url{http://docs.zeligproject.org/articles/bootstraps.html}. } } \section{Methods}{ \describe{ \item{\code{modcall_formula_transformer()}}{Transform model call formula.} \item{\code{show(signif.stars = FALSE, subset = NULL, bagging = FALSE)}}{Display a Zelig object} \item{\code{zelig(formula, data, model = NULL, ..., weights = NULL, by, bootstrap = FALSE)}}{The zelig function estimates a variety of statistical models} }} \examples{ library(Zelig) data(mid) z.out1 <- zelig(conflict ~ major + contig + power + maxdem + mindem + years, data = mid, model = "relogit", tau = 1042/303772) summary(z.out1) } \seealso{ Vignette: \url{http://docs.zeligproject.org/articles/zelig_relogit.html} } Zelig/man/klein.Rd0000644000176200001440000000142213754260262013476 0ustar liggesusers\name{klein} \alias{klein} \title{Simulation Data for model Two-Stage Least Square (twosls) that corresponds to method 2SLS of systemfit} \description{ Dataframe contains annual observations of US economy from 1920 to 1940. The columns are, Year, C=Consumption, P=Corporate profits, P1=Previous year corporate profit,Wtot=Total wage, Wp=Private wage bill, Wg=Government wage bill,I=Investment, K1=Previous year capital stock,X=GNP,G=Government spending, T=Taxes, X1=Previous year GNP, Tm=Year-1931. } \usage{data(klein)} \format{ A table containing 14 variables ("year", "C", "P", "P1","Wtot", "Wp", "Wg", "I", "K1","X", "G", "T", "X1", "Tm") and 21 observations. } \source{http://pages.stern.nyu.edu/~wgreene/Text/econometricanalysis.htm} \keyword{datasets} Zelig/man/mi.Rd0000644000176200001440000000061013754260262012777 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{mi} \alias{mi} \title{Enables backwards compatability for preparing non-amelia imputed data sets for \code{zelig}.} \usage{ mi(...) } \arguments{ \item{...}{a set of \code{data.frame}'s} } \value{ an \code{mi} object composed of a list of data frames. } \description{ See \code{\link{to_zelig_mi}} } Zelig/man/Zelig-lognorm-class.Rd0000644000176200001440000000777713763512134016245 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-lognorm.R \docType{class} \name{Zelig-lognorm-class} \alias{Zelig-lognorm-class} \alias{zlognorm} \title{Log-Normal Regression for Duration Dependent Variables} \arguments{ \item{formula}{a symbolic representation of the model to be estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the dependent variable and \code{x1} and \code{x2} are the explanatory variables, and \code{y}, \code{x1}, and \code{x2} are contained in the same dataset. (You may include more than two explanatory variables, of course.) The \code{+} symbol means ``inclusion'' not ``addition.'' You may also include interaction terms and main effects in the form \code{x1*x2} without computing them in prior steps; \code{I(x1*x2)} to include only the interaction term and exclude the main effects; and quadratic terms in the form \code{I(x1^2)}.} \item{model}{the name of a statistical model to estimate. For a list of other supported models and their documentation see: \url{http://docs.zeligproject.org/articles/}.} \item{data}{the name of a data frame containing the variables referenced in the formula or a list of multiply imputed data frames each having the same variable names and row numbers (created by \code{Amelia} or \code{\link{to_zelig_mi}}).} \item{...}{additional arguments passed to \code{zelig}, relevant for the model to be estimated.} \item{by}{a factor variable contained in \code{data}. If supplied, \code{zelig} will subset the data frame based on the levels in the \code{by} variable, and estimate a model for each subset. This can save a considerable amount of effort. You may also use \code{by} to run models using MatchIt subclasses.} \item{cite}{If is set to 'TRUE' (default), the model citation will be printed to the console.} \item{robust}{defaults to FALSE. If TRUE, zelig() computes robust standard errors based on sandwich estimators (see and ) based on the options in cluster.} \item{cluster}{if robust = TRUE, you may select a variable to define groups of correlated observations. Let x3 be a variable that consists of either discrete numeric values, character strings, or factors that define strata. Then means that the observations can be correlated within the strata defined by the variable x3, and that robust standard errors should be calculated according to those clusters. If robust = TRUE but cluster is not specified, zelig() assumes that each observation falls into its own cluster.} } \value{ Depending on the class of model selected, \code{zelig} will return an object with elements including \code{coefficients}, \code{residuals}, and \code{formula} which may be summarized using \code{summary(z.out)} or individually extracted using, for example, \code{coef(z.out)}. See \url{http://docs.zeligproject.org/articles/getters.html} for a list of functions to extract model components. You can also extract whole fitted model objects using \code{\link{from_zelig_model}}. } \description{ Log-Normal Regression for Duration Dependent Variables } \details{ Additional parameters avaialable to many models include: \itemize{ \item weights: vector of weight values or a name of a variable in the dataset by which to weight the model. For more information see: \url{http://docs.zeligproject.org/articles/weights.html}. \item bootstrap: logical or numeric. If \code{FALSE} don't use bootstraps to robustly estimate uncertainty around model parameters due to sampling error. If an integer is supplied, the number of boostraps to run. For more information see: \url{http://docs.zeligproject.org/articles/bootstraps.html}. } } \section{Methods}{ \describe{ \item{\code{zelig(formula, data, model = NULL, ..., weights = NULL, by, bootstrap = FALSE)}}{The zelig function estimates a variety of statistical models} }} \examples{ library(Zelig) data(coalition) z.out <- zelig(Surv(duration, ciep12) ~ fract + numst2, model ="lognorm", data = coalition) summary(z.out) } \seealso{ Vignette: \url{http://docs.zeligproject.org/articles/zelig_lognorm.html} } Zelig/man/coefficients-Zelig-method.Rd0000644000176200001440000000063613763512134017367 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-zelig.R \name{coefficients,Zelig-method} \alias{coefficients,Zelig-method} \title{Method for extracting estimated coefficients from Zelig objects} \usage{ \S4method{coefficients}{Zelig}(object) } \arguments{ \item{object}{An Object of Class Zelig} } \description{ Method for extracting estimated coefficients from Zelig objects } Zelig/man/approval.Rd0000644000176200001440000000062113754260262014220 0ustar liggesusers\name{approval} \alias{approval} \title{U.S. Presidential Approval Data} \description{ Monthy public opinion data for 2001-2006. } \usage{data(approval)} \format{ A table containing 8 variables ("month", "year", "approve", "disapprove", "unsure", "sept.oct.2001", "iraq.war", and "avg.price") and 65 observations. } \source{ICPSR} \references{ Stuff here } \keyword{datasets} Zelig/man/Zelig-class.Rd0000644000176200001440000001023713764665661014572 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-zelig.R \docType{class} \name{Zelig-class} \alias{Zelig-class} \alias{z} \title{Zelig reference class} \description{ Zelig website: \url{https://zeligproject.org/} } \section{Fields}{ \describe{ \item{\code{fn}}{R function to call to wrap} \item{\code{formula}}{Zelig formula} \item{\code{weights}}{[forthcoming]} \item{\code{name}}{name of the Zelig model} \item{\code{data}}{data frame or matrix} \item{\code{by}}{split the data by factors} \item{\code{mi}}{work with imputed dataset} \item{\code{idx}}{model index} \item{\code{zelig.call}}{Zelig function call} \item{\code{model.call}}{wrapped function call} \item{\code{zelig.out}}{estimated zelig model(s)} \item{\code{setx.out}}{set values} \item{\code{setx.labels}}{pretty-print qi} \item{\code{bsetx}}{is x set?} \item{\code{bsetx1}}{is x1 set?} \item{\code{bsetrange}}{is range set?} \item{\code{bsetrange1}}{is range1 set?} \item{\code{range}}{range} \item{\code{range1}}{range1} \item{\code{test.statistics}}{list of test statistics} \item{\code{sim.out}}{simulated qi's} \item{\code{simparam}}{simulated parameters} \item{\code{num}}{number of simulations} \item{\code{authors}}{Zelig model authors} \item{\code{zeligauthors}}{Zelig authors} \item{\code{modelauthors}}{wrapped model authors} \item{\code{packageauthors}}{wrapped package authors} \item{\code{refs}}{citation information} \item{\code{year}}{model is released} \item{\code{description}}{model description} \item{\code{url}}{model URL} \item{\code{url.docs}}{model documentation URL} \item{\code{category}}{model category} \item{\code{vignette.url}}{vignette URL} \item{\code{json}}{JSON export} \item{\code{ljson}}{JSON export} \item{\code{outcome}}{JSON export} \item{\code{wrapper}}{JSON export} \item{\code{explanatory}}{JSON export} \item{\code{mcunit.test}}{unit testing} \item{\code{with.feedback}}{Feedback} \item{\code{robust.se}}{return robust standard errors} }} \section{Methods}{ \describe{ \item{\code{ATT(treatment, treated = 1, quietly = TRUE, num = NULL)}}{Generic Method for Computing Simulated (Sample) Average Treatment Effects on the Treated} \item{\code{cite()}}{Provide citation information about Zelig and Zelig model, and about wrapped package and wrapped model} \item{\code{feedback()}}{Send feedback to the Zelig team} \item{\code{from_zelig_model()}}{Extract the original fitted model object from a zelig call. Note only works for models using directly wrapped functions.} \item{\code{get_coef(nonlist = FALSE)}}{Get estimated model coefficients} \item{\code{get_df_residual()}}{Get residual degrees-of-freedom} \item{\code{get_fitted(...)}}{Get estimated fitted values} \item{\code{get_model_data()}}{Get data used to estimate the model} \item{\code{get_names()}}{Return Zelig object field names} \item{\code{get_predict(...)}}{Get predicted values} \item{\code{get_pvalue()}}{Get estimated model p-values} \item{\code{get_qi(qi = "ev", xvalue = "x", subset = NULL)}}{Get quantities of interest} \item{\code{get_residuals(...)}}{Get estimated model residuals} \item{\code{get_se()}}{Get estimated model standard errors} \item{\code{get_vcov()}}{Get estimated model variance-covariance matrix} \item{\code{graph(...)}}{Plot the quantities of interest} \item{\code{help()}}{Open the model vignette from https://zeligproject.org/} \item{\code{packagename()}}{Automatically retrieve wrapped package name} \item{\code{references(style = "sphinx")}}{Construct a reference list specific to a Zelig model.} \item{\code{set(..., fn = list(numeric = mean, ordered = Median))}}{Setting Explanatory Variable Values} \item{\code{sim(num = NULL)}}{Generic Method for Computing and Organizing Simulated Quantities of Interest} \item{\code{simATT(simparam, data, depvar, treatment, treated)}}{Simulate an Average Treatment on the Treated} \item{\code{summarise(...)}}{Display a Zelig object} \item{\code{summarize(...)}}{Display a Zelig object} \item{\code{toJSON()}}{Convert Zelig object to JSON format} \item{\code{zelig(formula, data, model = NULL, ..., weights = NULL, by, bootstrap = FALSE)}}{The zelig function estimates a variety of statistical models} }} Zelig/man/SupremeCourt.Rd0000644000176200001440000000200713754260262015031 0ustar liggesusers\name{SupremeCourt} \alias{SupremeCourt} \title{U.S. Supreme Court Vote Matrix} \description{ This dataframe contains a matrix votes cast by U.S. Supreme Court justices in all cases in the 2000 term. } \usage{data(SupremeCourt)} \format{ The dataframe has contains data for justices Rehnquist, Stevens, O'Connor, Scalia, Kennedy, Souter, Thomas, Ginsburg, and Breyer for the 2000 term of the U.S. Supreme Court. It contains data from 43 non-unanimous cases. The votes are coded liberal (1) and conservative (0) using the protocol of Spaeth (2003). The unit of analysis is the case citation (ANALU=0). We are concerned with formally decided cases issued with written opinions, after full oral argument and cases decided by an equally divided vote (DECTYPE=1,5,6,7).} \source{ Harold J. Spaeth (2005). ``Original United States Supreme Court Database: 1953-2004 Terms.'' . } \keyword{datasets} Zelig/man/hoff.Rd0000644000176200001440000000135713754260262013325 0ustar liggesusers\name{hoff} \alias{hoff} \title{Social Security Expenditure Data} \description{ This data set contains annual social security expenditure (as percent of budget lagged by two years), the relative frequency of mentions social justice received in the party's platform in each year, and whether the president is Republican or Democrat. } \usage{data(hoff)} \format{A table containing 5 variables ("year", "L2SocSec", "Just503D", "Just503R", "RGovDumy") and 36 observations.} \source{ICPSR (replication dataset s1109)} \references{ Gary King and Michael Laver. ``On Party Platforms, Mandates, and Government Spending,'' \emph{American Political Science Review}, Vol. 87, No. 3 (September, 1993): pp. 744-750. } \keyword{datasets} Zelig/man/get_pvalue.Rd0000644000176200001440000000054413754260262014533 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/wrappers.R \name{get_pvalue} \alias{get_pvalue} \title{Extract p-values from a Zelig estimated model} \usage{ get_pvalue(object) } \arguments{ \item{object}{an object of class Zelig} } \description{ Extract p-values from a Zelig estimated model } \author{ Christopher Gandrud } Zelig/man/Zelig-mlogit-bayes-class.Rd0000644000176200001440000001207213754260262017146 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-mlogit-bayes.R \docType{class} \name{Zelig-mlogit-bayes-class} \alias{Zelig-mlogit-bayes-class} \alias{zmlogitbayes} \title{Bayesian Multinomial Logistic Regression} \arguments{ \item{formula}{a symbolic representation of the model to be estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the dependent variable and \code{x1} and \code{x2} are the explanatory variables, and \code{y}, \code{x1}, and \code{x2} are contained in the same dataset. (You may include more than two explanatory variables, of course.) The \code{+} symbol means ``inclusion'' not ``addition.'' You may also include interaction terms and main effects in the form \code{x1*x2} without computing them in prior steps; \code{I(x1*x2)} to include only the interaction term and exclude the main effects; and quadratic terms in the form \code{I(x1^2)}.} \item{model}{the name of a statistical model to estimate. For a list of other supported models and their documentation see: \url{http://docs.zeligproject.org/articles/}.} \item{data}{the name of a data frame containing the variables referenced in the formula or a list of multiply imputed data frames each having the same variable names and row numbers (created by \code{Amelia} or \code{\link{to_zelig_mi}}).} \item{...}{additional arguments passed to \code{zelig}, relevant for the model to be estimated.} \item{by}{a factor variable contained in \code{data}. If supplied, \code{zelig} will subset the data frame based on the levels in the \code{by} variable, and estimate a model for each subset. This can save a considerable amount of effort. You may also use \code{by} to run models using MatchIt subclasses.} \item{cite}{If is set to 'TRUE' (default), the model citation will be printed to the console.} } \value{ Depending on the class of model selected, \code{zelig} will return an object with elements including \code{coefficients}, \code{residuals}, and \code{formula} which may be summarized using \code{summary(z.out)} or individually extracted using, for example, \code{coef(z.out)}. See \url{http://docs.zeligproject.org/articles/getters.html} for a list of functions to extract model components. You can also extract whole fitted model objects using \code{\link{from_zelig_model}}. } \description{ Bayesian Multinomial Logistic Regression } \details{ zelig() accepts the following arguments for mlogit.bayes: \itemize{ \item \code{baseline}: either a character string or numeric value (equal to one of the observed values in the dependent variable) specifying a baseline category. The default value is NA which sets the baseline to the first alphabetical or numerical unique value of the dependent variable. } Additional parameters avaialable to this model include: \itemize{ \item \code{weights}: vector of weight values or a name of a variable in the dataset by which to weight the model. For more information see: \url{http://docs.zeligproject.org/articles/weights.html}. \item \code{burnin}: number of the initial MCMC iterations to be discarded (defaults to 1,000). \item \code{mcmc}: number of the MCMC iterations after burnin (defaults to 10,000). \item \code{mcmc.method}: either "MH" or "slice", specifying whether to use Metropolis Algorithm or slice sampler. The default value is MH. \item \code{thin}: thinning interval for the Markov chain. Only every thin-th draw from the Markov chain is kept. The value of mcmc must be divisible by this value. The default value is 1. \item \code{tune}: tuning parameter for the Metropolis-Hasting step, either a scalar or a numeric vector (for kk coefficients, enter a kk vector). The tuning parameter should be set such that the acceptance rate is satisfactory (between 0.2 and 0.5). The default value is 1.1. \item \code{verbose}: defaults to FALSE. If TRUE, the progress of the sampler (every 10\%) is printed to the screen. \item \code{seed}: seed for the random number generator. The default is \code{NA} which corresponds to a random seed of 12345. \item \code{beta.start}: starting values for the Markov chain, either a scalar or vector with length equal to the number of estimated coefficients. The default is \code{NA}, such that the maximum likelihood estimates are used as the starting values. } Use the following parameters to specify the model's priors: \itemize{ \item \code{b0}: prior mean for the coefficients, either a numeric vector or a scalar. If a scalar value, that value will be the prior mean for all the coefficients. The default is 0. \item \code{B0}: prior precision parameter for the coefficients, either a square matrix (with the dimensions equal to the number of the coefficients) or a scalar. If a scalar value, that value times an identity matrix will be the prior precision parameter. The default is 0, which leads to an improper prior. } } \examples{ data(mexico) z.out <- zelig(vote88 ~ pristr + othcok + othsocok,model = "mlogit.bayes", data = mexico,verbose = FALSE) } \seealso{ Vignette: \url{http://docs.zeligproject.org/articles/zelig_mlogitbayes.html} } Zelig/man/vcov_gee.Rd0000644000176200001440000000042113754260262014167 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{vcov_gee} \alias{vcov_gee} \title{Find vcov for GEE models} \usage{ vcov_gee(obj) } \arguments{ \item{obj}{a \code{geeglm} class object.} } \description{ Find vcov for GEE models } Zelig/man/to_zelig.Rd0000644000176200001440000000123113754260262014206 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/interface.R \name{to_zelig} \alias{to_zelig} \title{Coerce a non-Zelig fitted model object to a Zelig class object} \usage{ to_zelig(obj) } \arguments{ \item{obj}{a fitted model object fitted using \code{lm} and many using \code{glm}. Note: more intended in future Zelig releases.} } \description{ Coerce a non-Zelig fitted model object to a Zelig class object } \examples{ library(dplyr) lm.out <- lm(Fertility ~ Education, data = swiss) z.out <- to_zelig(lm.out) # to_zelig called from within setx setx(z.out) \%>\% sim() \%>\% plot() } \author{ Christopher Gandrud and Ista Zhan } Zelig/man/Zelig-logit-survey-class.Rd0000644000176200001440000001103313754260262017217 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-logit-survey.R \docType{class} \name{Zelig-logit-survey-class} \alias{Zelig-logit-survey-class} \alias{zlogitsurvey} \title{Logit Regression with Survey Weights} \arguments{ \item{formula}{a symbolic representation of the model to be estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the dependent variable and \code{x1} and \code{x2} are the explanatory variables, and \code{y}, \code{x1}, and \code{x2} are contained in the same dataset. (You may include more than two explanatory variables, of course.) The \code{+} symbol means ``inclusion'' not ``addition.'' You may also include interaction terms and main effects in the form \code{x1*x2} without computing them in prior steps; \code{I(x1*x2)} to include only the interaction term and exclude the main effects; and quadratic terms in the form \code{I(x1^2)}.} \item{model}{the name of a statistical model to estimate. For a list of other supported models and their documentation see: \url{http://docs.zeligproject.org/articles/}.} \item{data}{the name of a data frame containing the variables referenced in the formula or a list of multiply imputed data frames each having the same variable names and row numbers (created by \code{Amelia} or \code{\link{to_zelig_mi}}).} \item{...}{additional arguments passed to \code{zelig}, relevant for the model to be estimated.} \item{by}{a factor variable contained in \code{data}. If supplied, \code{zelig} will subset the data frame based on the levels in the \code{by} variable, and estimate a model for each subset. This can save a considerable amount of effort. You may also use \code{by} to run models using MatchIt subclasses.} \item{cite}{If is set to 'TRUE' (default), the model citation will be printed to the console.} \item{below}{(defaults to 0) The point at which the dependent variable is censored from below. If any values in the dependent variable are observed to be less than the censoring point, it is assumed that that particular observation is censored from below at the observed value. (See for a Bayesian implementation that supports both left and right censoring.)} \item{robust}{defaults to FALSE. If TRUE, zelig() computes robust standard errors based on sandwich estimators (see and ) and the options selected in cluster.} \item{if}{robust = TRUE, you may select a variable to define groups of correlated observations. Let x3 be a variable that consists of either discrete numeric values, character strings, or factors that define strata. Then z.out <- zelig(y ~ x1 + x2, robust = TRUE, cluster = "x3", model = "tobit", data = mydata) means that the observations can be correlated within the strata defined by the variable x3, and that robust standard errors should be calculated according to those clusters. If robust = TRUE but cluster is not specified, zelig() assumes that each observation falls into its own cluster.} } \value{ Depending on the class of model selected, \code{zelig} will return an object with elements including \code{coefficients}, \code{residuals}, and \code{formula} which may be summarized using \code{summary(z.out)} or individually extracted using, for example, \code{coef(z.out)}. See \url{http://docs.zeligproject.org/articles/getters.html} for a list of functions to extract model components. You can also extract whole fitted model objects using \code{\link{from_zelig_model}}. } \description{ Logit Regression with Survey Weights } \details{ Additional parameters avaialable to this model include: \itemize{ \item weights: vector of weight values or a name of a variable in the dataset by which to weight the model. For more information see: \url{http://docs.zeligproject.org/articles/weights.html}. \item bootstrap: logical or numeric. If \code{FALSE} don't use bootstraps to robustly estimate uncertainty around model parameters due to sampling error. If an integer is supplied, the number of boostraps to run. For more information see: \url{http://docs.zeligproject.org/articles/bootstraps.html}. } } \examples{ data(api, package = "survey") apistrat$yr.rnd.numeric <- as.numeric(apistrat$yr.rnd == "Yes") z.out1 <- zelig(yr.rnd.numeric ~ meals + mobility, model = "logit.survey", weights = apistrat$pw, data = apistrat) summary(z.out1) x.low <- setx(z.out1, meals= quantile(apistrat$meals, 0.2)) x.high <- setx(z.out1, meals= quantile(apistrat$meals, 0.8)) s.out1 <- sim(z.out1, x = x.low, x1 = x.high) summary(s.out1) plot(s.out1) } \seealso{ Vignette: \url{http://docs.zeligproject.org/articles/zelig_logitsurvey.html} } Zelig/man/macro.Rd0000644000176200001440000000146513754260262013504 0ustar liggesusers\name{macro} \alias{macro} \title{Macroeconomic Data} \description{ Selected macroeconomic indicators for Austria, Belgium, Canada, Denmark, Finland, France, Italy, Japan, the Netherlands, Norway, Sweden, the United Kingdom, the United States, and West Germany for the period 1966-1990. } \usage{data(macro)} \format{ A table containing 6 variables ("country", "year", "gdp", "unem", "capmob", and "trade") and 350 observations. } \source{ICPSR} \references{ King, Gary, Michael Tomz and Jason Wittenberg. ICPSR Publication Related Archive, 1225. King, Gary, Michael Tomz and Jason Wittenberg (2000). ``Making the Most of Statistical Analyses: Improving Interpretation and Presentation,'' \emph{American Journal of Political Science}, vol. 44, pp. 341-355. } \keyword{datasets} Zelig/man/summary.Arima.Rd0000644000176200001440000000062213754260262015122 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-timeseries.R \name{summary.Arima} \alias{summary.Arima} \title{Summary of an object of class Arima} \usage{ \method{summary}{Arima}(object, ...) } \arguments{ \item{object}{An object of class Arima} \item{...}{Additional parameters} } \value{ The original object } \description{ Summary of an object of class Arima } Zelig/man/Zelig-binchoice-class.Rd0000644000176200001440000000051713754260262016476 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-binchoice.R \docType{class} \name{Zelig-binchoice-class} \alias{Zelig-binchoice-class} \alias{zbinchoice} \title{Binary Choice object for inheritance across models in Zelig} \description{ Binary Choice object for inheritance across models in Zelig } Zelig/man/Zelig-quantile-class.Rd0000644000176200001440000001174213763512134016375 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-quantile.R \docType{class} \name{Zelig-quantile-class} \alias{Zelig-quantile-class} \alias{zquantile} \title{Quantile Regression for Continuous Dependent Variables} \arguments{ \item{formula}{a symbolic representation of the model to be estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the dependent variable and \code{x1} and \code{x2} are the explanatory variables, and \code{y}, \code{x1}, and \code{x2} are contained in the same dataset. (You may include more than two explanatory variables, of course.) The \code{+} symbol means ``inclusion'' not ``addition.'' You may also include interaction terms and main effects in the form \code{x1*x2} without computing them in prior steps; \code{I(x1*x2)} to include only the interaction term and exclude the main effects; and quadratic terms in the form \code{I(x1^2)}.} \item{model}{the name of a statistical model to estimate. For a list of other supported models and their documentation see: \url{http://docs.zeligproject.org/articles/}.} \item{data}{the name of a data frame containing the variables referenced in the formula or a list of multiply imputed data frames each having the same variable names and row numbers (created by \code{Amelia} or \code{\link{to_zelig_mi}}).} \item{...}{additional arguments passed to \code{zelig}, relevant for the model to be estimated.} \item{by}{a factor variable contained in \code{data}. If supplied, \code{zelig} will subset the data frame based on the levels in the \code{by} variable, and estimate a model for each subset. This can save a considerable amount of effort. You may also use \code{by} to run models using MatchIt subclasses.} \item{cite}{If is set to 'TRUE' (default), the model citation will be printed to the console.} } \value{ Depending on the class of model selected, \code{zelig} will return an object with elements including \code{coefficients}, \code{residuals}, and \code{formula} which may be summarized using \code{summary(z.out)} or individually extracted using, for example, \code{coef(z.out)}. See \url{http://docs.zeligproject.org/articles/getters.html} for a list of functions to extract model components. You can also extract whole fitted model objects using \code{\link{from_zelig_model}}. } \description{ Quantile Regression for Continuous Dependent Variables } \details{ In addition to the standard inputs, \code{zelig} takes the following additional options for quantile regression: \itemize{ \item \code{tau}: defaults to 0.5. Specifies the conditional quantile(s) that will be estimated. 0.5 corresponds to estimating the conditional median, 0.25 and 0.75 correspond to the conditional quartiles, etc. tau vectors with length greater than 1 are not currently supported. If tau is set outside of the interval [0,1], zelig returns the solution for all possible conditional quantiles given the data, but does not support inference on this fit (setx and sim will fail). \item \code{se}: a string value that defaults to "nid". Specifies the method by which the covariance matrix of coefficients is estimated during the sim stage of analysis. \code{se} can take the following values, which are passed to the \code{summary.rq} function from the \code{quantreg} package. These descriptions are copied from the \code{summary.rq} documentation. \itemize{ \item \code{"iid"} which presumes that the errors are iid and computes an estimate of the asymptotic covariance matrix as in KB(1978). \item \code{"nid"} which presumes local (in tau) linearity (in x) of the the conditional quantile functions and computes a Huber sandwich estimate using a local estimate of the sparsity. \item \code{"ker"} which uses a kernel estimate of the sandwich as proposed by Powell(1990). } \item \code{...}: additional options passed to rq when fitting the model. See documentation for rq in the quantreg package for more information. } Additional parameters avaialable to this model include: \itemize{ \item \code{weights}: vector of weight values or a name of a variable in the dataset by which to weight the model. For more information see: \url{http://docs.zeligproject.org/articles/weights.html}. \item \code{bootstrap}: logical or numeric. If \code{FALSE} don't use bootstraps to robustly estimate uncertainty around model parameters due to sampling error. If an integer is supplied, the number of boostraps to run. For more information see: \url{http://docs.zeligproject.org/articles/bootstraps.html}. } } \section{Methods}{ \describe{ \item{\code{zelig(formula, data, model = NULL, ..., weights = NULL, by, bootstrap = FALSE)}}{The zelig function estimates a variety of statistical models} }} \examples{ library(Zelig) data(stackloss) z.out1 <- zelig(stack.loss ~ Air.Flow + Water.Temp + Acid.Conc., model = "rq", data = stackloss,tau = 0.5) summary(z.out1) } \seealso{ Vignette: \url{http://docs.zeligproject.org/articles/zelig_quantile.html} } Zelig/man/ci.plot.Rd0000644000176200001440000000405413754260262013750 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plots.R \name{ci.plot} \alias{ci.plot} \title{Method for plotting qi simulations across a range within a variable, with confidence intervals} \usage{ ci.plot(obj, qi="ev", var=NULL, ..., main = NULL, sub = NULL, xlab = NULL, ylab = NULL, xlim = NULL, ylim = NULL, legcol="gray20", col=NULL, leg=1, legpos= NULL, ci = c(80, 95, 99.9), discont=NULL) } \arguments{ \item{obj}{A reference class zelig5 object} \item{qi}{a character-string specifying the quantity of interest to plot} \item{var}{The variable to be used on the x-axis. Default is the variable across all the chosen values with smallest nonzero variance} \item{...}{Parameters to be passed to the `truehist' function which is implicitly called for numeric simulations} \item{main}{a character-string specifying the main heading of the plot} \item{sub}{a character-string specifying the sub heading of the plot} \item{xlab}{a character-string specifying the label for the x-axis} \item{ylab}{a character-string specifying the label for the y-axis} \item{xlim}{Limits to the x-axis} \item{ylim}{Limits to the y-axis} \item{legcol}{``legend color'', an valid color used for plotting the line colors in the legend} \item{col}{a valid vector of colors of at least length 3 to use to color the confidence intervals} \item{leg}{``legend position'', an integer from 1 to 4, specifying the position of the legend. 1 to 4 correspond to ``SE'', ``SW'', ``NW'', and ``NE'' respectively. Setting to 0 or ``n'' turns off the legend.} \item{legpos}{``legend type'', exact coordinates and sizes for legend. Overrides argment ``leg.type''} \item{ci}{vector of length three of confidence interval levels to draw.} \item{discont}{optional point of discontinuity along the x-axis at which to interupt the graph} } \value{ the current graphical parameters. This is subject to change in future implementations of Zelig } \description{ Method for plotting qi simulations across a range within a variable, with confidence intervals } \author{ James Honaker } Zelig/man/is_simsrange.Rd0000644000176200001440000000072313754260262015062 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/assertions.R \name{is_simsrange} \alias{is_simsrange} \title{Check if simulations for a range of fitted values are present in sim.out} \usage{ is_simsrange(x, fail = TRUE) } \arguments{ \item{x}{a sim.out method} \item{fail}{logical whether to return an error if simulation range is not present.} } \description{ Check if simulations for a range of fitted values are present in sim.out } Zelig/man/qi_slimmer.Rd0000644000176200001440000000302413763512134014533 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/interface.R \name{qi_slimmer} \alias{qi_slimmer} \title{Find the median and a central interval of simulated quantity of interest distributions} \usage{ qi_slimmer(df, qi_type = "ev", ci = 0.95) } \arguments{ \item{df}{a tidy-formatted data frame of simulated quantities of interest created by \code{\link{zelig_qi_to_df}}.} \item{qi_type}{character string either \code{ev} or \code{pv} for returning the central intervals for the expected value or predicted value, respectively.} \item{ci}{numeric. The central interval to return, expressed on the \verb{(0, 100]} or the equivalent \verb{(0, 1]} interval.} } \description{ Find the median and a central interval of simulated quantity of interest distributions } \details{ A tidy-formatted data frame with the following columns: \itemize{ \item The values fitted with \code{\link{setx}} \item \code{qi_ci_min}: the minimum value of the central interval specified with \code{ci} \item \code{qi_ci_median}: the median of the simulated quantity of interest distribution \item \code{qi_ci_max}: the maximum value of the central interval specified with \code{ci} } } \examples{ library(dplyr) qi.central.interval <- zelig(Petal.Width ~ Petal.Length + Species, data = iris, model = "ls") \%>\% setx(Petal.Length = 2:4, Species = "setosa") \%>\% sim() \%>\% zelig_qi_to_df() \%>\% qi_slimmer() } \seealso{ \code{\link{zelig_qi_to_df}} } \author{ Christopher Gandrud } Zelig/man/Zelig-logit-bayes-class.Rd0000644000176200001440000001105513754260262016771 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-logit-bayes.R \docType{class} \name{Zelig-logit-bayes-class} \alias{Zelig-logit-bayes-class} \alias{zlogitbayes} \title{Bayesian Logit Regression} \arguments{ \item{formula}{a symbolic representation of the model to be estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the dependent variable and \code{x1} and \code{x2} are the explanatory variables, and \code{y}, \code{x1}, and \code{x2} are contained in the same dataset. (You may include more than two explanatory variables, of course.) The \code{+} symbol means ``inclusion'' not ``addition.'' You may also include interaction terms and main effects in the form \code{x1*x2} without computing them in prior steps; \code{I(x1*x2)} to include only the interaction term and exclude the main effects; and quadratic terms in the form \code{I(x1^2)}.} \item{model}{the name of a statistical model to estimate. For a list of other supported models and their documentation see: \url{http://docs.zeligproject.org/articles/}.} \item{data}{the name of a data frame containing the variables referenced in the formula or a list of multiply imputed data frames each having the same variable names and row numbers (created by \code{Amelia} or \code{\link{to_zelig_mi}}).} \item{...}{additional arguments passed to \code{zelig}, relevant for the model to be estimated.} \item{by}{a factor variable contained in \code{data}. If supplied, \code{zelig} will subset the data frame based on the levels in the \code{by} variable, and estimate a model for each subset. This can save a considerable amount of effort. You may also use \code{by} to run models using MatchIt subclasses.} \item{cite}{If is set to 'TRUE' (default), the model citation will be printed to the console.} } \value{ Depending on the class of model selected, \code{zelig} will return an object with elements including \code{coefficients}, \code{residuals}, and \code{formula} which may be summarized using \code{summary(z.out)} or individually extracted using, for example, \code{coef(z.out)}. See \url{http://docs.zeligproject.org/articles/getters.html} for a list of functions to extract model components. You can also extract whole fitted model objects using \code{\link{from_zelig_model}}. } \description{ Bayesian Logit Regression } \details{ Additional parameters avaialable to this model include: \itemize{ \item \code{weights}: vector of weight values or a name of a variable in the dataset by which to weight the model. For more information see: \url{http://docs.zeligproject.org/articles/weights.html}. \item \code{burnin}: number of the initial MCMC iterations to be discarded (defaults to 1,000). \item \code{mcmc}: number of the MCMC iterations after burnin (defaults to 10,000). \item \code{thin}: thinning interval for the Markov chain. Only every thin-th draw from the Markov chain is kept. The value of mcmc must be divisible by this value. The default value is 1. \item \code{verbose}: defaults to FALSE. If TRUE, the progress of the sampler (every 10\%) is printed to the screen. \item \code{seed}: seed for the random number generator. The default is \code{NA} which corresponds to a random seed of 12345. \item \code{beta.start}: starting values for the Markov chain, either a scalar or vector with length equal to the number of estimated coefficients. The default is \code{NA}, such that the maximum likelihood estimates are used as the starting values. } Use the following parameters to specify the model's priors: \itemize{ \item \code{b0}: prior mean for the coefficients, either a numeric vector or a scalar. If a scalar value, that value will be the prior mean for all the coefficients. The default is 0. \item \code{B0}: prior precision parameter for the coefficients, either a square matrix (with the dimensions equal to the number of the coefficients) or a scalar. If a scalar value, that value times an identity matrix will be the prior precision parameter. The default is 0, which leads to an improper prior. } Use the following arguments to specify optional output for the model: \itemize{ \item \code{bayes.resid}: defaults to FALSE. If TRUE, the latent Bayesian residuals for all observations are returned. Alternatively, users can specify a vector of observations for which the latent residuals should be returned. } } \examples{ data(turnout) z.out <- zelig(vote ~ race + educate, model = "logit.bayes",data = turnout, verbose = FALSE) } \seealso{ Vignette: \url{http://docs.zeligproject.org/articles/zelig_logitbayes.html} } Zelig/man/relogit.Rd0000644000176200001440000000100113763512134014030 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-relogit.R \name{relogit} \alias{relogit} \title{Estimation function for rare events logit models} \usage{ relogit( formula, data = sys.parent(), tau = NULL, bias.correct = TRUE, case.control = "prior", ... ) } \description{ Estimation function for rare events logit models } \details{ This is intended as an internal function. Regular users should use \code{zelig} with \code{model = "relogit"}. } \keyword{internal} Zelig/man/is_uninitializedField.Rd0000644000176200001440000000102013763512134016673 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/assertions.R \name{is_uninitializedField} \alias{is_uninitializedField} \title{Check if uninitializedField} \usage{ is_uninitializedField( x, msg = "Zelig model has not been estimated.", fail = TRUE ) } \arguments{ \item{x}{a zelig.out method} \item{msg}{character string with the error message to return if \code{fail = TRUE}.} \item{fail}{logical whether to return an error if x uninitialzed.} } \description{ Check if uninitializedField } Zelig/man/immigration.Rd0000644000176200001440000000156213754260262014720 0ustar liggesusers\name{immigration} \alias{immigration} \alias{immi1} \alias{immi2} \alias{immi3} \alias{immi4} \alias{immi5} \title{Individual Preferences Over Immigration Policy} \description{These five datasets are part of a larger set of 10 multiply imputed data sets describing individual preferences toward immigration policy. Imputation was performed via Amelia. } \format{ Each multiply-inputed data set consists of a table with 7 variables ("ipip", "wage1992", "prtyid", "ideol", "gender") and 2,485 observations. For variable descriptions, please refer to Scheve and Slaugher, 2001. } \source{National Election Survey} \references{ Scheve, Kenneth and Matthew Slaughter (2001). ``Labor Market Competition and Individual Preferences Over Immigration Policy,'' \emph{The Review of Economics and Statistics}, vol. 83, no. 1, pp. 133-145. } \keyword{datasets} Zelig/man/setfactor.Rd0000644000176200001440000000070313754260262014367 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{setfactor} \alias{setfactor} \title{Set new value of a factor variable, checking for existing levels} \usage{ setfactor(fv, v) } \arguments{ \item{fv}{factor variable} \item{v}{value} } \value{ a factor variable with a value \code{val} and the same levels } \description{ Set new value of a factor variable, checking for existing levels } \keyword{internal} Zelig/man/coef-Zelig-method.Rd0000644000176200001440000000060613763512134015637 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-zelig.R \name{coef,Zelig-method} \alias{coef,Zelig-method} \title{Method for extracting estimated coefficients from Zelig objects} \usage{ \S4method{coef}{Zelig}(object) } \arguments{ \item{object}{An Object of Class Zelig} } \description{ Method for extracting estimated coefficients from Zelig objects } Zelig/man/Zelig-ma-class.Rd0000644000176200001440000000723513754260262015154 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-ma.R \docType{class} \name{Zelig-ma-class} \alias{Zelig-ma-class} \alias{zma} \title{Time-Series Model with Moving Average} \arguments{ \item{formula}{a symbolic representation of the model to be estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the dependent variable and \code{x1} and \code{x2} are the explanatory variables, and \code{y}, \code{x1}, and \code{x2} are contained in the same dataset. (You may include more than two explanatory variables, of course.) The \code{+} symbol means ``inclusion'' not ``addition.'' You may also include interaction terms and main effects in the form \code{x1*x2} without computing them in prior steps; \code{I(x1*x2)} to include only the interaction term and exclude the main effects; and quadratic terms in the form \code{I(x1^2)}.} \item{model}{the name of a statistical model to estimate. For a list of other supported models and their documentation see: \url{http://docs.zeligproject.org/articles/}.} \item{data}{the name of a data frame containing the variables referenced in the formula or a list of multiply imputed data frames each having the same variable names and row numbers (created by \code{Amelia} or \code{\link{to_zelig_mi}}).} \item{...}{additional arguments passed to \code{zelig}, relevant for the model to be estimated.} \item{by}{a factor variable contained in \code{data}. If supplied, \code{zelig} will subset the data frame based on the levels in the \code{by} variable, and estimate a model for each subset. This can save a considerable amount of effort. You may also use \code{by} to run models using MatchIt subclasses.} \item{cite}{If is set to 'TRUE' (default), the model citation will be printed to the console.} \item{ts}{The name of the variable containing the time indicator. This should be passed in as a string. If this variable is not provided, Zelig will assume that the data is already ordered by time.} \item{cs}{Name of a variable that denotes the cross-sectional element of the data, for example, country name in a dataset with time-series across different countries. As a variable name, this should be in quotes. If this is not provided, Zelig will assume that all observations come from the same unit over time, and should be pooled, but if provided, individual models will be run in each cross-section. If \code{cs} is given as an argument, \code{ts} must also be provided. Additionally, \code{by} must be \code{NULL}.} \item{order}{A vector of length 3 passed in as \code{c(p,d,q)} where p represents the order of the autoregressive model, d represents the number of differences taken in the model, and q represents the order of the moving average model.} } \value{ Depending on the class of model selected, \code{zelig} will return an object with elements including \code{coefficients}, \code{residuals}, and \code{formula} which may be summarized using \code{summary(z.out)} or individually extracted using, for example, \code{coef(z.out)}. See \url{http://docs.zeligproject.org/articles/getters.html} for a list of functions to extract model components. You can also extract whole fitted model objects using \code{\link{from_zelig_model}}. } \description{ Warning: \code{summary} does not work with timeseries models after simulation. } \details{ Currently only the Reference class syntax for time series. This model does not accept Bootstraps or weights. } \examples{ data(seatshare) subset <- seatshare[seatshare$country == "UNITED KINGDOM",] ts.out <- zelig(formula = unemp ~ leftseat, model = "ma", ts = "year", data = subset) summary(ts.out) } \seealso{ Vignette: \url{http://docs.zeligproject.org/articles/zelig_ma.html} } Zelig/man/is_length_not_1.Rd0000644000176200001440000000101213754260262015443 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/assertions.R \name{is_length_not_1} \alias{is_length_not_1} \title{Check if an object has a length greater than 1} \usage{ is_length_not_1(x, msg = "Length is 1.", fail = TRUE) } \arguments{ \item{x}{an object} \item{msg}{character string with the error message to return if \code{fail = TRUE}.} \item{fail}{logical whether to return an error if length is not greater than 1.} } \description{ Check if an object has a length greater than 1 } Zelig/man/zeligARMAnextstep.Rd0000644000176200001440000000063313763512134015743 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-arima.R \name{zeligARMAnextstep} \alias{zeligARMAnextstep} \title{Construct Simulated Next Step in Dynamic Series} \usage{ zeligARMAnextstep( yseries = NULL, xseries, wseries = NULL, beta, ar = NULL, i = NULL, ma = NULL, sd ) } \description{ Construct Simulated Next Step in Dynamic Series } \keyword{internal} Zelig/man/sna.ex.Rd0000644000176200001440000000063113754260262013571 0ustar liggesusers\name{sna.ex} \alias{sna.ex} \title{Simulated Example of Social Network Data} \description{ This data set contains five sociomatrices of simulated data social network data.} \usage{data(sna.ex)} \format{ Each variable in the dataset is a 25 by 25 matrix of simulated social network data. The matrices are labeled "Var1", "Var2", "Var3", "Var4", and "Var5". } \source{fictitious} \keyword{datasets} Zelig/man/Zelig-ar-class.Rd0000644000176200001440000000747013754260262015162 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-ar.R \docType{class} \name{Zelig-ar-class} \alias{Zelig-ar-class} \alias{zar} \title{Time-Series Model with Autoregressive Disturbance} \arguments{ \item{formula}{a symbolic representation of the model to be estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the dependent variable and \code{x1} and \code{x2} are the explanatory variables, and \code{y}, \code{x1}, and \code{x2} are contained in the same dataset. (You may include more than two explanatory variables, of course.) The \code{+} symbol means ``inclusion'' not ``addition.'' You may also include interaction terms and main effects in the form \code{x1*x2} without computing them in prior steps; \code{I(x1*x2)} to include only the interaction term and exclude the main effects; and quadratic terms in the form \code{I(x1^2)}.} \item{model}{the name of a statistical model to estimate. For a list of supported models and their documentation see: \url{http://docs.zeligproject.org/articles/}.} \item{data}{the name of a data frame containing the variables referenced in the formula or a list of multiply imputed data frames each having the same variable names and row numbers (created by \code{Amelia} or \code{\link{to_zelig_mi}}).} \item{...}{additional arguments passed to \code{zelig}, relevant for the model to be estimated.} \item{by}{a factor variable contained in \code{data}. If supplied, \code{zelig} will subset the data frame based on the levels in the \code{by} variable, and estimate a model for each subset. This can save a considerable amount of effort. For example, to run the same model on all fifty states, you could use: \code{z.out <- zelig(y ~ x1 + x2, data = mydata, model = 'ls', by = 'state')} You may also use \code{by} to run models using MatchIt subclasses.} \item{cite}{If is set to 'TRUE' (default), the model citation will be printed to the console.} \item{ts}{The name of the variable containing the time indicator. This should be passed in as a string. If this variable is not provided, Zelig will assume that the data is already ordered by time.} \item{cs}{Name of a variable that denotes the cross-sectional element of the data, for example, country name in a dataset with time-series across different countries. As a variable name, this should be in quotes. If this is not provided, Zelig will assume that all observations come from the same unit over time, and should be pooled, but if provided, individual models will be run in each cross-section. If \code{cs} is given as an argument, \code{ts} must also be provided. Additionally, \code{by} must be \code{NULL}.} \item{order}{A vector of length 3 passed in as \code{c(p,d,q)} where p represents the order of the autoregressive model, d represents the number of differences taken in the model, and q represents the order of the moving average model.} } \value{ Depending on the class of model selected, \code{zelig} will return an object with elements including \code{coefficients}, \code{residuals}, and \code{formula} which may be summarized using \code{summary(z.out)} or individually extracted using, for example, \code{coef(z.out)}. See \url{http://docs.zeligproject.org/articles/getters.html} for a list of functions to extract model components. You can also extract whole fitted model objects using \code{\link{from_zelig_model}}. } \description{ Warning: \code{summary} does not work with timeseries models after simulation. } \details{ Currently only the Reference class syntax for time series. This model does not accept Bootstraps or weights. } \examples{ data(seatshare) subset <- seatshare[seatshare$country == "UNITED KINGDOM",] ts.out <- zelig(formula = unemp ~ leftseat, model = "ar", ts = "year", data = subset) summary(ts.out) } \seealso{ Vignette: \url{http://docs.zeligproject.org/articles/zelig_ar.html} } Zelig/man/vcov_rq.Rd0000644000176200001440000000045213754260262014055 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{vcov_rq} \alias{vcov_rq} \title{Find vcov for quantile regression models} \usage{ vcov_rq(obj) } \arguments{ \item{obj}{a \code{rq} class object.} } \description{ Find vcov for quantile regression models } Zelig/man/transformer.Rd0000644000176200001440000000162313754260262014741 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{transformer} \alias{transformer} \title{Conduct variable transformations called inside a \code{zelig} call} \usage{ transformer(formula, data, FUN = "log", check, f_out, d_out) } \arguments{ \item{formula}{model formulae} \item{data}{data frame used in \code{formula}} \item{FUN}{character string of the transformation function. Currently supports \code{factor} and \code{log}.} \item{check}{logical whether to just check if a formula contains an internally called transformation and return \code{TRUE} or \code{FALSE}} \item{f_out}{logical whether to return the converted formula} \item{d_out}{logical whether to return the converted data frame. Note: \code{f_out} must be missing} } \description{ Conduct variable transformations called inside a \code{zelig} call } \author{ Christopher Gandrud } \keyword{internal} Zelig/man/free2.Rd0000644000176200001440000000776513754260262013417 0ustar liggesusers\name{free2} \alias{free2} \title{Freedom of Speech Data} \usage{data(free2)} \description{ Selection of individual-level survey data for freedom of speech. } \details{ A table with 150 observations and 12 variables. \itemize{ \item{sex}{1 for men and 0 for women} \item{age}{Age of respondent in years} \item{educ}{Levels of education, coded as a numeric variable with \itemize{ \item{1}{No formal education} \item{2}{Less than primary school education} \item{3}{Completed primary school} \item{4}{Completed secondary school} \item{5}{Completed high school} \item{6}{Completed college} \item{7}{Completed post-graduate degree} } } \item{country}{Character strings consisting of "Oceana", "Eurasia", and "Eastasia", after Orwell's \emph{1984}.} \item{y}{Self assessment (see below).} \item{v1-v6}{Response to vignettes (see below).} } Survey respondents were asked in almost the same language for a self-assessment and for an assessment of several hypothetical persons described by written vignettes. The self assessment (\code{self}, in the data set), "How free do you think [name/you] [is/are] to express [him-her/your]self without fear of government reprisal?" was first asked of the survey respondent with respect to him or herself, and then after each of vignette. The possible response categories are: \itemize{ \item{1}{Completely free} \item{2}{Very free} \item{3}{Moderately free} \item{4}{Slightly free} \item{5}{Not free at all} } The vignettes, ordered from most free to least free, are: \itemize{ \item{vign1}{[Kay] does not like many of the government's policies. She frequently publishes her opinion in newspapers, criticizing decisions by officials and calling for change. She sees little reason these actions could lead to government reprisal.} \item{vign2}{[Michael] disagrees with many of the government's policies. Though he knows criticism is frowned upon, he doesn't believe the government would punish someone for expressing critical views. He makes his opinion known on most issues without regard to who is listening.} \item{vign3}{[Bob] has political views at odds with the government. He has heard of people occasionally being arrested for speaking out against the government, and government leaders sometimes make political speeches condemning those who criticize. He sometimes writes letters to newspapers about politics, but he is careful not to use his real name.} \item{vign4}{[Connie] does not like the government's stance on many issues. She has a friend who was arrested for being too openly critical of governmental leaders, and so she avoids voicing her opinions in public places.} \item{vign5}{[Vito] disagrees with many of the government's policies, and is very careful about whom he says this to, reserving his real opinions for family and close friends only. He knows several men who have been taken away by government officials for saying negative things in public.} \item{vign6}{[Sonny] lives in fear of being harassed for his political views. Everyone he knows who has spoken out against the government has been arrested or taken away. He never says a word about anything the government does, not even when he is at home alone with his family. } } } \references{ \emph{WHO's World Health Survey} by Lydia Bendib, Somnath Chatterji, Alena Petrakova, Ritu Sadana, Joshua A. Salomon, Margie Schneider, Bedirhan Ustun, Maria Villanueva Jonathan Wand, Gary King and Olivia Lau. (2007) ``Anchors: Software for Anchoring Vignettes''. \emph{Journal of Statistical Software}. Forthcoming. copy at http://wand.stanford.edu/research/anchors-jss.pdf Gary King and Jonathan Wand. "Comparing Incomparable Survey Responses: New Tools for Anchoring Vignettes," Political Analysis, 15, 1 (Winter, 2007): Pp. 46-66, copy at http://gking.harvard.edu/files/abs/c-abs.shtml. } \keyword{datasets} Zelig/man/extract_setx.Rd0000644000176200001440000000133513754260262015114 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/interface.R \name{extract_setx} \alias{extract_setx} \title{Extract setx for non-range and return tidy formatted data frame} \usage{ extract_setx(obj, which_x = "x", only_setx = FALSE) } \arguments{ \item{obj}{a zelig object containing simulated quantities of interest} \item{which_x}{character string either \code{'x'} or \code{'x1'} indicating whether to extract the first or second set of fitted values} \item{only_setx}{logical whether or not to only extract `setx`` values.} } \description{ Extract setx for non-range and return tidy formatted data frame } \seealso{ \code{\link{zelig_qi_to_df}} } \author{ Christopher Gandrud } \keyword{internal} Zelig/man/Zelig-gee-class.Rd0000644000176200001440000000104613763512134015307 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-gee.R \docType{class} \name{Zelig-gee-class} \alias{Zelig-gee-class} \alias{zgee} \title{Generalized Estimating Equations Model object for inheritance across models in Zelig} \description{ Generalized Estimating Equations Model object for inheritance across models in Zelig } \section{Methods}{ \describe{ \item{\code{zelig(formula, data, model = NULL, ..., weights = NULL, by, bootstrap = FALSE)}}{The zelig function estimates a variety of statistical models} }} Zelig/man/Zelig-arima-class.Rd0000644000176200001440000000773013754260262015650 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-arima.R \docType{class} \name{Zelig-arima-class} \alias{Zelig-arima-class} \alias{zarima} \title{Autoregressive and Moving-Average Models with Integration for Time-Series Data} \arguments{ \item{formula}{a symbolic representation of the model to be estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the dependent variable and \code{x1} and \code{x2} are the explanatory variables, and \code{y}, \code{x1}, and \code{x2} are contained in the same dataset. (You may include more than two explanatory variables, of course.) The \code{+} symbol means ``inclusion'' not ``addition.'' You may also include interaction terms and main effects in the form \code{x1*x2} without computing them in prior steps; \code{I(x1*x2)} to include only the interaction term and exclude the main effects; and quadratic terms in the form \code{I(x1^2)}.} \item{model}{the name of a statistical model to estimate. For a list of supported models and their documentation see: \url{http://docs.zeligproject.org/articles/}.} \item{data}{the name of a data frame containing the variables referenced in the formula or a list of multiply imputed data frames each having the same variable names and row numbers (created by \code{Amelia} or \code{\link{to_zelig_mi}}).} \item{...}{additional arguments passed to \code{zelig}, relevant for the model to be estimated.} \item{by}{a factor variable contained in \code{data}. If supplied, \code{zelig} will subset the data frame based on the levels in the \code{by} variable, and estimate a model for each subset. This can save a considerable amount of effort. For example, to run the same model on all fifty states, you could use: \code{z.out <- zelig(y ~ x1 + x2, data = mydata, model = 'ls', by = 'state')} You may also use \code{by} to run models using MatchIt subclasses.} \item{cite}{If is set to 'TRUE' (default), the model citation will be printed to the console.} \item{ts}{The name of the variable containing the time indicator. This should be passed in as a string. If this variable is not provided, Zelig will assume that the data is already ordered by time.} \item{cs}{Name of a variable that denotes the cross-sectional element of the data, for example, country name in a dataset with time-series across different countries. As a variable name, this should be in quotes. If this is not provided, Zelig will assume that all observations come from the same unit over time, and should be pooled, but if provided, individual models will be run in each cross-section. If \code{cs} is given as an argument, \code{ts} must also be provided. Additionally, \code{by} must be \code{NULL}.} \item{order}{A vector of length 3 passed in as \code{c(p,d,q)} where p represents the order of the autoregressive model, d represents the number of differences taken in the model, and q represents the order of the moving average model.} } \value{ Depending on the class of model selected, \code{zelig} will return an object with elements including \code{coefficients}, \code{residuals}, and \code{formula} which may be summarized using \code{summary(z.out)} or individually extracted using, for example, \code{coef(z.out)}. See \url{http://docs.zeligproject.org/articles/getters.html} for a list of functions to extract model components. You can also extract whole fitted model objects using \code{\link{from_zelig_model}}. } \description{ Warning: \code{summary} does not work with timeseries models after simulation. } \details{ Currently only the Reference class syntax for time series. This model does not accept Bootstraps or weights. } \examples{ data(seatshare) subset <- seatshare[seatshare$country == "UNITED KINGDOM",] ts.out <- zarima$new() ts.out$zelig(unemp ~ leftseat, order = c(1, 0, 1), data = subset) # Set fitted values and simulate quantities of interest ts.out$setx(leftseat = 0.75) ts.out$setx1(leftseat = 0.25) ts.out$sim() } \seealso{ Vignette: \url{http://docs.zeligproject.org/articles/zelig_arima.html} } Zelig/man/is_varying.Rd0000644000176200001440000000075113754260262014552 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/assertions.R \name{is_varying} \alias{is_varying} \title{Check if the values in a vector vary} \usage{ is_varying(x, msg = "Vector does not vary.", fail = TRUE) } \arguments{ \item{x}{a vector} \item{msg}{character string with the error message to return if \code{fail = TRUE}.} \item{fail}{logical whether to return an error if \code{x} does not vary.} } \description{ Check if the values in a vector vary } Zelig/man/Zelig-poisson-gee-class.Rd0000644000176200001440000000724413754260262017007 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-poisson-gee.R \docType{class} \name{Zelig-poisson-gee-class} \alias{Zelig-poisson-gee-class} \alias{zpoissongee} \title{Generalized Estimating Equation for Poisson Regression} \arguments{ \item{formula}{a symbolic representation of the model to be estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the dependent variable and \code{x1} and \code{x2} are the explanatory variables, and \code{y}, \code{x1}, and \code{x2} are contained in the same dataset. (You may include more than two explanatory variables, of course.) The \code{+} symbol means ``inclusion'' not ``addition.'' You may also include interaction terms and main effects in the form \code{x1*x2} without computing them in prior steps; \code{I(x1*x2)} to include only the interaction term and exclude the main effects; and quadratic terms in the form \code{I(x1^2)}.} \item{model}{the name of a statistical model to estimate. For a list of other supported models and their documentation see: \url{http://docs.zeligproject.org/articles/}.} \item{data}{the name of a data frame containing the variables referenced in the formula or a list of multiply imputed data frames each having the same variable names and row numbers (created by \code{Amelia} or \code{\link{to_zelig_mi}}).} \item{...}{additional arguments passed to \code{zelig}, relevant for the model to be estimated.} \item{by}{a factor variable contained in \code{data}. If supplied, \code{zelig} will subset the data frame based on the levels in the \code{by} variable, and estimate a model for each subset. This can save a considerable amount of effort. You may also use \code{by} to run models using MatchIt subclasses.} \item{cite}{If is set to 'TRUE' (default), the model citation will be printed to the console.} \item{id:}{where id is a variable which identifies the clusters. The data should be sorted by id and should be ordered within each cluster when appropriate} \item{corstr:}{character string specifying the correlation structure: "independence", "exchangeable", "ar1", "unstructured" and "userdefined"} \item{geeglm:}{See geeglm in package geepack for other function arguments} } \value{ Depending on the class of model selected, \code{zelig} will return an object with elements including \code{coefficients}, \code{residuals}, and \code{formula} which may be summarized using \code{summary(z.out)} or individually extracted using, for example, \code{coef(z.out)}. See \url{http://docs.zeligproject.org/articles/getters.html} for a list of functions to extract model components. You can also extract whole fitted model objects using \code{\link{from_zelig_model}}. } \description{ Generalized Estimating Equation for Poisson Regression } \details{ Additional parameters avaialable to this model include: \itemize{ \item \code{weights}: vector of weight values or a name of a variable in the dataset by which to weight the model. For more information see: \url{http://docs.zeligproject.org/articles/weights.html}. \item \code{bootstrap}: logical or numeric. If \code{FALSE} don't use bootstraps to robustly estimate uncertainty around model parameters due to sampling error. If an integer is supplied, the number of boostraps to run. For more information see: \url{http://docs.zeligproject.org/articles/bootstraps.html}. } } \examples{ library(Zelig) data(sanction) sanction$cluster <- c(rep(c(1:15), 5), rep(c(16), 3)) sorted.sanction <- sanction[order(sanction$cluster),] z.out <- zelig(num ~ target + coop, model = "poisson.gee",id = "cluster", data = sorted.sanction) summary(z.out) } \seealso{ Vignette: \url{http://docs.zeligproject.org/articles/zelig_poissongee.html} } Zelig/man/or_summary.Rd0000644000176200001440000000114613754260262014574 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{or_summary} \alias{or_summary} \title{Find odds ratios for coefficients and standard errors for glm.summary class objects} \usage{ or_summary(obj, label_mod_coef = "(OR)", label_mod_se = "(OR)") } \arguments{ \item{obj}{a \code{glm.summary} class object} \item{label_mod_coef}{character string for how to modify the coefficient label.} \item{label_mod_se}{character string for how to modify the standard error label.} } \description{ Find odds ratios for coefficients and standard errors for glm.summary class objects } Zelig/man/tobin.Rd0000644000176200001440000000103313754260262013505 0ustar liggesusers\name{tobin} \alias{tobin} \title{Tobin's Tobit Data} \description{ Economists fit a parametric censored data model called the `tobit'. These data are from Tobin's original paper. } \usage{data(tobin)} \format{ A data frame with 20 observations on the following 3 variables. durable: Durable goods purchase age: Age in years quant: Liquidity ratio (x 1000) } \source{ J. Tobin, Estimation of relationships for limited dependent variables, Econometrica, v26, 24-36, 1958. } \keyword{datasets} Zelig/man/Zelig-probit-bayes-class.Rd0000644000176200001440000001131513754260262017151 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-probit-bayes.R \docType{class} \name{Zelig-probit-bayes-class} \alias{Zelig-probit-bayes-class} \alias{zprobitbayes} \title{Bayesian Probit Regression} \arguments{ \item{formula}{a symbolic representation of the model to be estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the dependent variable and \code{x1} and \code{x2} are the explanatory variables, and \code{y}, \code{x1}, and \code{x2} are contained in the same dataset. (You may include more than two explanatory variables, of course.) The \code{+} symbol means ``inclusion'' not ``addition.'' You may also include interaction terms and main effects in the form \code{x1*x2} without computing them in prior steps; \code{I(x1*x2)} to include only the interaction term and exclude the main effects; and quadratic terms in the form \code{I(x1^2)}.} \item{model}{the name of a statistical model to estimate. For a list of supported models and their documentation see: \url{http://docs.zeligproject.org/articles/}.} \item{data}{the name of a data frame containing the variables referenced in the formula or a list of multiply imputed data frames each having the same variable names and row numbers (created by \code{Amelia} or \code{\link{to_zelig_mi}}).} \item{...}{additional arguments passed to \code{zelig}, relevant for the model to be estimated.} \item{by}{a factor variable contained in \code{data}. If supplied, \code{zelig} will subset the data frame based on the levels in the \code{by} variable, and estimate a model for each subset. This can save a considerable amount of effort. For example, to run the same model on all fifty states, you could use: \code{z.out <- zelig(y ~ x1 + x2, data = mydata, model = 'ls', by = 'state')} You may also use \code{by} to run models using MatchIt subclasses.} \item{cite}{If is set to 'TRUE' (default), the model citation will be printed to the console.} } \value{ Depending on the class of model selected, \code{zelig} will return an object with elements including \code{coefficients}, \code{residuals}, and \code{formula} which may be summarized using \code{summary(z.out)} or individually extracted using, for example, \code{coef(z.out)}. See \url{http://docs.zeligproject.org/articles/getters.html} for a list of functions to extract model components. You can also extract whole fitted model objects using \code{\link{from_zelig_model}}. } \description{ Bayesian Probit Regression } \details{ Additional parameters avaialable to this model include: \itemize{ \item \code{weights}: vector of weight values or a name of a variable in the dataset by which to weight the model. For more information see: \url{http://docs.zeligproject.org/articles/weights.html}. \item \code{burnin}: number of the initial MCMC iterations to be discarded (defaults to 1,000). \item \code{mcmc}: number of the MCMC iterations after burnin (defaults to 10,000). \item \code{thin}: thinning interval for the Markov chain. Only every thin-th draw from the Markov chain is kept. The value of mcmc must be divisible by this value. The default value is 1. \item \code{verbose}: defaults to FALSE. If TRUE, the progress of the sampler (every 10\%) is printed to the screen. \item \code{seed}: seed for the random number generator. The default is \code{NA} which corresponds to a random seed of 12345. \item \code{beta.start}: starting values for the Markov chain, either a scalar or vector with length equal to the number of estimated coefficients. The default is \code{NA}, such that the maximum likelihood estimates are used as the starting values. } Use the following parameters to specify the model's priors: \itemize{ \item \code{b0}: prior mean for the coefficients, either a numeric vector or a scalar. If a scalar value, that value will be the prior mean for all the coefficients. The default is 0. \item \code{B0}: prior precision parameter for the coefficients, either a square matrix (with the dimensions equal to the number of the coefficients) or a scalar. If a scalar value, that value times an identity matrix will be the prior precision parameter. The default is 0, which leads to an improper prior. } Use the following arguments to specify optional output for the model: \itemize{ \item \code{bayes.resid}: defaults to FALSE. If TRUE, the latent Bayesian residuals for all observations are returned. Alternatively, users can specify a vector of observations for which the latent residuals should be returned. } } \examples{ data(turnout) z.out <- zelig(vote ~ race + educate, model = "probit.bayes",data = turnout, verbose = FALSE) summary(z.out) } \seealso{ Vignette: \url{http://docs.zeligproject.org/articles/zelig_probitbayes.html} } Zelig/man/Zelig-tobit-bayes-class.Rd0000644000176200001440000001151613763512134016774 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-tobit-bayes.R \docType{class} \name{Zelig-tobit-bayes-class} \alias{Zelig-tobit-bayes-class} \alias{ztobitbayes} \title{Bayesian Tobit Regression} \arguments{ \item{formula}{a symbolic representation of the model to be estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the dependent variable and \code{x1} and \code{x2} are the explanatory variables, and \code{y}, \code{x1}, and \code{x2} are contained in the same dataset. (You may include more than two explanatory variables, of course.) The \code{+} symbol means ``inclusion'' not ``addition.'' You may also include interaction terms and main effects in the form \code{x1*x2} without computing them in prior steps; \code{I(x1*x2)} to include only the interaction term and exclude the main effects; and quadratic terms in the form \code{I(x1^2)}.} \item{model}{the name of a statistical model to estimate. For a list of other supported models and their documentation see: \url{http://docs.zeligproject.org/articles/}.} \item{data}{the name of a data frame containing the variables referenced in the formula or a list of multiply imputed data frames each having the same variable names and row numbers (created by \code{Amelia} or \code{\link{to_zelig_mi}}).} \item{...}{additional arguments passed to \code{zelig}, relevant for the model to be estimated.} \item{by}{a factor variable contained in \code{data}. If supplied, \code{zelig} will subset the data frame based on the levels in the \code{by} variable, and estimate a model for each subset. This can save a considerable amount of effort. You may also use \code{by} to run models using MatchIt subclasses.} \item{cite}{If is set to 'TRUE' (default), the model citation will be printed to the console.} \item{below:}{point at which the dependent variable is censored from below. If the dependent variable is only censored from above, set below = -Inf. The default value is 0.} \item{above:}{point at which the dependent variable is censored from above. If the dependent variable is only censored from below, set above = Inf. The default value is Inf.} } \value{ Depending on the class of model selected, \code{zelig} will return an object with elements including \code{coefficients}, \code{residuals}, and \code{formula} which may be summarized using \code{summary(z.out)} or individually extracted using, for example, \code{coef(z.out)}. See \url{http://docs.zeligproject.org/articles/getters.html} for a list of functions to extract model components. You can also extract whole fitted model objects using \code{\link{from_zelig_model}}. } \description{ Bayesian Tobit Regression } \details{ Additional parameters avaialable to this model include: \itemize{ \item \code{weights}: vector of weight values or a name of a variable in the dataset by which to weight the model. For more information see: \url{http://docs.zeligproject.org/articles/weights.html}. \item \code{burnin}: number of the initial MCMC iterations to be discarded (defaults to 1,000). \item \code{mcmc}: number of the MCMC iterations after burnin (defaults to 10,000). \item \code{thin}: thinning interval for the Markov chain. Only every thin-th draw from the Markov chain is kept. The value of mcmc must be divisible by this value. The default value is 1. \item \code{verbose}: defaults to FALSE. If TRUE, the progress of the sampler (every 10\%) is printed to the screen. \item \code{seed}: seed for the random number generator. The default is \code{NA} which corresponds to a random seed of 12345. \item \code{beta.start}: starting values for the Markov chain, either a scalar or vector with length equal to the number of estimated coefficients. The default is \code{NA}, such that the maximum likelihood estimates are used as the starting values. } Use the following parameters to specify the model's priors: \itemize{ \item \code{b0}: prior mean for the coefficients, either a numeric vector or a scalar. If a scalar value, that value will be the prior mean for all the coefficients. The default is 0. \item \code{B0}: prior precision parameter for the coefficients, either a square matrix (with the dimensions equal to the number of the coefficients) or a scalar. If a scalar value, that value times an identity matrix will be the prior precision parameter. The default is 0, which leads to an improper prior. \item \code{c0}: \code{c0}/2 is the shape parameter for the Inverse Gamma prior on the variance of the disturbance terms. \item \code{d0}: \code{d0}/2 is the scale parameter for the Inverse Gamma prior on the variance of the disturbance terms. } } \examples{ data(turnout) z.out <- zelig(vote ~ race + educate, model = "tobit.bayes",data = turnout, verbose = FALSE) } \seealso{ Vignette: \url{http://docs.zeligproject.org/articles/zelig_tobitbayes.html} } Zelig/man/get_se.Rd0000644000176200001440000000054613754260262013650 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/wrappers.R \name{get_se} \alias{get_se} \title{Extract standard errors from a Zelig estimated model} \usage{ get_se(object) } \arguments{ \item{object}{an object of class Zelig} } \description{ Extract standard errors from a Zelig estimated model } \author{ Christopher Gandrud } Zelig/man/statmat.Rd0000644000176200001440000000054113754260262014052 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{statmat} \alias{statmat} \title{Create QI summary matrix} \usage{ statmat(qi) } \arguments{ \item{qi}{quantity of interest in the discrete case} } \value{ a formatted qi } \description{ Create QI summary matrix } \author{ Christine Choirat } \keyword{internal} Zelig/man/plot-Zelig-ANY-method.Rd0000644000176200001440000000062613763512134016330 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-zelig.R \name{plot,Zelig,ANY-method} \alias{plot,Zelig,ANY-method} \title{Plot method for Zelig objects} \usage{ \S4method{plot}{Zelig,ANY}(x, y, ...) } \arguments{ \item{x}{An Object of Class Zelig} \item{y}{unused} \item{...}{Additional parameters to be passed to plot} } \description{ Plot method for Zelig objects } Zelig/man/sanction.Rd0000644000176200001440000000134013754260262014211 0ustar liggesusers\name{sanction} \alias{sanction} \title{Multilateral Economic Sanctions} \description{ Data on bilateral sanctions behavior for selected years during the general period 1939-1983. This data contains errors that have since been corrected. Please contact Lisa Martin before using this data for publication. } \usage{data(sanction)} \format{A table containing 8 variables ("mil", "coop", "target", "import", "export", "cost", "num", and "ncost") and 78 observations. For full variable description, see Martin, 1992. } \source{Martin, 1992} \references{ Martin, Lisa (1992). \emph{Coercive Cooperation: Explaining Multilateral Economic Sanctions}, Princeton: Princeton University Press. } \keyword{datasets} Zelig/man/is_simsx.Rd0000644000176200001440000000067113754260262014237 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/assertions.R \name{is_simsx} \alias{is_simsx} \title{Check if simulations for individual values are present in sim.out} \usage{ is_simsx(x, fail = TRUE) } \arguments{ \item{x}{a sim.out method} \item{fail}{logical whether to return an error if simulation range is not present.} } \description{ Check if simulations for individual values are present in sim.out } Zelig/man/free1.Rd0000644000176200001440000000776513754260262013416 0ustar liggesusers\name{free1} \alias{free1} \title{Freedom of Speech Data} \usage{data(free1)} \description{ Selection of individual-level survey data for freedom of speech. } \details{ A table with 150 observations and 12 variables. \itemize{ \item{sex}{1 for men and 0 for women} \item{age}{Age of respondent in years} \item{educ}{Levels of education, coded as a numeric variable with \itemize{ \item{1}{No formal education} \item{2}{Less than primary school education} \item{3}{Completed primary school} \item{4}{Completed secondary school} \item{5}{Completed high school} \item{6}{Completed college} \item{7}{Completed post-graduate degree} } } \item{country}{Character strings consisting of "Oceana", "Eurasia", and "Eastasia", after Orwell's \emph{1984}.} \item{y}{Self assessment (see below).} \item{v1-v6}{Response to vignettes (see below).} } Survey respondents were asked in almost the same language for a self-assessment and for an assessment of several hypothetical persons described by written vignettes. The self assessment (\code{self}, in the data set), "How free do you think [name/you] [is/are] to express [him-her/your]self without fear of government reprisal?" was first asked of the survey respondent with respect to him or herself, and then after each of vignette. The possible response categories are: \itemize{ \item{1}{Completely free} \item{2}{Very free} \item{3}{Moderately free} \item{4}{Slightly free} \item{5}{Not free at all} } The vignettes, ordered from most free to least free, are: \itemize{ \item{vign1}{[Kay] does not like many of the government's policies. She frequently publishes her opinion in newspapers, criticizing decisions by officials and calling for change. She sees little reason these actions could lead to government reprisal.} \item{vign2}{[Michael] disagrees with many of the government's policies. Though he knows criticism is frowned upon, he doesn't believe the government would punish someone for expressing critical views. He makes his opinion known on most issues without regard to who is listening.} \item{vign3}{[Bob] has political views at odds with the government. He has heard of people occasionally being arrested for speaking out against the government, and government leaders sometimes make political speeches condemning those who criticize. He sometimes writes letters to newspapers about politics, but he is careful not to use his real name.} \item{vign4}{[Connie] does not like the government's stance on many issues. She has a friend who was arrested for being too openly critical of governmental leaders, and so she avoids voicing her opinions in public places.} \item{vign5}{[Vito] disagrees with many of the government's policies, and is very careful about whom he says this to, reserving his real opinions for family and close friends only. He knows several men who have been taken away by government officials for saying negative things in public.} \item{vign6}{[Sonny] lives in fear of being harassed for his political views. Everyone he knows who has spoken out against the government has been arrested or taken away. He never says a word about anything the government does, not even when he is at home alone with his family. } } } \references{ \emph{WHO's World Health Survey} by Lydia Bendib, Somnath Chatterji, Alena Petrakova, Ritu Sadana, Joshua A. Salomon, Margie Schneider, Bedirhan Ustun, Maria Villanueva Jonathan Wand, Gary King and Olivia Lau. (2007) ``Anchors: Software for Anchoring Vignettes''. \emph{Journal of Statistical Software}. Forthcoming. copy at http://wand.stanford.edu/research/anchors-jss.pdf Gary King and Jonathan Wand. "Comparing Incomparable Survey Responses: New Tools for Anchoring Vignettes," Political Analysis, 15, 1 (Winter, 2007): Pp. 46-66, copy at http://gking.harvard.edu/files/abs/c-abs.shtml. } \keyword{datasets} Zelig/man/zeligArimaWrapper.Rd0000644000176200001440000000067313763512134016026 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-arima.R \name{zeligArimaWrapper} \alias{zeligArimaWrapper} \title{Estimation wrapper function for arima models, to easily fit with Zelig architecture} \usage{ zeligArimaWrapper(formula, order = c(1, 0, 0), ..., include.mean = TRUE, data) } \description{ Estimation wrapper function for arima models, to easily fit with Zelig architecture } \keyword{internal} Zelig/man/Zelig-oprobit-bayes-class.Rd0000644000176200001440000001020413754260262017324 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-oprobit-bayes.R \docType{class} \name{Zelig-oprobit-bayes-class} \alias{Zelig-oprobit-bayes-class} \alias{zoprobitbayes} \title{Bayesian Ordered Probit Regression} \arguments{ \item{formula}{a symbolic representation of the model to be estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the dependent variable and \code{x1} and \code{x2} are the explanatory variables, and \code{y}, \code{x1}, and \code{x2} are contained in the same dataset. (You may include more than two explanatory variables, of course.) The \code{+} symbol means ``inclusion'' not ``addition.'' You may also include interaction terms and main effects in the form \code{x1*x2} without computing them in prior steps; \code{I(x1*x2)} to include only the interaction term and exclude the main effects; and quadratic terms in the form \code{I(x1^2)}.} \item{model}{the name of a statistical model to estimate. For a list of other supported models and their documentation see: \url{http://docs.zeligproject.org/articles/}.} \item{data}{the name of a data frame containing the variables referenced in the formula or a list of multiply imputed data frames each having the same variable names and row numbers (created by \code{Amelia} or \code{\link{to_zelig_mi}}).} \item{...}{additional arguments passed to \code{zelig}, relevant for the model to be estimated.} \item{by}{a factor variable contained in \code{data}. If supplied, \code{zelig} will subset the data frame based on the levels in the \code{by} variable, and estimate a model for each subset. This can save a considerable amount of effort. You may also use \code{by} to run models using MatchIt subclasses.} \item{cite}{If is set to 'TRUE' (default), the model citation will be printed to the console.} } \value{ Depending on the class of model selected, \code{zelig} will return an object with elements including \code{coefficients}, \code{residuals}, and \code{formula} which may be summarized using \code{summary(z.out)} or individually extracted using, for example, \code{coef(z.out)}. See \url{http://docs.zeligproject.org/articles/getters.html} for a list of functions to extract model components. You can also extract whole fitted model objects using \code{\link{from_zelig_model}}. Vignette: \url{http://docs.zeligproject.org/articles/zelig_oprobitbayes.html} } \description{ Bayesian Ordered Probit Regression } \details{ Additional parameters avaialable to many models include: \itemize{ \item \code{weights}: vector of weight values or a name of a variable in the dataset by which to weight the model. For more information see: \url{http://docs.zeligproject.org/articles/weights.html}. \item \code{burnin}: number of the initial MCMC iterations to be discarded (defaults to 1,000). \item \code{mcmc}: number of the MCMC iterations after burnin (defaults to 10,000). \item \code{thin}: thinning interval for the Markov chain. Only every thin-th draw from the Markov chain is kept. The value of mcmc must be divisible by this value. The default value is 1. \item \code{verbose}: defaults to FALSE. If TRUE, the progress of the sampler (every 10\%) is printed to the screen. \item \code{seed}: seed for the random number generator. The default is \code{NA} which corresponds to a random seed of 12345. \item \code{beta.start}: starting values for the Markov chain, either a scalar or vector with length equal to the number of estimated coefficients. The default is \code{NA}, such that the maximum likelihood estimates are used as the starting values. } Use the following parameters to specify the model's priors: \itemize{ \item \code{b0}: prior mean for the coefficients, either a numeric vector or a scalar. If a scalar value, that value will be the prior mean for all the coefficients. The default is 0. \item \code{B0}: prior precision parameter for the coefficients, either a square matrix (with the dimensions equal to the number of the coefficients) or a scalar. If a scalar value, that value times an identity matrix will be the prior precision parameter. The default is 0, which leads to an improper prior. } } Zelig/man/Mode.Rd0000644000176200001440000000077413754260262013271 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{Mode} \alias{Mode} \alias{mode} \title{Compute the Statistical Mode of a Vector} \usage{ Mode(x) } \arguments{ \item{x}{a vector of numeric, factor, or ordered values} } \value{ the statistical mode of the vector. If more than one mode exists, the last one in the factor order is arbitrarily chosen (by design) } \description{ Compute the Statistical Mode of a Vector } \author{ Christopher Gandrud and Matt Owen } Zelig/man/fitted-Zelig-method.Rd0000644000176200001440000000071513763512134016203 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-zelig.R \name{fitted,Zelig-method} \alias{fitted,Zelig-method} \title{Method for extracting estimated fitted values from Zelig objects} \usage{ \S4method{fitted}{Zelig}(object, ...) } \arguments{ \item{object}{An Object of Class Zelig} \item{...}{Additional parameters to be passed to fitted} } \description{ Method for extracting estimated fitted values from Zelig objects } Zelig/man/setx.Rd0000644000176200001440000000472013754260262013363 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/wrappers.R \name{setx} \alias{setx} \title{Setting Explanatory Variable Values} \usage{ setx(obj, fn = NULL, data = NULL, cond = FALSE, ...) } \arguments{ \item{obj}{output object from \code{\link{zelig}}} \item{fn}{a list of functions to apply to the data frame} \item{data}{a new data frame used to set the values of explanatory variables. If \code{data = NULL} (the default), the data frame called in \code{\link{zelig}} is used} \item{cond}{a logical value indicating whether unconditional (default) or conditional (choose \code{cond = TRUE}) prediction should be performed. If you choose \code{cond = TRUE}, \code{setx} will coerce \code{fn = NULL} and ignore the additional arguments in \code{\dots}. If \code{cond = TRUE} and \code{data = NULL}, \code{setx} will prompt you for a data frame.} \item{...}{user-defined values of specific variables for overwriting the default values set by the function \code{fn}. For example, adding \code{var1 = mean(data\$var1)} or \code{x1 = 12} explicitly sets the value of \code{x1} to 12. In addition, you may specify one explanatory variable as a range of values, creating one observation for every unique value in the range of values} } \value{ The output is returned in a field to the Zelig object. For unconditional prediction, \code{x.out} is a model matrix based on the specified values for the explanatory variables. For multiple analyses (i.e., when choosing the \code{by} option in \code{\link{zelig}}, \code{setx} returns the selected values calculated over the entire data frame. If you wish to calculate values over just one subset of the data frame, the 5th subset for example, you may use: \code{x.out <- setx(z.out[[5]])} } \description{ The \code{setx} function uses the variables identified in the \code{formula} generated by \code{zelig} and sets the values of the explanatory variables to the selected values. Use \code{setx} after \code{zelig} and before \code{sim} to simulate quantities of interest. } \details{ This documentation describes the \code{setx} Zelig 4 compatibility wrapper function. } \examples{ # Unconditional prediction: data(turnout) z.out <- zelig(vote ~ race + educate, model = 'logit', data = turnout) x.out <- setx(z.out) s.out <- sim(z.out, x = x.out) } \seealso{ The full Zelig manual may be accessed online at \url{http://docs.zeligproject.org/articles/} } \author{ Matt Owen, Olivia Lau and Kosuke Imai } \keyword{file} Zelig/man/is_timeseries.Rd0000644000176200001440000000104213754260262015236 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/assertions.R \name{is_timeseries} \alias{is_timeseries} \title{Check if a zelig object contains a time series model} \usage{ is_timeseries(x, msg = "Not a timeseries object.", fail = FALSE) } \arguments{ \item{x}{a zelig object} \item{msg}{character string with the error message to return if \code{fail = TRUE}.} \item{fail}{logical whether to return an error if \code{x} is not a timeseries.} } \description{ Check if a zelig object contains a time series model } Zelig/man/zeligARMAbreakforecaster.Rd0000644000176200001440000000066113763512134017234 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-arima.R \name{zeligARMAbreakforecaster} \alias{zeligARMAbreakforecaster} \title{Construct Simulated Series with Internal Discontinuity in X} \usage{ zeligARMAbreakforecaster( y.init = NULL, x, x1, simparam, order, sd, t1 = 5, t2 = 10 ) } \description{ Construct Simulated Series with Internal Discontinuity in X } \keyword{internal} Zelig/man/Zelig-poisson-bayes-class.Rd0000644000176200001440000001106413754260262017345 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-poisson-bayes.R \docType{class} \name{Zelig-poisson-bayes-class} \alias{Zelig-poisson-bayes-class} \alias{zpoissonbayes} \title{Bayesian Poisson Regression} \arguments{ \item{formula}{a symbolic representation of the model to be estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the dependent variable and \code{x1} and \code{x2} are the explanatory variables, and \code{y}, \code{x1}, and \code{x2} are contained in the same dataset. (You may include more than two explanatory variables, of course.) The \code{+} symbol means ``inclusion'' not ``addition.'' You may also include interaction terms and main effects in the form \code{x1*x2} without computing them in prior steps; \code{I(x1*x2)} to include only the interaction term and exclude the main effects; and quadratic terms in the form \code{I(x1^2)}.} \item{model}{the name of a statistical model to estimate. For a list of other supported models and their documentation see: \url{http://docs.zeligproject.org/articles/}.} \item{data}{the name of a data frame containing the variables referenced in the formula or a list of multiply imputed data frames each having the same variable names and row numbers (created by \code{Amelia} or \code{\link{to_zelig_mi}}).} \item{...}{additional arguments passed to \code{zelig}, relevant for the model to be estimated.} \item{by}{a factor variable contained in \code{data}. If supplied, \code{zelig} will subset the data frame based on the levels in the \code{by} variable, and estimate a model for each subset. This can save a considerable amount of effort. You may also use \code{by} to run models using MatchIt subclasses.} \item{cite}{If is set to 'TRUE' (default), the model citation will be printed to the console.} } \value{ Depending on the class of model selected, \code{zelig} will return an object with elements including \code{coefficients}, \code{residuals}, and \code{formula} which may be summarized using \code{summary(z.out)} or individually extracted using, for example, \code{coef(z.out)}. See \url{http://docs.zeligproject.org/articles/getters.html} for a list of functions to extract model components. You can also extract whole fitted model objects using \code{\link{from_zelig_model}}. } \description{ Bayesian Poisson Regression } \details{ Additional parameters avaialable to this model include: \itemize{ \item \code{weights}: vector of weight values or a name of a variable in the dataset by which to weight the model. For more information see: \url{http://docs.zeligproject.org/articles/weights.html}. \item \code{burnin}: number of the initial MCMC iterations to be discarded (defaults to 1,000). \item \code{mcmc}: number of the MCMC iterations after burnin (defaults to 10,000). \item \code{tune}: Metropolis tuning parameter, either a positive scalar or a vector of length kk, where kk is the number of coefficients. The tuning parameter should be set such that the acceptance rate of the Metropolis algorithm is satisfactory (typically between 0.20 and 0.5). The default value is 1.1. \item \code{thin}: thinning interval for the Markov chain. Only every thin-th draw from the Markov chain is kept. The value of mcmc must be divisible by this value. The default value is 1. \item \code{verbose}: defaults to FALSE. If TRUE, the progress of the sampler (every 10\%) is printed to the screen. \item \code{seed}: seed for the random number generator. The default is \code{NA} which corresponds to a random seed of 12345. \item \code{beta.start}: starting values for the Markov chain, either a scalar or vector with length equal to the number of estimated coefficients. The default is \code{NA}, such that the maximum likelihood estimates are used as the starting values. } Use the following parameters to specify the model's priors: \itemize{ \item \code{b0}: prior mean for the coefficients, either a numeric vector or a scalar. If a scalar value, that value will be the prior mean for all the coefficients. The default is 0. \item \code{B0}: prior precision parameter for the coefficients, either a square matrix (with the dimensions equal to the number of the coefficients) or a scalar. If a scalar value, that value times an identity matrix will be the prior precision parameter. The default is 0, which leads to an improper prior. } } \examples{ data(sanction) z.out <- zelig(num ~ target + coop, model = "poisson.bayes",data = sanction, verbose = FALSE) } \seealso{ Vignette: \url{http://docs.zeligproject.org/articles/zelig_poissonbayes.html} } Zelig/man/Zelig-timeseries-class.Rd0000644000176200001440000000120713763512134016717 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-timeseries.R \docType{class} \name{Zelig-timeseries-class} \alias{Zelig-timeseries-class} \alias{ztimeseries} \title{Time-series models in Zelig} \description{ Time-series models in Zelig } \section{Methods}{ \describe{ \item{\code{packagename()}}{Automatically retrieve wrapped package name} \item{\code{sim(num = NULL)}}{Generic Method for Computing and Organizing Simulated Quantities of Interest} \item{\code{zelig(formula, data, model = NULL, ..., weights = NULL, by, bootstrap = FALSE)}}{The zelig function estimates a variety of statistical models} }} Zelig/man/Weimar.Rd0000644000176200001440000000157613754260262013632 0ustar liggesusers\name{Weimar} \alias{Weimar} \title{1932 Weimar election data} \description{ This data set contains election results for 10 kreise (equivalent to precincts) from the 1932 Weimar (German) election. } \usage{data(Weimar)} \format{A table containing 11 variables and 10 observations. The variables are \describe{ \item{Nazi}{Number of votes for the Nazi party} \item{Government}{Number of votes for the Government} \item{Communists}{Number of votes for the Communist party} \item{FarRight}{Number of votes for far right parties} \item{Other}{Number of votes for other parties, and non-voters} \item{shareunemployed}{Proportion unemployed} \item{shareblue}{Proportion working class} \item{sharewhite}{Proportion white-collar workers} \item{sharedomestic}{Proportion domestic servants} \item{shareprotestants}{Proportion Protestant} } } \source{ICPSR} %\references{ %} \keyword{datasets} Zelig/man/mid.Rd0000644000176200001440000000156713754260262013157 0ustar liggesusers\name{mid} \alias{mid} \title{Militarized Interstate Disputes} \description{ A small sample from the militarized interstate disputes (MID) database. } \usage{data(mid)} \format{ A table containing 6 variables ("conflict", "major", "contig", "power", "maxdem", "mindem", and "years") and 3,126 observations. For full variable descriptions, please see King and Zeng, 2001. } \source{Militarized Interstate Disputes database} \references{ King, Gary, and Lanche Zeng (2001). ``Explaining Rare Events in International Relations,'' \emph{International Organization}, vol. 55, no. 3, pp. 693-715. Jones, Daniel M., Stuart A. Bremer and David Singer (1996). ``Militarized Interstate Disputes, 1816-1992: Rationale, Coding Rules, and Empirical Patterns,'' \emph{Conflict Management and Peace Science}, vol. 15, no. 2, pp. 163-213. } \keyword{datasets} Zelig/man/ci_check.Rd0000644000176200001440000000073213763512134014125 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/interface.R \name{ci_check} \alias{ci_check} \title{Convert \code{ci} interval from percent to proportion and check if valid} \usage{ ci_check(x) } \arguments{ \item{x}{numeric. The central interval to return, expressed on the \verb{(0, 100]} or the equivalent \verb{(0, 1]} interval.} } \description{ Convert \code{ci} interval from percent to proportion and check if valid } \keyword{internal} Zelig/man/combine_coef_se.Rd0000644000176200001440000000374413763512134015502 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{combine_coef_se} \alias{combine_coef_se} \title{Combines estimated coefficients and associated statistics from models estimated with multiply imputed data sets or bootstrapped} \source{ Partially based on \code{\link{mi.meld}} from Amelia. } \usage{ combine_coef_se(obj, out_type = "matrix", bagging = FALSE, messages = TRUE) } \arguments{ \item{obj}{a zelig object with an estimated model} \item{out_type}{either \code{"matrix"} or \code{"list"} specifying whether the results should be returned as a matrix or a list.} \item{bagging}{logical whether or not to bag the bootstrapped coefficients} \item{messages}{logical whether or not to return messages for what is being returned} } \value{ If the model uses multiply imputed or bootstrapped data then a matrix (default) or list of combined coefficients (\code{coef}), standard errors (\code{se}), z values (\code{zvalue}), p-values (\code{p}) is returned. Rubin's Rules are used to combine output from multiply imputed data. An error is returned if no imputations were included or there wasn't bootstrapping. Please use \code{get_coef}, \code{get_se}, and \code{get_pvalue} methods instead in cases where there are no imputations or bootstrap. } \description{ Combines estimated coefficients and associated statistics from models estimated with multiply imputed data sets or bootstrapped } \examples{ set.seed(123) ## Multiple imputation example # Create fake imputed data n <- 100 x1 <- runif(n) x2 <- runif(n) y <- rnorm(n) data.1 <- data.frame(y = y, x = x1) data.2 <- data.frame(y = y, x = x2) # Estimate model mi.out <- to_zelig_mi(data.1, data.2) z.out.mi <- zelig(y ~ x, model = "ls", data = mi.out) # Combine and extract coefficients and standard errors combine_coef_se(z.out.mi) ## Bootstrap example z.out.boot <- zelig(y ~ x, model = "ls", data = data.1, bootstrap = 20) combine_coef_se(z.out.boot) } \author{ Christopher Gandrud and James Honaker } Zelig/man/is_simsrange1.Rd0000644000176200001440000000073013754260262015141 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/assertions.R \name{is_simsrange1} \alias{is_simsrange1} \title{Check if simulations for a range1 of fitted values are present in sim.out} \usage{ is_simsrange1(x, fail = TRUE) } \arguments{ \item{x}{a sim.out method} \item{fail}{logical whether to return an error if simulation range is not present.} } \description{ Check if simulations for a range1 of fitted values are present in sim.out } Zelig/man/zelig_qi_to_df.Rd0000644000176200001440000000551213763512134015354 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/interface.R \name{zelig_qi_to_df} \alias{zelig_qi_to_df} \title{Extract simulated quantities of interest from a zelig object} \source{ For a discussion of tidy data see \url{https://www.jstatsoft.org/article/view/v059i10}. } \usage{ zelig_qi_to_df(obj) } \arguments{ \item{obj}{a zelig object with simulated quantities of interest} } \description{ Extract simulated quantities of interest from a zelig object } \details{ A simulated quantities of interest in a tidy data formatted \code{data.frame}. This can be useful for creating custom plots. Each row contains a simulated value and each column contains: \itemize{ \item \code{setx_value} whether the simulations are from the base \code{x} \code{setx} or the contrasting \code{x1} for finding first differences. \item The fitted values specified in \code{setx} including a \code{by} column if \code{by} was used in the \code{\link{zelig}} call. \item \code{expected_value} \item \code{predicted_value} } For multinomial reponse models, a separate column is given for the expected probability of each outcome in the form \verb{expected_*}. Additionally, there a is column of the predicted outcomes (\code{predicted_value}). } \examples{ #### QIs without first difference or range, from covariates fitted at ## central tendencies z.1 <- zelig(Petal.Width ~ Petal.Length + Species, data = iris, model = "ls") z.1 <- setx(z.1) z.1 <- sim(z.1) head(zelig_qi_to_df(z.1)) #### QIs for first differences z.2 <- zelig(Petal.Width ~ Petal.Length + Species, data = iris, model = "ls") z.2a <- setx(z.2, Petal.Length = 2) z.2b <- setx(z.2, Petal.Length = 4.4) z.2 <- sim(z.2, x = z.2a, x1 = z.2a) head(zelig_qi_to_df(z.2)) #### QIs for first differences, estimated by Species z.3 <- zelig(Petal.Width ~ Petal.Length, by = "Species", data = iris, model = "ls") z.3a <- setx(z.3, Petal.Length = 2) z.3b <- setx(z.3, Petal.Length = 4.4) z.3 <- sim(z.3, x = z.3a, x1 = z.3a) head(zelig_qi_to_df(z.3)) #### QIs for a range of fitted values z.4 <- zelig(Petal.Width ~ Petal.Length + Species, data = iris, model = "ls") z.4 <- setx(z.4, Petal.Length = 2:4) z.4 <- sim(z.4) head(zelig_qi_to_df(z.4)) #### QIs for a range of fitted values, estimated by Species z.5 <- zelig(Petal.Width ~ Petal.Length, by = "Species", data = iris, model = "ls") z.5 <- setx(z.5, Petal.Length = 2:4) z.5 <- sim(z.5) head(zelig_qi_to_df(z.5)) #### QIs for two ranges of fitted values z.6 <- zelig(Petal.Width ~ Petal.Length + Species, data = iris, model = "ls") z.6a <- setx(z.6, Petal.Length = 2:4, Species = "setosa") z.6b <- setx(z.6, Petal.Length = 2:4, Species = "virginica") z.6 <- sim(z.6, x = z.6a, x1 = z.6b) head(zelig_qi_to_df(z.6)) } \seealso{ \code{\link{qi_slimmer}} } \author{ Christopher Gandrud } Zelig/man/strip_package_name.Rd0000644000176200001440000000060613754260262016213 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{strip_package_name} \alias{strip_package_name} \title{Remove package names from fitted model object calls.} \usage{ strip_package_name(x) } \arguments{ \item{x}{a fitted model object result} } \description{ Enables \code{\link{from_zelig_model}} output to work with stargazer. } \keyword{internal} Zelig/man/swiss.Rd0000644000176200001440000000272513754260262013553 0ustar liggesusers\name{swiss} \alias{swiss} \title{Swiss Fertility and Socioeconomic Indicators (1888) Data} \description{ Standardized fertility measure and socio-economic indicators for each of 47 French-speaking provinces of Switzerland at about 1888. } \usage{data(swiss)} \format{ A data frame with 47 observations on 6 variables, each of which is in percent, i.e., in [0,100]. [,1] Fertility Ig, "common standardized fertility measure" [,2] Agriculture % of males involved in agriculture as occupation [,3] Examination % "draftees" receiving highest mark on army exami nation [,4] Education % education beyond primary school for "draftees". [,5] Catholic % catholic (as opposed to "protestant"). [,6] Infant.Mortality live births who live less than 1 year. All variables but 'Fert' give proportions of the population. } \source{ Project "16P5", pages 549-551 in Mosteller, F. and Tukey, J. W. (1977) ``Data Analysis and Regression: A Second Course in Statistics''. Addison-Wesley, Reading Mass. indicating their source as "Data used by permission of Franice van de Walle. Office of Population Research, Princeton University, 1976. Unpublished data assembled under NICHD contract number No 1-HD-O-2077." } \references{ Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) ``The New S Language''. Wadsworth & Brooks/Cole. } \keyword{datasets} Zelig/man/get_qi.Rd0000644000176200001440000000150613754260262013647 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/wrappers.R \name{get_qi} \alias{get_qi} \title{Extract quantities of interest from a Zelig simulation} \usage{ get_qi(object, qi = "ev", xvalue = "x", subset = NULL) } \arguments{ \item{object}{an object of class Zelig} \item{qi}{character string with the name of quantity of interest desired: \code{"ev"} for expected values, \code{"pv"} for predicted values or \code{"fd"} for first differences.} \item{xvalue}{chracter string stating which of the set of values of \code{x} should be used for getting the quantity of interest.} \item{subset}{subset for multiply imputed data (only relevant if multiply imputed data is supplied in the original call.)} } \description{ Extract quantities of interest from a Zelig simulation } \author{ Christopher Gandrud } Zelig/man/zelig.Rd0000644000176200001440000000700413754260262013510 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/wrappers.R \name{zelig} \alias{zelig} \title{Estimating a Statistical Model} \usage{ zelig(formula, model, data, ..., by = NULL, cite = TRUE) } \arguments{ \item{formula}{a symbolic representation of the model to be estimated, in the form \code{y \~\, x1 + x2}, where \code{y} is the dependent variable and \code{x1} and \code{x2} are the explanatory variables, and \code{y}, \code{x1}, and \code{x2} are contained in the same dataset. (You may include more than two explanatory variables, of course.) The \code{+} symbol means ``inclusion'' not ``addition.'' You may also include interaction terms and main effects in the form \code{x1*x2} without computing them in prior steps; \code{I(x1*x2)} to include only the interaction term and exclude the main effects; and quadratic terms in the form \code{I(x1^2)}.} \item{model}{the name of a statistical model to estimate. For a list of other supported models and their documentation see: \url{http://docs.zeligproject.org/articles/}.} \item{data}{the name of a data frame containing the variables referenced in the formula or a list of multiply imputed data frames each having the same variable names and row numbers (created by \code{Amelia} or \code{\link{to_zelig_mi}}).} \item{...}{additional arguments passed to \code{zelig}, relevant for the model to be estimated.} \item{by}{a factor variable contained in \code{data}. If supplied, \code{zelig} will subset the data frame based on the levels in the \code{by} variable, and estimate a model for each subset. This can save a considerable amount of effort. For example, to run the same model on all fifty states, you could use: \code{z.out <- zelig(y ~ x1 + x2, data = mydata, model = 'ls', by = 'state')} You may also use \code{by} to run models using MatchIt subclasses.} \item{cite}{If is set to 'TRUE' (default), the model citation will be printed to the console.} } \value{ Depending on the class of model selected, \code{zelig} will return an object with elements including \code{coefficients}, \code{residuals}, and \code{formula} which may be summarized using \code{summary(z.out)} or individually extracted using, for example, \code{coef(z.out)}. See \url{http://docs.zeligproject.org/articles/getters.html} for a list of functions to extract model components. You can also extract whole fitted model objects using \code{\link{from_zelig_model}}. } \description{ The zelig function estimates a variety of statistical models. Use \code{zelig} output with \code{setx} and \code{sim} to compute quantities of interest, such as predicted probabilities, expected values, and first differences, along with the associated measures of uncertainty (standard errors and confidence intervals). } \details{ This documentation describes the \code{zelig} Zelig 4 compatibility wrapper function. Additional parameters avaialable to many models include: \itemize{ \item weights: vector of weight values or a name of a variable in the dataset by which to weight the model. For more information see: \url{http://docs.zeligproject.org/articles/weights.html}. \item bootstrap: logical or numeric. If \code{FALSE} don't use bootstraps to robustly estimate uncertainty around model parameters due to sampling error. If an integer is supplied, the number of boostraps to run. For more information see: \url{http://docs.zeligproject.org/articles/bootstraps.html}. } } \seealso{ \url{http://docs.zeligproject.org/articles/} } \author{ Matt Owen, Kosuke Imai, Olivia Lau, and Gary King } Zelig/man/names-Zelig-method.Rd0000644000176200001440000000047513763512134016032 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-zelig.R \name{names,Zelig-method} \alias{names,Zelig-method} \title{Names method for Zelig objects} \usage{ \S4method{names}{Zelig}(x) } \arguments{ \item{x}{An Object of Class Zelig} } \description{ Names method for Zelig objects } Zelig/man/rocplot.Rd0000644000176200001440000000425313754260262014063 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plots.R \name{rocplot} \alias{rocplot} \title{Receiver Operator Characteristic Plots} \usage{ rocplot(z1, z2, cutoff = seq(from=0, to=1, length=100), lty1="solid", lty2="dashed", lwd1=par("lwd"), lwd2=par("lwd"), col1=par("col"), col2=par("col"), main="ROC Curve", xlab = "Proportion of 1's Correctly Predicted", ylab="Proportion of 0's Correctly Predicted", plot = TRUE, ... ) } \arguments{ \item{z1}{first model} \item{z2}{second model} \item{cutoff}{A vector of cut-off values between 0 and 1, at which to evaluate the proportion of 0s and 1s correctly predicted by the first and second model. By default, this is 100 increments between 0 and 1 inclusive} \item{lty1}{the line type of the first model (defaults to 'line')} \item{lty2}{the line type of the second model (defaults to 'dashed')} \item{lwd1}{the line width of the first model (defaults to 1)} \item{lwd2}{the line width of the second model (defaults to 1)} \item{col1}{the color of the first model (defaults to 'black')} \item{col2}{the color of the second model (defaults to 'black')} \item{main}{a title for the plot (defaults to "ROC Curve")} \item{xlab}{a label for the X-axis} \item{ylab}{a lavel for the Y-axis} \item{plot}{whether to generate a plot to the selected device} \item{\dots}{additional parameters to be passed to the plot} } \value{ if plot is TRUE, rocplot simply generates a plot. Otherwise, a list with the following is produced: \item{roc1}{a matrix containing a vector of x-coordinates and y-coordinates corresponding to the number of ones and zeros correctly predicted for the first model.} \item{roc2}{a matrix containing a vector of x-coordinates and y-coordinates corresponding to the number of ones and zeros correctly predicted for the second model.} \item{area1}{the area under the first ROC curve, calculated using Reimann sums.} \item{area2}{the area under the second ROC curve, calculated using Reimann sums.} } \description{ The 'rocplot' command generates a receiver operator characteristic plot to compare the in-sample (default) or out-of-sample fit for two logit or probit regressions. } Zelig/man/rm_intercept.Rd0000644000176200001440000000063713754260262015076 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{rm_intercept} \alias{rm_intercept} \title{Drop intercept columns or values from a data frame or named vector, respectively} \usage{ rm_intercept(x) } \arguments{ \item{x}{a data frame or named vector} } \description{ Drop intercept columns or values from a data frame or named vector, respectively } \keyword{internal} Zelig/man/Median.Rd0000644000176200001440000000062013754260262013570 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{Median} \alias{Median} \title{Compute the Statistical Median of a Vector} \usage{ Median(x, na.rm = NULL) } \arguments{ \item{x}{a vector of numeric or ordered values} \item{na.rm}{ignored} } \value{ the median of the vector } \description{ Compute the Statistical Median of a Vector } \author{ Matt Owen } Zelig/man/predict-Zelig-method.Rd0000644000176200001440000000067513763512134016363 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-zelig.R \name{predict,Zelig-method} \alias{predict,Zelig-method} \title{Method for getting predicted values from Zelig objects} \usage{ \S4method{predict}{Zelig}(object, ...) } \arguments{ \item{object}{An Object of Class Zelig} \item{...}{Additional parameters to be passed to predict} } \description{ Method for getting predicted values from Zelig objects } Zelig/man/residuals-Zelig-method.Rd0000644000176200001440000000057313763512134016721 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-zelig.R \name{residuals,Zelig-method} \alias{residuals,Zelig-method} \title{Method for extracting residuals from Zelig objects} \usage{ \S4method{residuals}{Zelig}(object) } \arguments{ \item{object}{An Object of Class Zelig} } \description{ Method for extracting residuals from Zelig objects } Zelig/man/createJSON.Rd0000644000176200001440000000111113754260262014324 0ustar liggesusers\name{createJSON} \alias{createJSON} \title{Utility function for constructing JSON file that encodes the hierarchy of available statistical models in Zelig} \usage{ createJSON(movefile=TRUE) } \arguments{ \item{movefile}{Logical of whether to (TRUE) move the JSON file into path \code{./inst/JSON} or (FALSE) leave in working directory.} } \value{ Returns TRUE on successful completion of json file } \description{ Utility function for construction a JSON file that encodes the hierarchy of available statistical models. } \author{ Christine Choirat, Vito D'Orazio, James Honaker } Zelig/man/factor_coef_combine.Rd0000644000176200001440000000117413754260262016346 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/interface.R \name{factor_coef_combine} \alias{factor_coef_combine} \title{Return individual factor coefficient fitted values to single factor variable} \usage{ factor_coef_combine(obj, fitted) } \arguments{ \item{obj}{a zelig object with an estimated model} \item{fitted}{a data frame with values fitted by \code{setx}. Note created internally by \code{\link{extract_setx}} and \code{\link{extract_setrange}}} } \description{ Return individual factor coefficient fitted values to single factor variable } \author{ Christopher Gandrud } \keyword{internal} Zelig/man/Zelig-normal-gee-class.Rd0000644000176200001440000001045713754260262016605 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-normal-gee.R \docType{class} \name{Zelig-normal-gee-class} \alias{Zelig-normal-gee-class} \alias{znormalgee} \title{Generalized Estimating Equation for Normal Regression} \arguments{ \item{formula}{a symbolic representation of the model to be estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the dependent variable and \code{x1} and \code{x2} are the explanatory variables, and \code{y}, \code{x1}, and \code{x2} are contained in the same dataset. (You may include more than two explanatory variables, of course.) The \code{+} symbol means ``inclusion'' not ``addition.'' You may also include interaction terms and main effects in the form \code{x1*x2} without computing them in prior steps; \code{I(x1*x2)} to include only the interaction term and exclude the main effects; and quadratic terms in the form \code{I(x1^2)}.} \item{model}{the name of a statistical model to estimate. For a list of other supported models and their documentation see: \url{http://docs.zeligproject.org/articles/}.} \item{data}{the name of a data frame containing the variables referenced in the formula or a list of multiply imputed data frames each having the same variable names and row numbers (created by \code{Amelia} or \code{\link{to_zelig_mi}}).} \item{...}{additional arguments passed to \code{zelig}, relevant for the model to be estimated.} \item{by}{a factor variable contained in \code{data}. If supplied, \code{zelig} will subset the data frame based on the levels in the \code{by} variable, and estimate a model for each subset. This can save a considerable amount of effort. You may also use \code{by} to run models using MatchIt subclasses.} \item{cite}{If is set to 'TRUE' (default), the model citation will be printed to the console.} \item{robust}{defaults to TRUE. If TRUE, consistent standard errors are estimated using a "sandwich" estimator.} \item{corstr}{defaults to "independence". It can take on the following arguments:} \item{Independence}{(corstr = independence): cor(yit,yit')=0, for all t,t' with t not equal to t'. It assumes that there is no correlation within the clusters and the model becomes equivalent to standard normal regression. The "working" correlation matrix is the identity matrix.} \item{Fixed}{corstr = fixed): If selected, the user must define the "working" correlation matrix with the R argument rather than estimating it from the model.} \item{id:}{where id is a variable which identifies the clusters. The data should be sorted by id and should be ordered within each cluster when appropriate} \item{corstr:}{character string specifying the correlation structure: "independence", "exchangeable", "ar1", "unstructured" and "userdefined"} \item{geeglm:}{See geeglm in package geepack for other function arguments} \item{Mv:}{defaults to 1. It specifies the number of periods of correlation and only needs to be specified when \code{corstr} is stat_M_dep, non_stat_M_dep, or AR-M.} \item{R:}{defaults to NULL. It specifies a user-defined correlation matrix rather than estimating it from the data. The argument is used only when corstr is "fixed". The input is a TxT matrix of correlations, where T is the size of the largest cluster.} } \value{ Depending on the class of model selected, \code{zelig} will return an object with elements including \code{coefficients}, \code{residuals}, and \code{formula} which may be summarized using \code{summary(z.out)} or individually extracted using, for example, \code{coef(z.out)}. See \url{http://docs.zeligproject.org/articles/getters.html} for a list of functions to extract model components. You can also extract whole fitted model objects using \code{\link{from_zelig_model}}. } \description{ Generalized Estimating Equation for Normal Regression } \details{ Additional parameters avaialable to this model include: \itemize{ \item \code{weights}: vector of weight values or a name of a variable in the dataset by which to weight the model. For more information see: \url{http://docs.zeligproject.org/articles/weights.html}. } } \examples{ library(Zelig) data(macro) z.out <- zelig(unem ~ gdp + capmob + trade, model ="normal.gee", id = "country", data = macro, corstr = "AR-M") summary(z.out) } \seealso{ Vignette: \url{http://docs.zeligproject.org/articles/zelig_normalgee.html} } Zelig/man/CigarettesSW.Rd0000644000176200001440000000076613763512134014750 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/datasets.R \docType{data} \name{CigarettesSW} \alias{CigarettesSW} \title{Cigarette Consumption Panel Data} \format{ A data set with 96 observations and 9 variables } \source{ From Christian Kleiber and Achim Zeileis (2008). Applied Econometrics with R. New York: Springer-Verlag. ISBN 978-0-387-77316-2. URL \url{https://CRAN.R-project.org/package=AER} } \description{ Cigarette Consumption Panel Data } \keyword{datasets} Zelig/man/statlevel.Rd0000644000176200001440000000061313754260262014400 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{statlevel} \alias{statlevel} \title{Describe Here} \usage{ statlevel(qi, num) } \arguments{ \item{qi}{quantity of interest in the discrete case} \item{num}{number of simulations} } \value{ a formatted quantity of interest } \description{ Describe Here } \author{ Christine Choirat } \keyword{internal} Zelig/man/table.levels.Rd0000644000176200001440000000122513754260262014755 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{table.levels} \alias{table.levels} \title{Create a table, but ensure that the correct columns exist. In particular, this allows for entires with zero as a value, which is not the default for standard tables} \usage{ table.levels(x, levels, ...) } \arguments{ \item{x}{a vector} \item{levels}{a vector of levels} \item{...}{parameters for table} } \value{ a table } \description{ Create a table, but ensure that the correct columns exist. In particular, this allows for entires with zero as a value, which is not the default for standard tables } \author{ Matt Owen } Zelig/man/reduce.Rd0000644000176200001440000000144713754260262013652 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{reduce} \alias{reduce} \title{Calculate the reduced dataset to be used in \code{\link{setx}}} \usage{ reduce(dataset, s, formula, data, avg = avg) } \arguments{ \item{dataset}{Zelig object data, possibly split to deal with \code{by} argument} \item{s}{list of variables and their tentative \code{setx} values} \item{formula}{a simplified version of the Zelig object formula (typically with 1 on the lhs)} \item{data}{Zelig object data} \item{avg}{function of data transformations} } \value{ a list of all the model variables either at their central tendancy or their \code{setx} value } \description{ #' This method is used internally } \author{ Christine Choirat and Christopher Gandrud } \keyword{internal} Zelig/man/PErisk.Rd0000644000176200001440000000555713754260262013606 0ustar liggesusers\name{PErisk} \alias{PErisk} \title{Political Economic Risk Data from 62 Countries in 1987} \description{ Political Economic Risk Data from 62 Countries in 1987. } \usage{data(PErisk)} \format{ A data frame with 62 observations on the following 6 variables. All data points are from 1987. See Quinn (2004) for more details. country: a factor with levels 'Argentina' 'Australia' 'Austria' 'Bangladesh' 'Belgium' 'Bolivia' 'Botswana' 'Brazil' 'Burma' 'Cameroon' 'Canada' 'Chile' 'Colombia' 'Congo-Kinshasa' 'Costa Rica' 'Cote d'Ivoire' 'Denmark' 'Dominican Republic' 'Ecuador' 'Finland' 'Gambia, The' 'Ghana' 'Greece' 'Hungary' 'India' 'Indonesia' 'Iran' 'Ireland' 'Israel' 'Italy' 'Japan' 'Kenya' 'Korea, South' 'Malawi' 'Malaysia' 'Mexico' 'Morocco' 'New Zealand' 'Nigeria' 'Norway' 'Papua New Guinea' 'Paraguay' 'Philippines' 'Poland' 'Portugal' 'Sierra Leone' 'Singapore' 'South Africa' 'Spain' 'Sri Lanka' 'Sweden' 'Switzerland' 'Syria' 'Thailand' 'Togo' 'Tunisia' 'Turkey' 'United Kingdom' 'Uruguay' 'Venezuela' 'Zambia' 'Zimbabwe' courts: an ordered factor with levels '0' < '1'.'courts' is an indicator of whether the country in question is judged to have an independent judiciary. From Henisz (2002). barb2: a numeric vector giving the natural log of the black market premium in each country. The black market premium is coded as the black market exchange rate (local currency per dollar) divided by the official exchange rate minus 1. From Marshall, Gurr, and Harff (2002). prsexp2: an ordered factor with levels '0' < '1' < '2' < '3' < '4' < '5', giving the lack of expropriation risk. From Marshall, Gurr, and Harff (2002). prscorr2: an ordered factor with levels '0' < '1' < '2' < '3' < '4' < '5', measuring the lack of corruption. From Marshall, Gurr, and Harff (2002). gdpw2: a numeric vector giving the natural log of real GDP per worker in 1985 international prices. From Alvarez et al. (1999). } \source{ Mike Alvarez, Jose Antonio Cheibub, Fernando Limongi, and Adam Przeworski. 1999. ``ACLP Political and Economic Database.'' . Witold J. Henisz. 2002. ``The Political Constraint Index (POLCON) Dataset.'' \ . Monty G. Marshall, Ted Robert Gurr, and Barbara Harff. 2002. ``State Failure Task Force Problem Set.'' . } \references{ Kevin M. Quinn. 2004. ``Bayesian Factor Analysis for Mixed Ordinal and Continuous Response.'' \emph{Political Analyis}. Vol. 12, pp.338--353. } \keyword{datasets} Zelig/man/is_sims_present.Rd0000644000176200001440000000064513754260262015610 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/assertions.R \name{is_sims_present} \alias{is_sims_present} \title{Check if any simulations are present in sim.out} \usage{ is_sims_present(x, fail = TRUE) } \arguments{ \item{x}{a sim.out method} \item{fail}{logical whether to return an error if no simulations are present.} } \description{ Check if any simulations are present in sim.out } Zelig/man/zeligACFplot.Rd0000644000176200001440000000100113763512134014706 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plots.R \name{zeligACFplot} \alias{zeligACFplot} \title{Plot Autocorrelation Function from Zelig QI object} \usage{ zeligACFplot( z, omitzero = FALSE, barcol = "black", epsilon = 0.1, col = NULL, main = "Autocorrelation Function", xlab = "Period", ylab = "Correlation of Present Shock with Future Outcomes", ylim = NULL, ... ) } \description{ Plot Autocorrelation Function from Zelig QI object } \keyword{internal} Zelig/man/Zelig-normal-bayes-class.Rd0000644000176200001440000001162713754260262017150 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-normal-bayes.R \docType{class} \name{Zelig-normal-bayes-class} \alias{Zelig-normal-bayes-class} \alias{znormalbayes} \title{Bayesian Normal Linear Regression} \arguments{ \item{formula}{a symbolic representation of the model to be estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the dependent variable and \code{x1} and \code{x2} are the explanatory variables, and \code{y}, \code{x1}, and \code{x2} are contained in the same dataset. (You may include more than two explanatory variables, of course.) The \code{+} symbol means ``inclusion'' not ``addition.'' You may also include interaction terms and main effects in the form \code{x1*x2} without computing them in prior steps; \code{I(x1*x2)} to include only the interaction term and exclude the main effects; and quadratic terms in the form \code{I(x1^2)}.} \item{model}{the name of a statistical model to estimate. For a list of other supported models and their documentation see: \url{http://docs.zeligproject.org/articles/}.} \item{data}{the name of a data frame containing the variables referenced in the formula or a list of multiply imputed data frames each having the same variable names and row numbers (created by \code{Amelia} or \code{\link{to_zelig_mi}}).} \item{...}{additional arguments passed to \code{zelig}, relevant for the model to be estimated.} \item{by}{a factor variable contained in \code{data}. If supplied, \code{zelig} will subset the data frame based on the levels in the \code{by} variable, and estimate a model for each subset. This can save a considerable amount of effort. You may also use \code{by} to run models using MatchIt subclasses.} \item{cite}{If is set to 'TRUE' (default), the model citation will be printed to the console.} } \value{ Depending on the class of model selected, \code{zelig} will return an object with elements including \code{coefficients}, \code{residuals}, and \code{formula} which may be summarized using \code{summary(z.out)} or individually extracted using, for example, \code{coef(z.out)}. See \url{http://docs.zeligproject.org/articles/getters.html} for a list of functions to extract model components. You can also extract whole fitted model objects using \code{\link{from_zelig_model}}. } \description{ Bayesian Normal Linear Regression } \details{ Additional parameters avaialable to many models include: \itemize{ \item \code{weights}: vector of weight values or a name of a variable in the dataset by which to weight the model. For more information see: \url{http://docs.zeligproject.org/articles/weights.html}. \item \code{burnin}: number of the initial MCMC iterations to be discarded (defaults to 1,000). \item \code{mcmc}: number of the MCMC iterations after burnin (defaults to 10,000). \item \code{thin}: thinning interval for the Markov chain. Only every thin-th draw from the Markov chain is kept. The value of mcmc must be divisible by this value. The default value is 1. \item \code{verbose}: defaults to FALSE. If TRUE, the progress of the sampler (every 10\%) is printed to the screen. \item \code{seed}: seed for the random number generator. The default is \code{NA} which corresponds to a random seed of 12345. \item \code{beta.start}: starting values for the Markov chain, either a scalar or vector with length equal to the number of estimated coefficients. The default is \code{NA}, such that the maximum likelihood estimates are used as the starting values. } Use the following parameters to specify the model's priors: \itemize{ \item \code{b0}: prior mean for the coefficients, either a numeric vector or a scalar. If a scalar value, that value will be the prior mean for all the coefficients. The default is 0. \item \code{B0}: prior precision parameter for the coefficients, either a square matrix (with the dimensions equal to the number of the coefficients) or a scalar. If a scalar value, that value times an identity matrix will be the prior precision parameter. The default is 0, which leads to an improper prior. \item \code{c0}: c0/2 is the shape parameter for the Inverse Gamma prior on the variance of the disturbance terms. \item \code{d0}: d0/2 is the scale parameter for the Inverse Gamma prior on the variance of the disturbance terms. } } \examples{ data(macro) z.out <- zelig(unem ~ gdp + capmob + trade, model = "normal.bayes", data = macro, verbose = FALSE) data(macro) z.out <- zelig(unem ~ gdp + capmob + trade, model = "normal.bayes", data = macro, verbose = FALSE) z.out$geweke.diag() z.out$heidel.diag() z.out$raftery.diag() summary(z.out) x.out <- setx(z.out) s.out1 <- sim(z.out, x = x.out) summary(s.out1) x.high <- setx(z.out, trade = quantile(macro$trade, prob = 0.8)) x.low <- setx(z.out, trade = quantile(macro$trade, prob = 0.2)) s.out2 <- sim(z.out, x = x.high, x1 = x.low) summary(s.out2) } \seealso{ Vignette: \url{http://docs.zeligproject.org/articles/zelig_normalbayes.html} } Zelig/man/summary-Zelig-method.Rd0000644000176200001440000000062113763512134016415 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-zelig.R \name{summary,Zelig-method} \alias{summary,Zelig-method} \title{Summary method for Zelig objects} \usage{ \S4method{summary}{Zelig}(object, ...) } \arguments{ \item{object}{An Object of Class Zelig} \item{...}{Additional parameters to be passed to summary} } \description{ Summary method for Zelig objects } Zelig/man/Zelig-probit-survey-class.Rd0000644000176200001440000001175413754260262017412 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-probit-survey.R \docType{class} \name{Zelig-probit-survey-class} \alias{Zelig-probit-survey-class} \alias{zprobitsurvey} \title{Probit Regression with Survey Weights} \arguments{ \item{model}{the name of a statistical model to estimate. For a list of other supported models and their documentation see: \url{http://docs.zeligproject.org/articles/}.} \item{data}{the name of a data frame containing the variables referenced in the formula or a list of multiply imputed data frames each having the same variable names and row numbers (created by \code{Amelia} or \code{\link{to_zelig_mi}}).} \item{...}{additional arguments passed to \code{zelig}, relevant for the model to be estimated.} \item{by}{a factor variable contained in \code{data}. If supplied, \code{zelig} will subset the data frame based on the levels in the \code{by} variable, and estimate a model for each subset. This can save a considerable amount of effort. You may also use \code{by} to run models using MatchIt subclasses.} \item{cite}{If is set to 'TRUE' (default), the model citation will be printed to the console.} \item{below:}{point at which the dependent variable is censored from below. If the dependent variable is only censored from above, set \code{below = -Inf}. The default value is 0.} \item{above:}{point at which the dependent variable is censored from above. If the dependent variable is only censored from below, set \code{above = Inf}. The default value is \code{Inf}.} } \value{ Depending on the class of model selected, \code{zelig} will return an object with elements including \code{coefficients}, \code{residuals}, and \code{formula} which may be summarized using \code{summary(z.out)} or individually extracted using, for example, \code{coef(z.out)}. See \url{http://docs.zeligproject.org/articles/getters.html} for a list of functions to extract model components. You can also extract whole fitted model objects using \code{\link{from_zelig_model}}. } \description{ @param formula a symbolic representation of the model to be estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the dependent variable and \code{x1} and \code{x2} are the explanatory variables, and \code{y}, \code{x1}, and \code{x2} are contained in the same dataset. (You may include more than two explanatory variables, of course.) The \code{+} symbol means ``inclusion'' not ``addition.'' You may also include interaction terms and main effects in the form \code{x1*x2} without computing them in prior steps; \code{I(x1*x2)} to include only the interaction term and exclude the main effects; and quadratic terms in the form \code{I(x1^2)}. } \details{ Additional parameters avaialable to this model include: \itemize{ \item weights: vector of weight values or a name of a variable in the dataset by which to weight the model. For more information see: \url{http://docs.zeligproject.org/articles/weights.html}. \item burnin: number of the initial MCMC iterations to be discarded (defaults to 1,000). \item mcmc: number of the MCMC iterations after burnin (defaults to 10,000). \item thin: thinning interval for the Markov chain. Only every thin-th draw from the Markov chain is kept. The value of mcmc must be divisible by this value. The default value is 1. \item verbose: defaults to FALSE. If TRUE, the progress of the sampler (every 10\%) is printed to the screen. \item seed: seed for the random number generator. The default is \code{NA} which corresponds to a random seed of 12345. \item beta.start: starting values for the Markov chain, either a scalar or vector with length equal to the number of estimated coefficients. The default is \code{NA}, such that the maximum likelihood estimates are used as the starting values. } Use the following parameters to specify the model's priors: \itemize{ \item b0: prior mean for the coefficients, either a numeric vector or a scalar. If a scalar value, that value will be the prior mean for all the coefficients. The default is 0. \item B0: prior precision parameter for the coefficients, either a square matrix (with the dimensions equal to the number of the coefficients) or a scalar. If a scalar value, that value times an identity matrix will be the prior precision parameter. The default is 0, which leads to an improper prior. \item c0: c0/2 is the shape parameter for the Inverse Gamma prior on the variance of the disturbance terms. \item d0: d0/2 is the scale parameter for the Inverse Gamma prior on the variance of the disturbance terms. } } \examples{ data(api, package="survey") z.out1 <- zelig(enroll ~ api99 + yr.rnd , model = "poisson.survey", data = apistrat) summary(z.out1) x.low <- setx(z.out1, api99= quantile(apistrat$api99, 0.2)) x.high <- setx(z.out1, api99= quantile(apistrat$api99, 0.8)) s.out1 <- sim(z.out1, x=x.low, x1=x.high) summary(s.out1) plot(s.out1) } \seealso{ Vignette: \url{http://docs.zeligproject.org/articles/zelig_probitsurvey.html} } Zelig/man/Zelig-ls-class.Rd0000644000176200001440000000651513763512134015173 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-ls.R \docType{class} \name{Zelig-ls-class} \alias{Zelig-ls-class} \alias{zls} \title{Least Squares Regression for Continuous Dependent Variables} \arguments{ \item{formula}{a symbolic representation of the model to be estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the dependent variable and \code{x1} and \code{x2} are the explanatory variables, and \code{y}, \code{x1}, and \code{x2} are contained in the same dataset. (You may include more than two explanatory variables, of course.) The \code{+} symbol means ``inclusion'' not ``addition.'' You may also include interaction terms and main effects in the form \code{x1*x2} without computing them in prior steps; \code{I(x1*x2)} to include only the interaction term and exclude the main effects; and quadratic terms in the form \code{I(x1^2)}.} \item{model}{the name of a statistical model to estimate. For a list of other supported models and their documentation see: \url{http://docs.zeligproject.org/articles/}.} \item{data}{the name of a data frame containing the variables referenced in the formula or a list of multiply imputed data frames each having the same variable names and row numbers (created by \code{Amelia} or \code{\link{to_zelig_mi}}).} \item{...}{additional arguments passed to \code{zelig}, relevant for the model to be estimated.} \item{by}{a factor variable contained in \code{data}. If supplied, \code{zelig} will subset the data frame based on the levels in the \code{by} variable, and estimate a model for each subset. This can save a considerable amount of effort. You may also use \code{by} to run models using MatchIt subclasses.} \item{cite}{If is set to 'TRUE' (default), the model citation will be printed to the console.} } \value{ Depending on the class of model selected, \code{zelig} will return an object with elements including \code{coefficients}, \code{residuals}, and \code{formula} which may be summarized using \code{summary(z.out)} or individually extracted using, for example, \code{coef(z.out)}. See \url{http://docs.zeligproject.org/articles/getters.html} for a list of functions to extract model components. You can also extract whole fitted model objects using \code{\link{from_zelig_model}}. } \description{ Least Squares Regression for Continuous Dependent Variables } \details{ Additional parameters avaialable to this model include: \itemize{ \item \code{weights}: vector of weight values or a name of a variable in the dataset by which to weight the model. For more information see: \url{http://docs.zeligproject.org/articles/weights.html}. \item \code{bootstrap}: logical or numeric. If \code{FALSE} don't use bootstraps to robustly estimate uncertainty around model parameters due to sampling error. If an integer is supplied, the number of boostraps to run. For more information see: \url{http://docs.zeligproject.org/articles/bootstraps.html}. } } \section{Methods}{ \describe{ \item{\code{zelig(formula, data, model = NULL, ..., weights = NULL, by, bootstrap = FALSE)}}{The zelig function estimates a variety of statistical models} }} \examples{ library(Zelig) data(macro) z.out1 <- zelig(unem ~ gdp + capmob + trade, model = "ls", data = macro, cite = FALSE) summary(z.out1) } \seealso{ Vignette: \url{http://docs.zeligproject.org/articles/zelig_ls.html} } Zelig/man/Zelig-binchoice-survey-class.Rd0000644000176200001440000000065413754260262020033 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-binchoice-survey.R \docType{class} \name{Zelig-binchoice-survey-class} \alias{Zelig-binchoice-survey-class} \alias{zbinchoicesurvey} \title{Object for Binary Choice outcomes with Survey Weights for inheritance across models in Zelig} \description{ Object for Binary Choice outcomes with Survey Weights for inheritance across models in Zelig } Zelig/man/figures/0000755000176200001440000000000013754260262013552 5ustar liggesusersZelig/man/figures/img/0000755000176200001440000000000013754260262014326 5ustar liggesusersZelig/man/figures/img/zelig_models_thumb.png0000644000176200001440000030526013754260262020716 0ustar liggesusersPNG  IHDRZӽ iCCPICC ProfileHWTZ RBH.:FH!!ؑEׂ+*ZYTD "e],Pyv=gr;ߝܙ3;'' U [' e&$&1I=: hgsD9>aHwy $ֿWQDHS"N6G599<Po4+/G VBq NaM NakML,T6[73(I8 |[ ⤳߇:;{&dS~)1Q,E*d('=\-Y9 a $9uۗ93T7 R# V<+X}?G 0@  qf;R_hBb8E83Jd,K煌m7a&Öf d# \3/o4(BQ?_(CQkRRLl\=0e总n#~LYDb01h1ʃYg& =f'"{7 jd(}-O|z%K%'9o(~??[b˰#Xv5avVi%% Gl47[>dDyy73g1"Z3]-Czf#u@ewO3z}5':9baL'9P2Z@spDb@"W<dCγ<Rv aPip\=B:#&‸"^HD!H212Y"efd'RGN#.҃!o(RQuT5EǡƠ44-@ЕF=֡K }bSfb~XbBlVcX kX7֏}‰8g66X f|^|FtVwB!FE(&}KxO$D3 ܗ \ Vb-E|L$HZ$+')&告IHHHWIdE>فHN" ȅr~IU3򐂊BWa* Wz(3'%AYLHܧUTT4TtSW\QyOT5%Տ:*6SPh4SDˣU>*ѕlBJ *ꔮ*RVP6QQ\\|Dr [eJq[*tU{lU/>W#qՊvQ{LFt?:~ޫNT7SQP/U?ޡ>1^#NcF n0e07|L͘c>hdi4K4k5oh~bjhejѪzk[jO֞MvXc9cK{WձԉҙK]gPWO7H7Gw~=K/CoI>}>_)L 3016402435,45|`D1r5J5Zgb4`o74 1+06oN3654nApȴjiZ:Y[VX^BV[ nJ[6T|j[mmmqƭ6]n{j 8X:p*;:68o57~NtINKZ:8 k\]]rUwt]zލЭ퓻{a3ez߹Ye¢[LYr]aY%Kt=%bbaK/×u,w\inR/+8+.j_WXjjjk+S-+({vںuu%ޭB(7mldi/7ߨݢe[[ncmٮtw4,EܕmVG{O鞯{{EkrگU5Z-;0@A 565;k!'~p#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GfU Ra7K\0W\qhuY-p% `Wv+M$@$vtr{$@$@$@ncIHN= +& p; ` O$@$J6VHH(ރ? + PXi  v{$@$@$@ncIHN= +& p; ` O$@$J6VHH(ރ? + PXi  v{$@$@$@ncIHN= +& p; ` O$@$J6VHH(ރ? + PXi  v{$Piiii&ͭU<H (At4={HXXXN:rꩧ/e9 s饗JRR?g]?5;"""W^U%?̟?,O> 8@S+z@ p r'|"=ddd?1XBfΜ)ǏJ4iI'p<k.ܙ'={_]N?tShtIY->E\xR(hӦ߿HF%vV$wiyW li^zr嗗vqVˎ'+D y@N$;;[]w5L 4ի}'otY9oKAA9oذ3FL"\r}|=[n9hc޼yrgHڵUVr=HNN9=ڬCݢBЮkְ?/r~+]t 3k,.XnV9MǍ'[l߰a\tEҼys< QGfZ;^.P+ӦM3Z;8 e;\!$o,$)wsϕh?l鏴uu0tM bK-V۶m}1Rj5kzͽU[*|زofm&SR9O=i >znqXS|eŖZ矷T[{9uҥߚ6*,lRN BcǎL8Ѫ[jTon|kРAVӦM-ԩS֭[v:Y`N8/+V^}դn#Q˅2sO(c8_UV0܌ MfV\305-[LO@k.cB=ՀG5UGO[n xN`._| Y_~I.0cjâج!Lxs<姟~x C| #H}j `P=]A`ذa2vXSWb,*Acb UlԨO@%&&lU~7#8 ># ^(v̆7Qwɿ@h¼T/kcӷ~OSmҌ";RQs⋂ุ8Qy~7nh~ӧO4iowq};+$P*ZH)hħjtք ,f#Xu9Xε]߾+4hQw Hc(=lnGyČgb<c ^HfRxP+ H(l5 @54j>HH(l5 @5IHI؛V T3 j>HH(l5 @5IHI؛V T3 j>HH(l5 @5IHI؛V T3 j>HH(l5 @5IHI؛V T3 j>HH(l5 @5IHIljIENDB`Zelig/man/figures/example_plot_graph-1.png0000644000176200001440000027564413754260262020312 0ustar liggesusersPNG  IHDR 9\' iCCPICC Profile8U]hU>sg#$Sl4t? % V46nI6"dΘ83OEP|1Ŀ (>/ % (>P苦;3ie|{g蹪X-2s=+WQ+]L6O w[C{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~W +lkÆ 1`'-- -s]5jX[[" KoY/'TEEzK+04p@;~1T%~7x zƧ~*7 W_}bl\`t=FG&M~ΧׁW=7jԨXΜ9Sl=m#<<U(Ð-4k, >|L)+/Ea[&,'ggga$[riӦSC~O?0˶yfAy~4ijԨ6 nH9 ̙#((Haxx8޽+Lw&=^Ǐwǡ$l#,|:O>ػw/G"O|ʝ;ǚOlMZg} %]s_ϋ¶5JovvG2n* ~7&͛7OȎRU>"ވN](^lBq1Kl7";|65pdc߾}棺uі|6"ą~ X&11*x6!J|Q#D@ |$Q>?))I5n8oy>WCna7nQ5W7Pl/E>g7}6|6P_V|tDҥKfWٌβuQx%B޳|['7H._,ͧ 'GSxGF3w)o%UR~higggWiN/҇kni}^s({—JH*"@ DȈQgD"@Pr@Ћd D"@dDPuJ D% T H6"@ D@FQgD"@Pr@Ћd D"@dDPuJ D% T H6"@ D@FQgD"@Pr@Ћd D"@dDPuJ D% T H6"@ D@FQgD"@Pr@Ћd D"@dDPuJ D% T H6"@ D@FQgD"@Pr@Ћd D"@dDPuJ D% T H6"@ D@FQgD"@Pr@Ћd D"@dDPuJ D% T H6"@ D@FQgD"@Pr@Ћd D"@dDPuJ D% T H6"@ D@FQgD"@Pr@Ћd D"@dDPuJ D% T H6"@ D@FQgD"@Pr@Ћd D"@dDPuJ D% T H6"@ D@FQgD"@Pr@Ћd D"@dDPuJ D%\^IIENDB`Zelig/man/Zelig-tobit-class.Rd0000644000176200001440000001115713763512134015674 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-tobit.R \docType{class} \name{Zelig-tobit-class} \alias{Zelig-tobit-class} \alias{ztobit} \title{Linear Regression for a Left-Censored Dependent Variable} \arguments{ \item{formula}{a symbolic representation of the model to be estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the dependent variable and \code{x1} and \code{x2} are the explanatory variables, and \code{y}, \code{x1}, and \code{x2} are contained in the same dataset. (You may include more than two explanatory variables, of course.) The \code{+} symbol means ``inclusion'' not ``addition.'' You may also include interaction terms and main effects in the form \code{x1*x2} without computing them in prior steps; \code{I(x1*x2)} to include only the interaction term and exclude the main effects; and quadratic terms in the form \code{I(x1^2)}.} \item{model}{the name of a statistical model to estimate. For a list of other supported models and their documentation see: \url{http://docs.zeligproject.org/articles/}.} \item{data}{the name of a data frame containing the variables referenced in the formula or a list of multiply imputed data frames each having the same variable names and row numbers (created by \code{Amelia} or \code{\link{to_zelig_mi}}).} \item{...}{additional arguments passed to \code{zelig}, relevant for the model to be estimated.} \item{by}{a factor variable contained in \code{data}. If supplied, \code{zelig} will subset the data frame based on the levels in the \code{by} variable, and estimate a model for each subset. This can save a considerable amount of effort. You may also use \code{by} to run models using MatchIt subclasses.} \item{cite}{If is set to 'TRUE' (default), the model citation will be printed to the console.} \item{below}{(defaults to 0) The point at which the dependent variable is censored from below. If any values in the dependent variable are observed to be less than the censoring point, it is assumed that that particular observation is censored from below at the observed value.} \item{above}{(defaults to 0) The point at which the dependent variable is censored from above If any values in the dependent variable are observed to be more than the censoring point, it is assumed that that particular observation is censored from above at the observed value.} \item{robust}{defaults to FALSE. If TRUE, \code{zelig()} computes robust standard errors based on sandwich estimators and the options selected in cluster.} \item{cluster}{if robust = TRUE, you may select a variable to define groups of correlated observations. Let x3 be a variable that consists of either discrete numeric values, character strings, or factors that define strata. Then z.out <- zelig(y ~ x1 + x2, robust = TRUE, cluster = "x3", model = "tobit", data = mydata)means that the observations can be correlated within the strata defined by the variable x3, and that robust standard errors should be calculated according to those clusters. If robust = TRUE but cluster is not specified, zelig() assumes that each observation falls into its own cluster.} } \value{ Depending on the class of model selected, \code{zelig} will return an object with elements including \code{coefficients}, \code{residuals}, and \code{formula} which may be summarized using \code{summary(z.out)} or individually extracted using, for example, \code{coef(z.out)}. See \url{http://docs.zeligproject.org/articles/getters.html} for a list of functions to extract model components. You can also extract whole fitted model objects using \code{\link{from_zelig_model}}. } \description{ Linear Regression for a Left-Censored Dependent Variable } \details{ Additional parameters avaialable to this model include: \itemize{ \item \code{weights}: vector of weight values or a name of a variable in the dataset by which to weight the model. For more information see: \url{http://docs.zeligproject.org/articles/weights.html}. \item \code{bootstrap}: logical or numeric. If \code{FALSE} don't use bootstraps to robustly estimate uncertainty around model parameters due to sampling error. If an integer is supplied, the number of boostraps to run. For more information see: \url{http://docs.zeligproject.org/articles/bootstraps.html}. } } \section{Methods}{ \describe{ \item{\code{zelig(formula, data, model = NULL, ..., weights = NULL, by, bootstrap = FALSE)}}{The zelig function estimates a variety of statistical models} }} \examples{ library(Zelig) data(tobin) z.out <- zelig(durable ~ age + quant, model = "tobit", data = tobin) summary(z.out) } \seealso{ Vignette: \url{http://docs.zeligproject.org/articles/zelig_tobit.html} } Zelig/man/p_pull.Rd0000644000176200001440000000047013754260262013671 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{p_pull} \alias{p_pull} \title{Extract p-values from a fitted model object} \usage{ p_pull(x) } \arguments{ \item{x}{a fitted Zelig object} } \description{ Extract p-values from a fitted model object } \keyword{internal} Zelig/man/Zelig-probit-gee-class.Rd0000644000176200001440000000752013754260262016611 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-probit-gee.R \docType{class} \name{Zelig-probit-gee-class} \alias{Zelig-probit-gee-class} \alias{zprobitgee} \title{Generalized Estimating Equation for Probit Regression} \arguments{ \item{formula}{a symbolic representation of the model to be estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the dependent variable and \code{x1} and \code{x2} are the explanatory variables, and \code{y}, \code{x1}, and \code{x2} are contained in the same dataset. (You may include more than two explanatory variables, of course.) The \code{+} symbol means ``inclusion'' not ``addition.'' You may also include interaction terms and main effects in the form \code{x1*x2} without computing them in prior steps; \code{I(x1*x2)} to include only the interaction term and exclude the main effects; and quadratic terms in the form \code{I(x1^2)}.} \item{model}{the name of a statistical model to estimate. For a list of other supported models and their documentation see: \url{http://docs.zeligproject.org/articles/}.} \item{data}{the name of a data frame containing the variables referenced in the formula or a list of multiply imputed data frames each having the same variable names and row numbers (created by \code{Amelia} or \code{\link{to_zelig_mi}}).} \item{...}{additional arguments passed to \code{zelig}, relevant for the model to be estimated.} \item{by}{a factor variable contained in \code{data}. If supplied, \code{zelig} will subset the data frame based on the levels in the \code{by} variable, and estimate a model for each subset. This can save a considerable amount of effort. You may also use \code{by} to run models using MatchIt subclasses.} \item{cite}{If is set to 'TRUE' (default), the model citation will be printed to the console.} \item{corstr:character}{string specifying the correlation structure: "independence", "exchangeable", "ar1", "unstructured" and "userdefined"} \item{See}{geeglm in package geepack for other function arguments.} \item{id:}{where id is a variable which identifies the clusters. The data should be sorted by id and should be ordered within each cluster when appropriate} \item{corstr:}{character string specifying the correlation structure: "independence", "exchangeable", "ar1", "unstructured" and "userdefined"} \item{geeglm:}{See geeglm in package geepack for other function arguments} } \value{ Depending on the class of model selected, \code{zelig} will return an object with elements including \code{coefficients}, \code{residuals}, and \code{formula} which may be summarized using \code{summary(z.out)} or individually extracted using, for example, \code{coef(z.out)}. See \url{http://docs.zeligproject.org/articles/getters.html} for a list of functions to extract model components. You can also extract whole fitted model objects using \code{\link{from_zelig_model}}. } \description{ Generalized Estimating Equation for Probit Regression } \details{ Additional parameters avaialable to this model include: \itemize{ \item \code{weights}: vector of weight values or a name of a variable in the dataset by which to weight the model. For more information see: \url{http://docs.zeligproject.org/articles/weights.html}. \item \code{bootstrap}: logical or numeric. If \code{FALSE} don't use bootstraps to robustly estimate uncertainty around model parameters due to sampling error. If an integer is supplied, the number of boostraps to run. For more information see: \url{http://docs.zeligproject.org/articles/bootstraps.html}. } } \examples{ data(turnout) turnout$cluster <- rep(c(1:200), 10) sorted.turnout <- turnout[order(turnout$cluster),] z.out1 <- zelig(vote ~ race + educate, model = "probit.gee", id = "cluster", data = sorted.turnout) summary(z.out1) } \seealso{ Vignette: \url{http://docs.zeligproject.org/articles/zelig_probitgee.html} } Zelig/man/coalition2.Rd0000644000176200001440000000215113754260262014437 0ustar liggesusers\name{coalition2} \alias{coalition2} \docType{data} \title{Coalition Dissolution in Parliamentary Democracies, Modified Version} \description{ This data set contains survival data on government coalitions in parliamentary democracies (Belgium, Canada, Denmark, Finland, France, Iceland, Ireland, Israel, Italy, Netherlands, Norway, Portugal, Spain, Sweden, and the United Kingdom) for the period 1945-1987. Country indicator variables are included in the sample data. } \usage{data(coalition2)} \format{ A data frame containing 8 variables ("duration", "ciep12", "invest", "fract", "polar", "numst2", "crisis", "country") and 314 observations. For variable descriptions, please refer to King, Alt, Burns and Laver (1990). } \source{ICPSR} \references{ King, Gary, James E. Alt, Nancy Elizabeth Burns and Michael Laver (1990). ``A Unified Model of Cabinet Dissolution in Parliamentary Democracies,'' \emph{American Journal of Political Science}, vol. 34, no. 3, pp. 846-870. Gary King, James E. Alt, Nancy Burns, and Michael Laver. ICPSR Publication Related Archive, 1115. } \keyword{datasets} Zelig/man/avg.Rd0000644000176200001440000000057413754260262013160 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{avg} \alias{avg} \title{Compute central tendancy as approrpriate to data type} \usage{ avg(val) } \arguments{ \item{val}{a vector of values} } \value{ a mean (if numeric) or a median (if ordered) or mode (otherwise) } \description{ Compute central tendancy as approrpriate to data type } Zelig/man/sim.Rd0000644000176200001440000001211413763512134013162 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/wrappers.R \name{sim} \alias{sim} \title{Generic Method for Computing and Organizing Simulated Quantities of Interest} \usage{ sim( obj, x, x1, y = NULL, num = 1000, bootstrap = F, bootfn = NULL, cond.data = NULL, ... ) } \arguments{ \item{obj}{output object from \code{zelig}} \item{x}{values of explanatory variables used for simulation, generated by \code{setx}. Not if ommitted, then \code{sim} will look for values in the reference class object} \item{x1}{optional values of explanatory variables (generated by a second call of \code{setx}) particular computations of quantities of interest} \item{y}{a parameter reserved for the computation of particular quantities of interest (average treatment effects). Few models currently support this parameter} \item{num}{an integer specifying the number of simulations to compute} \item{bootstrap}{currently unsupported} \item{bootfn}{currently unsupported} \item{cond.data}{currently unsupported} \item{...}{arguments reserved future versions of Zelig} } \value{ The output stored in \code{s.out} varies by model. Use the \code{names} function to view the output stored in \code{s.out}. Common elements include: \item{x}{the \code{\link{setx}} values for the explanatory variables, used to calculate the quantities of interest (expected values, predicted values, etc.). } \item{x1}{the optional \code{\link{setx}} object used to simulate first differences, and other model-specific quantities of interest, such as risk-ratios.} \item{call}{the options selected for \code{\link{sim}}, used to replicate quantities of interest. } \item{zelig.call}{the original function and options for \code{\link{zelig}}, used to replicate analyses. } \item{num}{the number of simulations requested. } \item{par}{the parameters (coefficients, and additional model-specific parameters). You may wish to use the same set of simulated parameters to calculate quantities of interest rather than simulating another set.} \item{qi\$ev}{simulations of the expected values given the model and \code{x}. } \item{qi\$pr}{simulations of the predicted values given by the fitted values. } \item{qi\$fd}{simulations of the first differences (or risk difference for binary models) for the given \code{x} and \code{x1}. The difference is calculated by subtracting the expected values given \code{x} from the expected values given \code{x1}. (If do not specify \code{x1}, you will not get first differences or risk ratios.) } \item{qi\$rr}{simulations of the risk ratios for binary and multinomial models. See specific models for details.} \item{qi\$ate.ev}{simulations of the average expected treatment effect for the treatment group, using conditional prediction. Let \eqn{t_i} be a binary explanatory variable defining the treatment (\eqn{t_i=1}) and control (\eqn{t_i=0}) groups. Then the average expected treatment effect for the treatment group is \deqn{ \frac{1}{n}\sum_{i=1}^n [ \, Y_i(t_i=1) - E[Y_i(t_i=0)] \mid t_i=1 \,],} where \eqn{Y_i(t_i=1)} is the value of the dependent variable for observation \eqn{i} in the treatment group. Variation in the simulations are due to uncertainty in simulating \eqn{E[Y_i(t_i=0)]}, the counterfactual expected value of \eqn{Y_i} for observations in the treatment group, under the assumption that everything stays the same except that the treatment indicator is switched to \eqn{t_i=0}. } \item{qi\$ate.pr}{simulations of the average predicted treatment effect for the treatment group, using conditional prediction. Let \eqn{t_i} be a binary explanatory variable defining the treatment (\eqn{t_i=1}) and control (\eqn{t_i=0}) groups. Then the average predicted treatment effect for the treatment group is \deqn{ \frac{1}{n}\sum_{i=1}^n [ \, Y_i(t_i=1) - \widehat{Y_i(t_i=0)} \mid t_i=1 \,],} where \eqn{Y_i(t_i=1)} is the value of the dependent variable for observation \eqn{i} in the treatment group. Variation in the simulations are due to uncertainty in simulating \eqn{\widehat{Y_i(t_i=0)}}, the counterfactual predicted value of \eqn{Y_i} for observations in the treatment group, under the assumption that everything stays the same except that the treatment indicator is switched to \eqn{t_i=0}.} } \description{ Simulate quantities of interest from the estimated model output from \code{zelig()} given specified values of explanatory variables established in \code{setx()}. For classical \emph{maximum likelihood} models, \code{sim()} uses asymptotic normal approximation to the log-likelihood. For \emph{Bayesian models}, Zelig simulates quantities of interest from the posterior density, whenever possible. For \emph{robust Bayesian models}, simulations are drawn from the identified class of Bayesian posteriors. Alternatively, you may generate quantities of interest using bootstrapped parameters. } \details{ This documentation describes the \code{sim} Zelig 4 compatibility wrapper function. } \author{ Christopher Gandrud, Matt Owen, Olivia Lau and Kosuke Imai } Zelig/man/extract_setrange.Rd0000644000176200001440000000137013754260262015740 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/interface.R \name{extract_setrange} \alias{extract_setrange} \title{Extract setrange to return as tidy formatted data frame} \usage{ extract_setrange(obj, which_range = "range", only_setx = FALSE) } \arguments{ \item{obj}{a zelig object containing a range of simulated quantities of interest} \item{which_range}{character string either \code{'range'} or \code{'range1'} indicating whether to extract the first or second set of fitted values} \item{only_setx}{logical whether or not to only extract `setx`` values.} } \description{ Extract setrange to return as tidy formatted data frame } \seealso{ \code{\link{zelig_qi_to_df}} } \author{ Christopher Gandrud } \keyword{internal} Zelig/man/Zelig-logit-gee-class.Rd0000644000176200001440000000732413754260262016432 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-logit-gee.R \docType{class} \name{Zelig-logit-gee-class} \alias{Zelig-logit-gee-class} \alias{zlogitgee} \title{Generalized Estimating Equation for Logit Regression} \arguments{ \item{formula}{a symbolic representation of the model to be estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the dependent variable and \code{x1} and \code{x2} are the explanatory variables, and \code{y}, \code{x1}, and \code{x2} are contained in the same dataset. (You may include more than two explanatory variables, of course.) The \code{+} symbol means ``inclusion'' not ``addition.'' You may also include interaction terms and main effects in the form \code{x1*x2} without computing them in prior steps; \code{I(x1*x2)} to include only the interaction term and exclude the main effects; and quadratic terms in the form \code{I(x1^2)}.} \item{model}{the name of a statistical model to estimate. For a list of other supported models and their documentation see: \url{http://docs.zeligproject.org/articles/}.} \item{data}{the name of a data frame containing the variables referenced in the formula or a list of multiply imputed data frames each having the same variable names and row numbers (created by \code{Amelia} or \code{\link{to_zelig_mi}}).} \item{...}{additional arguments passed to \code{zelig}, relevant for the model to be estimated.} \item{by}{a factor variable contained in \code{data}. If supplied, \code{zelig} will subset the data frame based on the levels in the \code{by} variable, and estimate a model for each subset. This can save a considerable amount of effort. You may also use \code{by} to run models using MatchIt subclasses.} \item{cite}{If is set to 'TRUE' (default), the model citation will be printed to the console.} \item{id:}{where id is a variable which identifies the clusters. The data should be sorted by \code{id} and should be ordered within each cluster when appropriate} \item{corstr:}{character string specifying the correlation structure: "independence", "exchangeable", "ar1", "unstructured" and "userdefined"} \item{geeglm:}{See geeglm in package geepack for other function arguments} } \value{ Depending on the class of model selected, \code{zelig} will return an object with elements including \code{coefficients}, \code{residuals}, and \code{formula} which may be summarized using \code{summary(z.out)} or individually extracted using, for example, \code{coef(z.out)}. See \url{http://docs.zeligproject.org/articles/getters.html} for a list of functions to extract model components. You can also extract whole fitted model objects using \code{\link{from_zelig_model}}. } \description{ Generalized Estimating Equation for Logit Regression } \details{ Additional parameters avaialable to this model include: \itemize{ \item \code{weights}: vector of weight values or a name of a variable in the dataset by which to weight the model. For more information see: \url{http://docs.zeligproject.org/articles/weights.html}. \item \code{bootstrap}: logical or numeric. If \code{FALSE} don't use bootstraps to robustly estimate uncertainty around model parameters due to sampling error. If an integer is supplied, the number of boostraps to run. For more information see: \url{http://docs.zeligproject.org/articles/bootstraps.html}. } } \examples{ data(turnout) turnout$cluster <- rep(c(1:200), 10) sorted.turnout <- turnout[order(turnout$cluster),] z.out1 <- zelig(vote ~ race + educate, model = "logit.gee", id = "cluster", data = sorted.turnout) summary(z.out1) x.out1 <- setx(z.out1) s.out1 <- sim(z.out1, x = x.out1) summary(s.out1) plot(s.out1) } \seealso{ Vignette: \url{http://docs.zeligproject.org/articles/zelig_logitgee.html} } Zelig/man/Zelig-glm-class.Rd0000644000176200001440000000101213763512134015317 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-glm.R \docType{class} \name{Zelig-glm-class} \alias{Zelig-glm-class} \alias{zglm} \title{Generalized Linear Model object for inheritance across models in Zelig} \description{ Generalized Linear Model object for inheritance across models in Zelig } \section{Methods}{ \describe{ \item{\code{zelig(formula, data, model = NULL, ..., weights = NULL, by, bootstrap = FALSE)}}{The zelig function estimates a variety of statistical models} }} Zelig/man/setval.Rd0000644000176200001440000000065213754260262013676 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{setval} \alias{setval} \title{Set new value of a variable as approrpriate to data type} \usage{ setval(val, newval) } \arguments{ \item{val}{old value} \item{newval}{new value} } \value{ a variable of the same type with a value \code{val} } \description{ Set new value of a variable as approrpriate to data type } \keyword{internal} Zelig/man/Zelig-gamma-class.Rd0000644000176200001440000000623413754260262015637 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-gamma.R \docType{class} \name{Zelig-gamma-class} \alias{Zelig-gamma-class} \alias{zgamma} \title{Gamma Regression for Continuous, Positive Dependent Variables} \arguments{ \item{formula}{a symbolic representation of the model to be estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the dependent variable and \code{x1} and \code{x2} are the explanatory variables, and \code{y}, \code{x1}, and \code{x2} are contained in the same dataset. (You may include more than two explanatory variables, of course.) The \code{+} symbol means ``inclusion'' not ``addition.'' You may also include interaction terms and main effects in the form \code{x1*x2} without computing them in prior steps; \code{I(x1*x2)} to include only the interaction term and exclude the main effects; and quadratic terms in the form \code{I(x1^2)}.} \item{model}{the name of a statistical model to estimate. For a list of other supported models and their documentation see: \url{http://docs.zeligproject.org/articles/}.} \item{data}{the name of a data frame containing the variables referenced in the formula or a list of multiply imputed data frames each having the same variable names and row numbers (created by \code{Amelia} or \code{\link{to_zelig_mi}}).} \item{...}{additional arguments passed to \code{zelig}, relevant for the model to be estimated.} \item{by}{a factor variable contained in \code{data}. If supplied, \code{zelig} will subset the data frame based on the levels in the \code{by} variable, and estimate a model for each subset. This can save a considerable amount of effort. You may also use \code{by} to run models using MatchIt subclasses.} \item{cite}{If is set to 'TRUE' (default), the model citation will be printed to the console.} } \value{ Depending on the class of model selected, \code{zelig} will return an object with elements including \code{coefficients}, \code{residuals}, and \code{formula} which may be summarized using \code{summary(z.out)} or individually extracted using, for example, \code{coef(z.out)}. See \url{http://docs.zeligproject.org/articles/getters.html} for a list of functions to extract model components. You can also extract whole fitted model objects using \code{\link{from_zelig_model}}. } \description{ Gamma Regression for Continuous, Positive Dependent Variables } \details{ Additional parameters avaialable to this model include: \itemize{ \item \code{weights}: vector of weight values or a name of a variable in the dataset by which to weight the model. For more information see: \url{http://docs.zeligproject.org/articles/weights.html}. \item \code{bootstrap}: logical or numeric. If \code{FALSE} don't use bootstraps to robustly estimate uncertainty around model parameters due to sampling error. If an integer is supplied, the number of boostraps to run. For more information see: \url{http://docs.zeligproject.org/articles/bootstraps.html}. } } \examples{ library(Zelig) data(coalition) z.out <- zelig(duration ~ fract + numst2, model = "gamma", data = coalition) summary(z.out) } \seealso{ Vignette: \url{http://docs.zeligproject.org/articles/zelig_gamma.html} } Zelig/man/Zelig-poisson-survey-class.Rd0000644000176200001440000000625613754260262017606 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-poisson-survey.R \docType{class} \name{Zelig-poisson-survey-class} \alias{Zelig-poisson-survey-class} \alias{zpoissonsurvey} \title{Poisson Regression with Survey Weights} \arguments{ \item{formula}{a symbolic representation of the model to be estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the dependent variable and \code{x1} and \code{x2} are the explanatory variables, and \code{y}, \code{x1}, and \code{x2} are contained in the same dataset. (You may include more than two explanatory variables, of course.) The \code{+} symbol means ``inclusion'' not ``addition.'' You may also include interaction terms and main effects in the form \code{x1*x2} without computing them in prior steps; \code{I(x1*x2)} to include only the interaction term and exclude the main effects; and quadratic terms in the form \code{I(x1^2)}.} \item{model}{the name of a statistical model to estimate. For a list of other supported models and their documentation see: \url{http://docs.zeligproject.org/articles/}.} \item{data}{the name of a data frame containing the variables referenced in the formula or a list of multiply imputed data frames each having the same variable names and row numbers (created by \code{Amelia} or \code{\link{to_zelig_mi}}).} \item{...}{additional arguments passed to \code{zelig}, relevant for the model to be estimated.} \item{by}{a factor variable contained in \code{data}. If supplied, \code{zelig} will subset the data frame based on the levels in the \code{by} variable, and estimate a model for each subset. This can save a considerable amount of effort. You may also use \code{by} to run models using MatchIt subclasses.} \item{cite}{If is set to 'TRUE' (default), the model citation will be printed to the console.} } \value{ Depending on the class of model selected, \code{zelig} will return an object with elements including \code{coefficients}, \code{residuals}, and \code{formula} which may be summarized using \code{summary(z.out)} or individually extracted using, for example, \code{coef(z.out)}. See \url{http://docs.zeligproject.org/articles/getters.html} for a list of functions to extract model components. You can also extract whole fitted model objects using \code{\link{from_zelig_model}}. } \description{ Poisson Regression with Survey Weights } \details{ Additional parameters avaialable to this model include: \itemize{ \item \code{weights}: vector of weight values or a name of a variable in the dataset by which to weight the model. For more information see: \url{http://docs.zeligproject.org/articles/weights.html}. \item \code{bootstrap}: logical or numeric. If \code{FALSE} don't use bootstraps to robustly estimate uncertainty around model parameters due to sampling error. If an integer is supplied, the number of boostraps to run. For more information see: \url{http://docs.zeligproject.org/articles/bootstraps.html}. } } \examples{ library(Zelig) data(api, package="survey") z.out1 <- zelig(enroll ~ api99 + yr.rnd , model = "poisson.survey", data = apistrat) summary(z.out1) } \seealso{ Vignette: \url{http://docs.zeligproject.org/articles/zelig_poissonsurvey.html} } Zelig/man/simulations.plot.Rd0000644000176200001440000000241113754260262015717 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plots.R \name{simulations.plot} \alias{simulations.plot} \title{Plot Quantities of Interest in a Zelig-fashion} \usage{ simulations.plot(y, y1=NULL, xlab="", ylab="", main="", col=NULL, line.col=NULL, axisnames=TRUE) } \arguments{ \item{y}{A matrix or vector of simulated results generated by Zelig, to be graphed.} \item{y1}{For comparison of two sets of simulated results at different choices of covariates, this should be an object of the same type and dimension as y. If no comparison is to be made, this should be NULL.} \item{xlab}{Label for the x-axis.} \item{ylab}{Label for the y-axis.} \item{main}{Main plot title.} \item{col}{A vector of colors. Colors will be used in turn as the graph is built for main plot objects. For nominal/categorical data, this colors renders as the bar color, while for numeric data it renders as the background color.} \item{line.col}{A vector of colors. Colors will be used in turn as the graph is built for line color shading of plot objects.} \item{axisnames}{a character-vector, specifying the names of the axes} } \value{ nothing } \description{ Various graph generation for different common types of simulated results from Zelig } \author{ James Honaker } Zelig/man/df.residual-Zelig-method.Rd0000644000176200001440000000064513763512134017126 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-zelig.R \name{df.residual,Zelig-method} \alias{df.residual,Zelig-method} \title{Method for extracting residual degrees-of-freedom from Zelig objects} \usage{ \S4method{df.residual}{Zelig}(object) } \arguments{ \item{object}{An Object of Class Zelig} } \description{ Method for extracting residual degrees-of-freedom from Zelig objects } Zelig/man/zelig_mutate.Rd0000644000176200001440000000100313764425622015064 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{zelig_mutate} \alias{zelig_mutate} \title{Zelig Copy of plyr::mutate to avoid namespace conflict with dplyr} \source{ Hadley Wickham (2011). The Split-Apply-Combine Strategy for Data Analysis. Journal of Statistical Software, 40(1), 1-29. URL \url{https://www.jstatsoft.org/v40/i01/}. } \usage{ zelig_mutate(.data, ...) } \description{ Zelig Copy of plyr::mutate to avoid namespace conflict with dplyr } \keyword{internal} Zelig/man/simacf.Rd0000644000176200001440000000056313754260262013643 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-arima.R \name{simacf} \alias{simacf} \title{Construct Autocorrelation Function from Zelig object and simulated parameters} \usage{ simacf(coef, order, params, alpha = 0.5) } \description{ Construct Autocorrelation Function from Zelig object and simulated parameters } \keyword{internal} Zelig/man/kmenta.Rd0000644000176200001440000000117213754260262013655 0ustar liggesusers\name{kmenta} \alias{kmenta} \title{Simulation Data for model Three-Stage Least Square (threesls) that corresponds to method 3SLS of systemfit} \description{ Dataframe contains 20 annual observations of a supply/demand model with 5 variables. Columns are q=Food consumption per capita, p=Ratio of food price to general consumer prices, d=Disposable income in contstant dollars, f=Ratio of preceding year's prices received by farmers to general consumer prices, a=Time index. } \usage{data(kmenta)} \format{ A table containing 5 variables ("q", "p", "d", "f","a") and 20 observations. } \keyword{datasets} Zelig/man/bivariate.Rd0000644000176200001440000000106313754260262014343 0ustar liggesusers\name{bivariate} \alias{bivariate} \title{Sample data for bivariate probit regression} \description{ Sample data for the bivariate probit regression. } \usage{data(bivariate)} \format{A table containing 6 variables ("y1", "y2", "x1", "x2", "x3", and "x4") and 78 observations.} \source{This is a cleaned and relabelled version of the sanction data set, available in Zelig.} \references{ Martin, Lisa (1992). \emph{Coercive Cooperation: Explaining Multilateral Economic Sanctions}, Princeton: Princeton University Press. } \keyword{datasets} Zelig/man/mexico.Rd0000644000176200001440000000116513754260262013664 0ustar liggesusers\name{mexico} \alias{mexico} \title{Voting Data from the 1988 Mexican Presidental Election} \description{ This dataset contains voting data for the 1988 Mexican presidential election. } \usage{data(mexico)} \format{A table containing 33 variables and 1,359 observations.} \source{ICPSR} \references{ King, Gary, Michael Tomz and Jason Wittenberg (2000). ``Making the Most of Statistical Analyses: Improving Interpretation and Presentation,'' \emph{American Journal of Political Science}, vol. 44, pp. 341-355. King, Tomz and Wittenberg. ICPSR Publication Related Archive, 1255. } \keyword{datasets} Zelig/man/friendship.Rd0000644000176200001440000000144413754260262014533 0ustar liggesusers\name{friendship} \alias{friendship} \title{Simulated Example of Schoolchildren Friendship Network} \description{ This data set contains six sociomatrices of simulated data on friendship ties among schoolchildren.} \usage{data(friendship)} \format{ Each variable in the dataset is a 15 by 15 matrix representing some form of social network tie held by the fictitious children. The matrices are labeled "friends", "advice", "prestige", "authority", "perpower" and "per". The sociomatrices were combined into the friendship dataset using the format.network.data function from the netglm package by Skyler Cranmer as shown in the example. } \source{fictitious} \examples{ \dontrun{ friendship <- format.network.data(friends, advice, prestige, authority, perpower, per) }} \keyword{datasets} Zelig/man/is_zelig.Rd0000644000176200001440000000053413754260262014204 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/assertions.R \name{is_zelig} \alias{is_zelig} \title{Check if is a zelig object} \usage{ is_zelig(x, fail = TRUE) } \arguments{ \item{x}{an object} \item{fail}{logical whether to return an error if x is not a Zelig object.} } \description{ Check if is a zelig object } Zelig/man/newpainters.Rd0000644000176200001440000000222113754260262014731 0ustar liggesusers\name{newpainters} \alias{newpainters} \title{The Discretized Painter's Data of de Piles} \description{ The original painters data contain the subjective assessment, on a 0 to 20 integer scale, of 54 classical painters. The newpainters data discretizes the subjective assessment by quartiles with thresholds 25\%, 50\%, 75\%. The painters were assessed on four characteristics: composition, drawing, colour and expression. The data is due to the Eighteenth century art critic, de Piles. } \usage{data(newpainters)} \format{A table containing 5 variables ("Composition", "Drawing", "Colour", "Expression", and "School") and 54 observations.} \source{ A. J. Weekes (1986).``A Genstat Primer''. Edward Arnold. M. Davenport and G. Studdert-Kennedy (1972). ``The statistical analysis of aesthetic judgement: an exploration.'' \emph{Applied Statistics}, vol. 21, pp. 324--333. I. T. Jolliffe (1986) ``Principal Component Analysis.'' Springer. } \references{ Venables, W. N. and Ripley, B. D. (2002) ``Modern Applied Statistics with S,'' Fourth edition. Springer. } \keyword{datasets} Zelig/man/zelig_setx_to_df.Rd0000644000176200001440000000372613754260262015735 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/interface.R \name{zelig_setx_to_df} \alias{zelig_setx_to_df} \title{Extracted fitted values from a Zelig object with \code{setx} values} \usage{ zelig_setx_to_df(obj) } \arguments{ \item{obj}{a zelig object with simulated quantities of interest} } \description{ Extracted fitted values from a Zelig object with \code{setx} values } \details{ Fitted (\code{setx}) values in a tidy data formatted \code{data.frame}. This was designed to enable the WhatIf package's \code{whatif} function to extract "counterfactuals". } \examples{ #### QIs without first difference or range, from covariates fitted at ## central tendencies z.1 <- zelig(Petal.Width ~ Petal.Length + Species, data = iris, model = "ls") z.1 <- setx(z.1) zelig_setx_to_df(z.1) #### QIs for first differences z.2 <- zelig(Petal.Width ~ Petal.Length + Species, data = iris, model = "ls") z.2 <- setx(z.2, Petal.Length = 2) z.2 <- setx1(z.2, Petal.Length = 4.4) zelig_setx_to_df(z.2) #### QIs for first differences, estimated by Species z.3 <- zelig(Petal.Width ~ Petal.Length, by = "Species", data = iris, model = "ls") z.3 <- setx(z.3, Petal.Length = 2) z.3 <- setx1(z.3, Petal.Length = 4.4) zelig_setx_to_df(z.3) #### QIs for a range of fitted values z.4 <- zelig(Petal.Width ~ Petal.Length + Species, data = iris, model = "ls") z.4 <- setx(z.4, Petal.Length = 2:4) zelig_setx_to_df(z.4) #### QIs for a range of fitted values, estimated by Species z.5 <- zelig(Petal.Width ~ Petal.Length, by = "Species", data = iris, model = "ls") z.5 <- setx(z.5, Petal.Length = 2:4) zelig_setx_to_df(z.5) #### QIs for two ranges of fitted values z.6 <- zelig(Petal.Width ~ Petal.Length + Species, data = iris, model = "ls") z.6 <- setx(z.6, Petal.Length = 2:4, Species = "setosa") z.6 <- setx1(z.6, Petal.Length = 2:4, Species = "virginica") zelig_setx_to_df(z.6) } \author{ Christopher Gandrud } Zelig/man/Zelig-factor-bayes-class.Rd0000644000176200001440000001622313763512134017131 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-factor-bayes.R \docType{class} \name{Zelig-factor-bayes-class} \alias{Zelig-factor-bayes-class} \alias{zfactorbayes} \title{Bayesian Factor Analysis} \arguments{ \item{formula}{a symbolic representation of the model to be estimated, in the form \code{~ Y1 + Y2 + Y3}, where Y1, Y2, and Y3 are variables of interest in factor analysis (manifest variables), assumed to be normally distributed. The model requires a minimum of three manifest variables contained in the same dataset. The \code{+} symbol means ``inclusion'' not ``addition.''} \item{factors}{number of the factors to be fitted (defaults to 2).} \item{model}{the name of a statistical model to estimate. For a list of other supported models and their documentation see: \url{http://docs.zeligproject.org/articles/}.} \item{data}{the name of a data frame containing the variables referenced in the formula or a list of multiply imputed data frames each having the same variable names and row numbers (created by \code{Amelia} or \code{\link{to_zelig_mi}}).} \item{...}{additional arguments passed to \code{zelig}, relevant for the model to be estimated.} \item{by}{a factor variable contained in \code{data}. If supplied, \code{zelig} will subset the data frame based on the levels in the \code{by} variable, and estimate a model for each subset. This can save a considerable amount of effort. You may also use \code{by} to run models using MatchIt subclasses.} \item{cite}{If is set to 'TRUE' (default), the model citation will be printed to the console.} } \value{ Depending on the class of model selected, \code{zelig} will return an object with elements including \code{coefficients}, \code{residuals}, and \code{formula} which may be summarized using \code{summary(z.out)} or individually extracted using, for example, \code{coef(z.out)}. See \url{http://docs.zeligproject.org/articles/getters.html} for a list of functions to extract model components. You can also extract whole fitted model objects using \code{\link{from_zelig_model}}. } \description{ Bayesian Factor Analysis } \details{ In addition, \code{zelig()} accepts the following additional arguments for model specification: \itemize{ \item \code{lambda.constraints}: list containing the equality or inequality constraints on the factor loadings. Choose from one of the following forms: \item \code{varname = list()}: by default, no constraints are imposed. \item \code{varname = list(d, c)}: constrains the dth loading for the variable named varname to be equal to c. \item \code{varname = list(d, +)}: constrains the dth loading for the variable named varname to be positive; \item \code{varname = list(d, -)}: constrains the dth loading for the variable named varname to be negative. \item \code{std.var}: defaults to \code{FALSE} (manifest variables are rescaled to zero mean, but retain observed variance). If \code{TRUE}, the manifest variables are rescaled to be mean zero and unit variance. } In addition, \code{zelig()} accepts the following additional inputs for \code{bayes.factor}: \itemize{ \item \code{burnin}: number of the initial MCMC iterations to be discarded (defaults to 1,000). \item \code{mcmc}: number of the MCMC iterations after burnin (defaults to 20,000). \item \code{thin}: thinning interval for the Markov chain. Only every thin-th draw from the Markov chain is kept. The value of mcmc must be divisible by this value. The default value is 1. \item \code{verbose}: defaults to FALSE. If TRUE, the progress of the sampler (every 10%10%) is printed to the screen. \item \code{seed}: seed for the random number generator. The default is NA which corresponds to a random seed 12345. \item \code{Lambda.start}: starting values of the factor loading matrix \eqn{\Lambda}, either a scalar (all unconstrained loadings are set to that value), or a matrix with compatible dimensions. The default is NA, where the start value are set to be 0 for unconstrained factor loadings, and 0.5 or - 0.5 for constrained factor loadings (depending on the nature of the constraints). \item \code{Psi.start}: starting values for the uniquenesses, either a scalar (the starting values for all diagonal elements of \eqn{\Psi} are set to be this value), or a vector with length equal to the number of manifest variables. In the latter case, the starting values of the diagonal elements of \eqn{\Psi} take the values of Psi.start. The default value is NA where the starting values of the all the uniquenesses are set to be 0.5. \item \code{store.lambda}: defaults to TRUE, which stores the posterior draws of the factor loadings. \item \code{store.scores}: defaults to FALSE. If TRUE, stores the posterior draws of the factor scores. (Storing factor scores may take large amount of memory for a large number of draws or observations.) } The model also accepts the following additional arguments to specify prior parameters: \itemize{ \item \code{l0}: mean of the Normal prior for the factor loadings, either a scalar or a matrix with the same dimensions as \eqn{\Lambda}. If a scalar value, that value will be the prior mean for all the factor loadings. Defaults to 0. \item \code{L0}: precision parameter of the Normal prior for the factor loadings, either a scalar or a matrix with the same dimensions as \eqn{\Lambda}. If \code{L0} takes a scalar value, then the precision matrix will be a diagonal matrix with the diagonal elements set to that value. The default value is 0, which leads to an improper prior. \item \code{a0}: the shape parameter of the Inverse Gamma prior for the uniquenesses is \code{a0}/2. It can take a scalar value or a vector. The default value is 0.001. \item \code{b0}: the scale parameter of the Inverse Gamma prior for the uniquenesses is \code{b0}/2. It can take a scalar value or a vector. The default value is 0.001. } Additional parameters avaialable to this model include: \itemize{ \item \code{weights}: vector of weight values or a name of a variable in the dataset by which to weight the model. For more information see: \url{http://docs.zeligproject.org/articles/weights.html}. } } \section{Methods}{ \describe{ \item{\code{zelig(formula, data, model = NULL, ..., weights = NULL, by, bootstrap = FALSE)}}{The zelig function estimates a variety of statistical models} }} \examples{ \dontrun{ data(swiss) names(swiss) <- c("Fert", "Agr", "Exam", "Educ", "Cath", "InfMort") z.out <- zelig(~ Agr + Exam + Educ + Cath + InfMort, model = "factor.bayes", data = swiss, factors = 2, verbose = FALSE, a0 = 1, b0 = 0.15, burnin = 500, mcmc = 5000) z.out$geweke.diag() z.out <- zelig(~ Agr + Exam + Educ + Cath + InfMort, model = "factor.bayes", data = swiss, factors = 2, lambda.constraints = list(Exam = list(1,"+"), Exam = list(2,"-"), Educ = c(2, 0), InfMort = c(1, 0)), verbose = FALSE, a0 = 1, b0 = 0.15, burnin = 500, mcmc = 5000) z.out$geweke.diag() z.out$heidel.diag() z.out$raftery.diag() summary(z.out) } } \seealso{ Vignette: \url{http://docs.zeligproject.org/articles/zelig_factorbayes.html} } Zelig/man/from_zelig_model.Rd0000644000176200001440000000144113754260262015712 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/interface.R \name{from_zelig_model} \alias{from_zelig_model} \title{Extract the original fitted model object from a \code{zelig} estimation} \usage{ from_zelig_model(obj) } \arguments{ \item{obj}{a zelig object with an estimated model} } \description{ Extract the original fitted model object from a \code{zelig} estimation } \details{ Extracts the original fitted model object from a \code{zelig} estimation. This can be useful for passing output to non-Zelig post-estimation functions and packages such as texreg and stargazer for creating well-formatted presentation document tables. } \examples{ z5 <- zls$new() z5$zelig(Fertility ~ Education, data = swiss) from_zelig_model(z5) } \author{ Christopher Gandrud } Zelig/man/Zelig-poisson-class.Rd0000644000176200001440000000701413754260262016244 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-poisson.R \docType{class} \name{Zelig-poisson-class} \alias{Zelig-poisson-class} \alias{zpoisson} \title{Poisson Regression for Event Count Dependent Variables} \arguments{ \item{formula}{a symbolic representation of the model to be estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the dependent variable and \code{x1} and \code{x2} are the explanatory variables, and \code{y}, \code{x1}, and \code{x2} are contained in the same dataset. (You may include more than two explanatory variables, of course.) The \code{+} symbol means ``inclusion'' not ``addition.'' You may also include interaction terms and main effects in the form \code{x1*x2} without computing them in prior steps; \code{I(x1*x2)} to include only the interaction term and exclude the main effects; and quadratic terms in the form \code{I(x1^2)}.} \item{model}{the name of a statistical model to estimate. For a list of other supported models and their documentation see: \url{http://docs.zeligproject.org/articles/}.} \item{data}{the name of a data frame containing the variables referenced in the formula or a list of multiply imputed data frames each having the same variable names and row numbers (created by \code{Amelia} or \code{\link{to_zelig_mi}}).} \item{...}{additional arguments passed to \code{zelig}, relevant for the model to be estimated.} \item{by}{a factor variable contained in \code{data}. If supplied, \code{zelig} will subset the data frame based on the levels in the \code{by} variable, and estimate a model for each subset. This can save a considerable amount of effort. You may also use \code{by} to run models using MatchIt subclasses.} \item{cite}{If is set to 'TRUE' (default), the model citation will be printed to the console.} \item{id:}{where id is a variable which identifies the clusters. The data should be sorted by id and should be ordered within each cluster when appropriate} \item{corstr:}{character string specifying the correlation structure: "independence", "exchangeable", "ar1", "unstructured" and "userdefined"} \item{geeglm:}{See geeglm in package geepack for other function arguments} } \value{ Depending on the class of model selected, \code{zelig} will return an object with elements including \code{coefficients}, \code{residuals}, and \code{formula} which may be summarized using \code{summary(z.out)} or individually extracted using, for example, \code{coef(z.out)}. See \url{http://docs.zeligproject.org/articles/getters.html} for a list of functions to extract model components. You can also extract whole fitted model objects using \code{\link{from_zelig_model}}. } \description{ Poisson Regression for Event Count Dependent Variables } \details{ Additional parameters avaialable to this model include: \itemize{ \item \code{weights}: vector of weight values or a name of a variable in the dataset by which to weight the model. For more information see: \url{http://docs.zeligproject.org/articles/weights.html}. \item \code{bootstrap}: logical or numeric. If \code{FALSE} don't use bootstraps to robustly estimate uncertainty around model parameters due to sampling error. If an integer is supplied, the number of boostraps to run. For more information see: \url{http://docs.zeligproject.org/articles/bootstraps.html}. } } \examples{ library(Zelig) data(sanction) z.out <- zelig(num ~ target + coop, model = "poisson", data = sanction) summary(z.out) } \seealso{ Vignette: \url{http://docs.zeligproject.org/articles/zelig_poisson.html} } Zelig/man/Zelig-normal-survey-class.Rd0000644000176200001440000000637413754260262017405 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-normal-survey.R \docType{class} \name{Zelig-normal-survey-class} \alias{Zelig-normal-survey-class} \alias{znormalsurvey} \title{Normal Regression for Continuous Dependent Variables with Survey Weights} \arguments{ \item{formula}{a symbolic representation of the model to be estimated, in the form \code{y \~\, x1 + x2}, where \code{y} is the dependent variable and \code{x1} and \code{x2} are the explanatory variables, and \code{y}, \code{x1}, and \code{x2} are contained in the same dataset. (You may include more than two explanatory variables, of course.) The \code{+} symbol means ``inclusion'' not ``addition.'' You may also include interaction terms and main effects in the form \code{x1*x2} without computing them in prior steps; \code{I(x1*x2)} to include only the interaction term and exclude the main effects; and quadratic terms in the form \code{I(x1^2)}.} \item{model}{the name of a statistical model to estimate. For a list of other supported models and their documentation see: \url{http://docs.zeligproject.org/articles/}.} \item{data}{the name of a data frame containing the variables referenced in the formula or a list of multiply imputed data frames each having the same variable names and row numbers (created by \code{Amelia} or \code{\link{to_zelig_mi}}).} \item{...}{additional arguments passed to \code{zelig}, relevant for the model to be estimated.} \item{by}{a factor variable contained in \code{data}. If supplied, \code{zelig} will subset the data frame based on the levels in the \code{by} variable, and estimate a model for each subset. This can save a considerable amount of effort. You may also use \code{by} to run models using MatchIt subclasses.} \item{cite}{If is set to 'TRUE' (default), the model citation will be printed to the console.} } \value{ Depending on the class of model selected, \code{zelig} will return an object with elements including \code{coefficients}, \code{residuals}, and \code{formula} which may be summarized using \code{summary(z.out)} or individually extracted using, for example, \code{coef(z.out)}. See \url{http://docs.zeligproject.org/articles/getters.html} for a list of functions to extract model components. You can also extract whole fitted model objects using \code{\link{from_zelig_model}}. } \description{ Normal Regression for Continuous Dependent Variables with Survey Weights } \details{ Additional parameters avaialable to this model include: \itemize{ \item \code{weights}: vector of weight values or a name of a variable in the dataset by which to weight the model. For more information see: \url{http://docs.zeligproject.org/articles/weights.html}. \item \code{bootstrap}: logical or numeric. If \code{FALSE} don't use bootstraps to robustly estimate uncertainty around model parameters due to sampling error. If an integer is supplied, the number of boostraps to run. For more information see: \url{http://docs.zeligproject.org/articles/bootstraps.html}. } } \examples{ library(Zelig) data(api, package = "survey") z.out1 <- zelig(api00 ~ meals + yr.rnd, model = "normal.survey",eights = ~pw, data = apistrat) summary(z.out1) } \seealso{ Vignette: \url{http://docs.zeligproject.org/articles/zelig_normalsurvey.html} } Zelig/man/Zelig.url.Rd0000644000176200001440000000026413754260262014252 0ustar liggesusers\name{Zelig.url} \alias{Zelig.url} \title{Table of links for Zelig} \description{ Table of links for \code{help.zelig} for the core Zelig package. } \keyword{datasets} Zelig/man/expand_grid_setrange.Rd0000644000176200001440000000057113754260262016554 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{expand_grid_setrange} \alias{expand_grid_setrange} \title{Convenience function for setrange and setrange1} \usage{ expand_grid_setrange(x) } \arguments{ \item{x}{data passed to setrange or setrange1} } \description{ Convenience function for setrange and setrange1 } \keyword{internal} Zelig/man/to_zelig_mi.Rd0000644000176200001440000000201313754260262014672 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{to_zelig_mi} \alias{to_zelig_mi} \title{Bundle Multiply Imputed Data Sets into an Object for Zelig} \usage{ to_zelig_mi(...) } \arguments{ \item{...}{a set of \code{data.frame}'s or a single list of \code{data.frame}'s} } \value{ an \code{mi} object composed of a list of data frames. } \description{ This object prepares multiply imputed data sets so they can be used by \code{zelig}. } \note{ This function creates a list of \code{data.frame} objects, which resembles the storage of imputed data sets in the \code{amelia} object. } \examples{ # create datasets n <- 100 x1 <- runif(n) x2 <- runif(n) y <- rnorm(n) data.1 <- data.frame(y = y, x = x1) data.2 <- data.frame(y = y, x = x2) # merge datasets into one object as if imputed datasets mi.out <- to_zelig_mi(data.1, data.2) # pass object in place of data argument z.out <- zelig(y ~ x, model = "ls", data = mi.out) } \author{ Matt Owen, James Honaker, and Christopher Gandrud } Zelig/man/Zelig-binchoice-gee-class.Rd0000644000176200001440000000070213754260262017230 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-binchoice-gee.R \docType{class} \name{Zelig-binchoice-gee-class} \alias{Zelig-binchoice-gee-class} \alias{zbinchoicegee} \title{Object for Binary Choice outcomes in Generalized Estimating Equations for inheritance across models in Zelig} \description{ Object for Binary Choice outcomes in Generalized Estimating Equations for inheritance across models in Zelig } Zelig/man/Zelig-normal-class.Rd0000644000176200001440000000747413763512134016052 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-normal.R \docType{class} \name{Zelig-normal-class} \alias{Zelig-normal-class} \alias{znormal} \title{Normal Regression for Continuous Dependent Variables} \arguments{ \item{model}{the name of a statistical model to estimate. For a list of other supported models and their documentation see: \url{http://docs.zeligproject.org/articles/}.} \item{data}{the name of a data frame containing the variables referenced in the formula or a list of multiply imputed data frames each having the same variable names and row numbers (created by \code{Amelia} or \code{\link{to_zelig_mi}}).} \item{...}{additional arguments passed to \code{zelig}, relevant for the model to be estimated.} \item{by}{a factor variable contained in \code{data}. If supplied, \code{zelig} will subset the data frame based on the levels in the \code{by} variable, and estimate a model for each subset. This can save a considerable amount of effort. You may also use \code{by} to run models using MatchIt subclasses.} \item{cite}{If is set to 'TRUE' (default), the model citation will be printed to the console.} \item{below}{(defaults to 0) The point at which the dependent variable is censored from below. If any values in the dependent variable are observed to be less than the censoring point, it is assumed that that particular observation is censored from below at the observed value. (See for a Bayesian implementation that supports both left and right censoring.)} \item{robust}{defaults to FALSE. If TRUE, zelig() computes robust standard errors based on sandwich estimators (see and ) and the options selected in cluster.} \item{if}{robust = TRUE, you may select a variable to define groups of correlated observations. Let x3 be a variable that consists of either discrete numeric values, character strings, or factors that define strata. Then z.out <- zelig(y ~ x1 + x2, robust = TRUE, cluster = "x3", model = "tobit", data = mydata) means that the observations can be correlated within the strata defined by the variable x3, and that robust standard errors should be calculated according to those clusters. If robust = TRUE but cluster is not specified, zelig() assumes that each observation falls into its own cluster.} \item{formula}{a model fitting formula} } \value{ Depending on the class of model selected, \code{zelig} will return an object with elements including \code{coefficients}, \code{residuals}, and \code{formula} which may be summarized using \code{summary(z.out)} or individually extracted using, for example, \code{coef(z.out)}. See \url{http://docs.zeligproject.org/articles/getters.html} for a list of functions to extract model components. You can also extract whole fitted model objects using \code{\link{from_zelig_model}}. } \description{ Normal Regression for Continuous Dependent Variables } \details{ Additional parameters avaialable to this model include: \itemize{ \item \code{weights}: vector of weight values or a name of a variable in the dataset by which to weight the model. For more information see: \url{http://docs.zeligproject.org/articles/weights.html}. \item \code{bootstrap}: logical or numeric. If \code{FALSE} don't use bootstraps to robustly estimate uncertainty around model parameters due to sampling error. If an integer is supplied, the number of boostraps to run. For more information see: \url{http://docs.zeligproject.org/articles/bootstraps.html}. } } \examples{ data(macro) z.out1 <- zelig(unem ~ gdp + capmob + trade, model = "normal", data = macro) summary(z.out1) x.high <- setx(z.out1, trade = quantile(macro$trade, 0.8)) x.low <- setx(z.out1, trade = quantile(macro$trade, 0.2)) s.out1 <- sim(z.out1, x = x.high, x1 = x.low) summary(s.out1) plot(s.out1) } \seealso{ Vignette: \url{http://docs.zeligproject.org/articles/zelig_normal.html} } Zelig/man/coalition.Rd0000644000176200001440000000212413754260262014355 0ustar liggesusers\name{coalition} \alias{coalition} \title{Coalition Dissolution in Parliamentary Democracies} \description{ This data set contains survival data on government coalitions in parliamentary democracies (Belgium, Canada, Denmark, Finland, France, Iceland, Ireland, Israel, Italy, Netherlands, Norway, Portugal, Spain, Sweden, and the United Kingdom) for the period 1945-1987. For parsimony, country indicator variables are omitted in the sample data. } \usage{data(coalition)} \format{ A table containing 7 variables ("duration", "ciep12", "invest", "fract", "polar", "numst2", "crisis") and 314 observations. For variable descriptions, please refer to King, Alt, Burns and Laver (1990). } \source{ICPSR} \references{ King, Gary, James E. Alt, Nancy Elizabeth Burns and Michael Laver (1990). ``A Unified Model of Cabinet Dissolution in Parliamentary Democracies,'' \emph{American Journal of Political Science}, vol. 34, no. 3, pp. 846-870. Gary King, James E. Alt, Nancy Burns, and Michael Laver. ICPSR Publication Related Archive, 1115. } \keyword{datasets} Zelig/man/stat.Rd0000644000176200001440000000073413754260262013354 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{stat} \alias{stat} \title{Pass Quantities of Interest to Appropriate Summary Function} \usage{ stat(qi, num) } \arguments{ \item{qi}{quantity of interest (e.g., estimated value or predicted value)} \item{num}{number of simulations} } \value{ a formatted qi } \description{ Pass Quantities of Interest to Appropriate Summary Function } \author{ Christine Choirat } \keyword{internal} Zelig/man/turnout.Rd0000644000176200001440000000145313754260262014120 0ustar liggesusers\name{turnout} \alias{turnout} \title{Turnout Data Set from the National Election Survey} \description{ This data set contains individual-level turnout data. It pools several American National Election Surveys conducted during the 1992 presidential election year. Only the first 2,000 observations (from a total of 15,837 observations) are included in the sample data. } \usage{data(turnout)} \format{A table containing 5 variables ("race", "age", "educate", "income", and "vote") and 2,000 observations.} \source{National Election Survey} \references{ King, Gary, Michael Tomz, Jason Wittenberg (2000). ``Making the Most of Statistical Analyses: Improving Interpretation and Presentation,'' \emph{American Journal of Political Science}, vol. 44, pp.341--355. } \keyword{datasets} Zelig/man/is_zeligei.Rd0000644000176200001440000000104313763512134014514 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/assertions.R \name{is_zeligei} \alias{is_zeligei} \title{Check if an object was created with ZeligEI} \usage{ is_zeligei( x, msg = "Function is not relevant for ZeligEI objects.", fail = TRUE ) } \arguments{ \item{x}{a zelig object} \item{msg}{character string with the error message to return if \code{fail = TRUE}.} \item{fail}{logical whether to return an error if \code{x} is not a timeseries.} } \description{ Check if an object was created with ZeligEI } Zelig/man/Zelig-ivreg-class.Rd0000644000176200001440000001317613763512134015672 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-ivreg.R \docType{class} \name{Zelig-ivreg-class} \alias{Zelig-ivreg-class} \alias{zivreg} \title{Instrumental-Variable Regression} \source{ \code{ivreg} is from Christian Kleiber and Achim Zeileis (2008). Applied Econometrics with R. New York: Springer-Verlag. ISBN 978-0-387-77316-2. URL \url{https://CRAN.R-project.org/package=AER} } \arguments{ \item{model}{the name of a statistical model to estimate. For a list of other supported models and their documentation see: \url{http://docs.zeligproject.org/articles/}.} \item{data}{the name of a data frame containing the variables referenced in the formula or a list of multiply imputed data frames each having the same variable names and row numbers (created by \code{Amelia} or \code{\link{to_zelig_mi}}).} \item{by}{a factor variable contained in \code{data}. If supplied, \code{zelig} will subset the data frame based on the levels in the \code{by} variable, and estimate a model for each subset. This can save a considerable amount of effort. You may also use \code{by} to run models using MatchIt subclasses.} \item{cite}{If is set to 'TRUE' (default), the model citation will be printed to the console.} \item{formula}{specification(s) of the regression relationship} \item{instruments}{the instruments. Either \code{instruments} is missing and formula has three parts as in \code{y ~ x1 + x2 | z1 + z2 + z3} (recommended) or formula is \code{y ~ x1 + x2} and instruments is a one-sided formula \code{~ z1 + z2 + z3}. Using \code{instruments} is not recommended with \code{zelig}.} \item{model, x, y}{logicals. If \code{TRUE} the corresponding components of the fit (the model frame, the model matrices , the response) are returned.} \item{...}{further arguments passed to methods. See also \code{\link{zelig}}.} } \value{ Depending on the class of model selected, \code{zelig} will return an object with elements including \code{coefficients}, \code{residuals}, and \code{formula} which may be summarized using \code{summary(z.out)} or individually extracted using, for example, \code{coef(z.out)}. See \url{http://docs.zeligproject.org/articles/getters.html} for a list of functions to extract model components. You can also extract whole fitted model objects using \code{\link{from_zelig_model}}. } \description{ Instrumental-Variable Regression } \details{ Additional parameters avaialable to many models include: \itemize{ \item weights: vector of weight values or a name of a variable in the dataset by which to weight the model. For more information see: \url{http://docs.zeligproject.org/articles/weights.html}. \item bootstrap: logical or numeric. If \code{FALSE} don't use bootstraps to robustly estimate uncertainty around model parameters due to sampling error. If an integer is supplied, the number of boostraps to run. For more information see: \url{http://docs.zeligproject.org/articles/bootstraps.html}. } Regressors and instruments for \code{ivreg} are most easily specified in a formula with two parts on the right-hand side, e.g., \code{y ~ x1 + x2 | z1 + z2 + z3}, where \code{x1} and \code{x2} are the regressors and \code{z1}, \code{z2}, and \code{z3} are the instruments. Note that exogenous regressors have to be included as instruments for themselves. For example, if there is one exogenous regressor \code{ex} and one endogenous regressor \code{en} with instrument \verb{in}, the appropriate formula would be \verb{y ~ ex + en | ex + in}. Equivalently, this can be specified as \verb{y ~ ex + en | . - en + in}, i.e., by providing an update formula with a \code{.} in the second part of the formula. The latter is typically more convenient, if there is a large number of exogenous regressors. } \section{Methods}{ \describe{ \item{\code{zelig(formula, data, model = NULL, ..., weights = NULL, by, bootstrap = FALSE)}}{The zelig function estimates a variety of statistical models} }} \examples{ library(Zelig) library(dplyr) # for the pipe operator \%>\% # load and transform data data("CigarettesSW") CigarettesSW$rprice <- with(CigarettesSW, price/cpi) CigarettesSW$rincome <- with(CigarettesSW, income/population/cpi) CigarettesSW$tdiff <- with(CigarettesSW, (taxs - tax)/cpi) # log second stage independent variables, as logging internally for ivreg is # not currently supported CigarettesSW$log_rprice <- log(CigarettesSW$rprice) CigarettesSW$log_rincome <- log(CigarettesSW$rincome) z.out1 <- zelig(log(packs) ~ log_rprice + log_rincome | log_rincome + tdiff + I(tax/cpi),data = CigarettesSW, subset = year == "1995",model = "ivreg") summary(z.out1) library(Zelig) library(AER) # for sandwich vcov library(dplyr) # for the pipe operator \%>\% # load and transform data data("CigarettesSW") CigarettesSW$rprice <- with(CigarettesSW, price/cpi) CigarettesSW$rincome <- with(CigarettesSW, income/population/cpi) CigarettesSW$tdiff <- with(CigarettesSW, (taxs - tax)/cpi) # log second stage independent variables, as logging internally for ivreg is # not currently supported CigarettesSW$log_rprice <- log(CigarettesSW$rprice) CigarettesSW$log_rincome <- log(CigarettesSW$rincome) # estimate model z.out1 <- zelig(log(packs) ~ log_rprice + log_rincome | log_rincome + tdiff + I(tax/cpi), data = CigarettesSW, model = "ivreg") summary(z.out1) } \seealso{ Vignette: \url{http://docs.zeligproject.org/articles/zelig_ivreg.html} Fit instrumental-variable regression by two-stage least squares. This is equivalent to direct instrumental-variables estimation when the number of instruments is equal to the number of predictors. \code{\link{zelig}}, Greene, W. H. (1993) \emph{Econometric Analysis}, 2nd ed., Macmillan. } Zelig/man/is_simsx1.Rd0000644000176200001440000000071613754260262014320 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/assertions.R \name{is_simsx1} \alias{is_simsx1} \title{Check if simulations for individual values for x1 are present in sim.out} \usage{ is_simsx1(x, fail = TRUE) } \arguments{ \item{x}{a sim.out method} \item{fail}{logical whether to return an error if simulation range is not present.} } \description{ Check if simulations for individual values for x1 are present in sim.out } Zelig/man/Zelig-exp-class.Rd0000644000176200001440000001035313763512134015344 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-exp.R \docType{class} \name{Zelig-exp-class} \alias{Zelig-exp-class} \alias{zexp} \title{Exponential Regression for Duration Dependent Variables} \arguments{ \item{formula}{a symbolic representation of the model to be estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the dependent variable and \code{x1} and \code{x2} are the explanatory variables, and \code{y}, \code{x1}, and \code{x2} are contained in the same dataset. (You may include more than two explanatory variables, of course.) The \code{+} symbol means ``inclusion'' not ``addition.'' You may also include interaction terms and main effects in the form \code{x1*x2} without computing them in prior steps; \code{I(x1*x2)} to include only the interaction term and exclude the main effects; and quadratic terms in the form \code{I(x1^2)}.} \item{model}{the name of a statistical model to estimate. For a list of supported models and their documentation see: \url{http://docs.zeligproject.org/articles/}.} \item{data}{the name of a data frame containing the variables referenced in the formula or a list of multiply imputed data frames each having the same variable names and row numbers (created by \code{Amelia} or \code{\link{to_zelig_mi}}).} \item{...}{additional arguments passed to \code{zelig}, relevant for the model to be estimated.} \item{by}{a factor variable contained in \code{data}. If supplied, \code{zelig} will subset the data frame based on the levels in the \code{by} variable, and estimate a model for each subset. This can save a considerable amount of effort. For example, to run the same model on all fifty states, you could use: \code{z.out <- zelig(y ~ x1 + x2, data = mydata, model = 'ls', by = 'state')} You may also use \code{by} to run models using MatchIt subclasses.} \item{cite}{If is set to 'TRUE' (default), the model citation will be printed to the console.} \item{robust}{defaults to FALSE. If TRUE, zelig() computes robust standard errors based on sandwich estimators and the options selected in cluster.} \item{if}{robust = TRUE, you may select a variable to define groups of correlated observations. Let x3 be a variable that consists of either discrete numeric values, character strings, or factors that define strata. Then z.out <- zelig(y ~ x1 + x2, robust = TRUE, cluster = "x3",model = "exp", data = mydata) means that the observations can be correlated within the strata defined by the variable x3, and that robust standard errors should be calculated according to those clusters. If robust = TRUE but cluster is not specified, zelig() assumes that each observation falls into its own cluster.} } \value{ Depending on the class of model selected, \code{zelig} will return an object with elements including \code{coefficients}, \code{residuals}, and \code{formula} which may be summarized using \code{summary(z.out)} or individually extracted using, for example, \code{coef(z.out)}. See \url{http://docs.zeligproject.org/articles/getters.html} for a list of functions to extract model components. You can also extract whole fitted model objects using \code{\link{from_zelig_model}}. } \description{ Exponential Regression for Duration Dependent Variables } \details{ Additional parameters avaialable to this model include: \itemize{ \item \code{weights}: vector of weight values or a name of a variable in the dataset by which to weight the model. For more information see: \url{http://docs.zeligproject.org/articles/weights.html}. \item \code{bootstrap}: logical or numeric. If \code{FALSE} don't use bootstraps to robustly estimate uncertainty around model parameters due to sampling error. If an integer is supplied, the number of boostraps to run. For more information see: \url{http://docs.zeligproject.org/articles/bootstraps.html}. } } \section{Methods}{ \describe{ \item{\code{zelig(formula, data, model = NULL, ..., weights = NULL, by, bootstrap = FALSE)}}{The zelig function estimates a variety of statistical models} }} \examples{ library(Zelig) data(coalition) library(survival) z.out <- zelig(Surv(duration, ciep12) ~ fract + numst2, model = "exp", data = coalition) summary(z.out) } \seealso{ Vignette: \url{http://docs.zeligproject.org/articles/zelig_exp.html} } Zelig/man/se_pull.Rd0000644000176200001440000000051113754260262014035 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{se_pull} \alias{se_pull} \title{Extract standard errors from a fitted model object} \usage{ se_pull(x) } \arguments{ \item{x}{a fitted Zelig object} } \description{ Extract standard errors from a fitted model object } \keyword{internal} Zelig/man/Zelig-gamma-gee-class.Rd0000644000176200001440000000763213754260262016400 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-gamma-gee.R \docType{class} \name{Zelig-gamma-gee-class} \alias{Zelig-gamma-gee-class} \alias{zgammagee} \title{Generalized Estimating Equation for Gamma Regression} \arguments{ \item{formula}{a symbolic representation of the model to be estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the dependent variable and \code{x1} and \code{x2} are the explanatory variables, and \code{y}, \code{x1}, and \code{x2} are contained in the same dataset. (You may include more than two explanatory variables, of course.) The \code{+} symbol means ``inclusion'' not ``addition.'' You may also include interaction terms and main effects in the form \code{x1*x2} without computing them in prior steps; \code{I(x1*x2)} to include only the interaction term and exclude the main effects; and quadratic terms in the form \code{I(x1^2)}.} \item{model}{the name of a statistical model to estimate. For a list of other supported models and their documentation see: \url{http://docs.zeligproject.org/articles/}.} \item{data}{the name of a data frame containing the variables referenced in the formula or a list of multiply imputed data frames each having the same variable names and row numbers (created by \code{Amelia} or \code{\link{to_zelig_mi}}).} \item{...}{additional arguments passed to \code{zelig}, relevant for the model to be estimated.} \item{by}{a factor variable contained in \code{data}. If supplied, \code{zelig} will subset the data frame based on the levels in the \code{by} variable, and estimate a model for each subset. This can save a considerable amount of effort. You may also use \code{by} to run models using MatchIt subclasses.} \item{cite}{If is set to 'TRUE' (default), the model citation will be printed to the console.} \item{corstr:character}{string specifying the correlation structure: "independence", "exchangeable", "ar1", "unstructured" and "userdefined"} \item{See}{geeglm in package geepack for other function arguments.} \item{id:}{where id is a variable which identifies the clusters. The data should be sorted by id and should be ordered within each cluster when appropriate} \item{corstr:}{character string specifying the correlation structure: "independence", "exchangeable", "ar1", "unstructured" and "userdefined"} \item{geeglm:}{See geeglm in package geepack for other function arguments} } \value{ Depending on the class of model selected, \code{zelig} will return an object with elements including \code{coefficients}, \code{residuals}, and \code{formula} which may be summarized using \code{summary(z.out)} or individually extracted using, for example, \code{coef(z.out)}. See \url{http://docs.zeligproject.org/articles/getters.html} for a list of functions to extract model components. You can also extract whole fitted model objects using \code{\link{from_zelig_model}}. } \description{ Generalized Estimating Equation for Gamma Regression } \details{ Additional parameters avaialable to this model include: \itemize{ \item \code{weights}: vector of weight values or a name of a variable in the dataset by which to weight the model. For more information see: \url{http://docs.zeligproject.org/articles/weights.html}. \item \code{bootstrap}: logical or numeric. If \code{FALSE} don't use bootstraps to robustly estimate uncertainty around model parameters due to sampling error. If an integer is supplied, the number of boostraps to run. For more information see: \url{http://docs.zeligproject.org/articles/bootstraps.html}. } } \examples{ library(Zelig) data(coalition) coalition$cluster <- c(rep(c(1:62), 5),rep(c(63), 4)) sorted.coalition <- coalition[order(coalition$cluster),] z.out <- zelig(duration ~ fract + numst2, model = "gamma.gee",id = "cluster", data = sorted.coalition,corstr = "exchangeable") summary(z.out) } \seealso{ Vignette: \url{http://docs.zeligproject.org/articles/zelig_gammagee.html} } Zelig/man/cluster.formula.Rd0000644000176200001440000000071313754260262015523 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{cluster.formula} \alias{cluster.formula} \title{Generate Formulae that Consider Clustering} \usage{ cluster.formula(formula, cluster) } \arguments{ \item{formula}{a formula object} \item{cluster}{a vector} } \value{ a formula object describing clustering } \description{ This method is used internally by the "Zelig" Package to interpret clustering in GEE models. } Zelig/man/qi.plot.Rd0000644000176200001440000000074313754260262013767 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plots.R \name{qi.plot} \alias{qi.plot} \title{Default Plot Design For Zelig Model QI's} \usage{ qi.plot(obj, ...) } \arguments{ \item{obj}{A reference class zelig5 object} \item{...}{Parameters to be passed to the `truehist' function which is implicitly called for numeric simulations} } \description{ Default Plot Design For Zelig Model QI's } \author{ James Honaker with panel layouts from Matt Owen } Zelig/man/zeligARMAlongrun.Rd0000644000176200001440000000060313763512134015552 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-arima.R \name{zeligARMAlongrun} \alias{zeligARMAlongrun} \title{Calculate the Long Run Exquilibrium for Fixed X} \usage{ zeligARMAlongrun( y.init = NULL, x, simparam, order, sd, tol = NULL, burnin = 20 ) } \description{ Calculate the Long Run Exquilibrium for Fixed X } \keyword{internal} Zelig/man/grunfeld.Rd0000644000176200001440000000122113754260262014177 0ustar liggesusers\name{grunfeld} \alias{grunfeld} \title{Simulation Data for model Seemingly Unrelated Regression (sur) that corresponds to method SUR of systemfit} \description{ Dataframe contains 20 annual observations from 1935 to 1954 of 7 variables for two firms General Electric and Westinghouse. Columns are Year; Ige and Iw = Gross investment for GE and W,respectively; Fge and Fw=Market value of Firm as of begin of the year; Cge and Cw= Capital stock measure as of begin of the year. } \usage{data(grunfeld)} \format{ A table containing 7 variables ("Year", "Ige", "Fge", "Cge","Iw", "Fw","Cw") and 20 observations. } \keyword{datasets} Zelig/man/MatchIt.url.Rd0000644000176200001440000000027713754260262014535 0ustar liggesusers\name{MatchIt.url} \alias{MatchIt.url} \title{Table of links for Zelig} \description{ Table of links for \code{help.zelig} for the companion MatchIt package. } \keyword{datasets} Zelig/man/seatshare.Rd0000644000176200001440000000147713754260262014365 0ustar liggesusers\name{seatshare} \alias{seatshare} \title{Left Party Seat Share in 11 OECD Countries} \description{ This data set contains time-series data of the seat shares in the lower legislative house of left leaning parties over time, as well as the level of unemployment. Data follows the style used in Hibbs (1977).} \usage{data(seatshare)} \format{A table containing N variables ("country","year","unemp","leftseat") and 384 observations split across 11 countries.} \source{OECD data and Mackie and Rose (1991), extended to further years.} \references{ Douglas A. Hibbs. (1977). \emph{Political Parties and Macroeconomic Policy}. American Political Science Review 71(4):1467-1487. Thomas T. Mackie and Richard Rose. (1991). \emph{The International Almanac of Electoral History} Macmillan: London. } \keyword{datasets} Zelig/man/Zelig-survey-class.Rd0000644000176200001440000000101013763512134016073 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-survey.R \docType{class} \name{Zelig-survey-class} \alias{Zelig-survey-class} \alias{zsurvey} \title{Survey models in Zelig for weights for complex sampling designs} \description{ Survey models in Zelig for weights for complex sampling designs } \section{Methods}{ \describe{ \item{\code{zelig(formula, data, model = NULL, ..., weights = NULL, by, bootstrap = FALSE)}}{The zelig function estimates a variety of statistical models} }} Zelig/man/Zelig-probit-class.Rd0000644000176200001440000000532513754260262016054 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-probit.R \docType{class} \name{Zelig-probit-class} \alias{Zelig-probit-class} \alias{zprobit} \title{Probit Regression for Dichotomous Dependent Variables} \arguments{ \item{formula}{a symbolic representation of the model to be estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the dependent variable and \code{x1} and \code{x2} are the explanatory variables, and \code{y}, \code{x1}, and \code{x2} are contained in the same dataset. (You may include more than two explanatory variables, of course.) The \code{+} symbol means ``inclusion'' not ``addition.'' You may also include interaction terms and main effects in the form \code{x1*x2} without computing them in prior steps; \code{I(x1*x2)} to include only the interaction term and exclude the main effects; and quadratic terms in the form \code{I(x1^2)}.} \item{model}{the name of a statistical model to estimate. For a list of other supported models and their documentation see: \url{http://docs.zeligproject.org/articles/}.} \item{data}{the name of a data frame containing the variables referenced in the formula or a list of multiply imputed data frames each having the same variable names and row numbers (created by \code{Amelia} or \code{\link{to_zelig_mi}}).} \item{...}{additional arguments passed to \code{zelig}, relevant for the model to be estimated.} \item{by}{a factor variable contained in \code{data}. If supplied, \code{zelig} will subset the data frame based on the levels in the \code{by} variable, and estimate a model for each subset. This can save a considerable amount of effort. You may also use \code{by} to run models using MatchIt subclasses.} \item{cite}{If is set to 'TRUE' (default), the model citation will be printed to the console.} } \description{ Probit Regression for Dichotomous Dependent Variables } \details{ Additional parameters avaialable to this model include: \itemize{ \item \code{weights}: vector of weight values or a name of a variable in the dataset by which to weight the model. For more information see: \url{http://docs.zeligproject.org/articles/weights.html}. \item \code{bootstrap}: logical or numeric. If \code{FALSE} don't use bootstraps to robustly estimate uncertainty around model parameters due to sampling error. If an integer is supplied, the number of boostraps to run. For more information see: \url{http://docs.zeligproject.org/articles/bootstraps.html}. } } \examples{ data(turnout) z.out <- zelig(vote ~ race + educate, model = "probit", data = turnout) summary(z.out) x.out <- setx(z.out) s.out <- sim(z.out, x = x.out) summary(s.out) plot(s.out) } \seealso{ Vignette: \url{http://docs.zeligproject.org/articles/zelig_probit.html} } Zelig/man/homerun.Rd0000644000176200001440000000234113762522270014051 0ustar liggesusers\name{homerun} \alias{homerun} \docType{data} \title{Sample Data on Home Runs Hit By Mark McGwire and Sammy Sosa in 1998.} \description{ Game-by-game information for the 1998 season for Mark McGwire and Sammy Sosa. Data are a subset of the dataset provided in Simonoff (1998). } \usage{data(homerun)} \format{ A data frame containing 5 variables ("gameno", "month", "homeruns", "playerstatus", "player") and 326 observations. \describe{ \item{\code{gameno}}{an integer variable denoting the game number} \item{\code{month}}{a factor variable taking with levels "March" through "September" denoting the month of the game} \item{\code{homeruns}}{an integer vector denoting the number of homeruns hit in that game for that player} \item{\code{playerstatus}}{an integer vector equal to "0" if the player played in the game, and "1" if they did not.} \item{\code{player}}{an integer vector equal to "0" (McGwire) or "1" (Sosa)} } } \source{\url{http://jse.amstat.org/v6n3/datasets.simonoff.html}} \references{Simonoff, Jeffrey S. 1998. ``Move Over, Roger Maris: Breaking Baseball's Most Famous Record.'' \emph{Journal of Statistics Education} 6(3). Data used are a subset of the data in the article.} \keyword{datasets} Zelig/man/Zelig-bayes-class.Rd0000644000176200001440000000110313763512134015644 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-bayes.R \docType{class} \name{Zelig-bayes-class} \alias{Zelig-bayes-class} \alias{zbayes} \title{Bayes Model object for inheritance across models in Zelig} \description{ Bayes Model object for inheritance across models in Zelig } \section{Methods}{ \describe{ \item{\code{get_coef(nonlist = FALSE)}}{Get estimated model coefficients} \item{\code{zelig(formula, data, model = NULL, ..., weights = NULL, by, bootstrap = FALSE)}}{The zelig function estimates a variety of statistical models} }} Zelig/man/Zelig-logit-class.Rd0000644000176200001440000001102013754260262015660 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-logit.R \docType{class} \name{Zelig-logit-class} \alias{Zelig-logit-class} \alias{zlogit} \title{Logistic Regression for Dichotomous Dependent Variables} \arguments{ \item{formula}{a symbolic representation of the model to be estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the dependent variable and \code{x1} and \code{x2} are the explanatory variables, and \code{y}, \code{x1}, and \code{x2} are contained in the same dataset. (You may include more than two explanatory variables, of course.) The \code{+} symbol means ``inclusion'' not ``addition.'' You may also include interaction terms and main effects in the form \code{x1*x2} without computing them in prior steps; \code{I(x1*x2)} to include only the interaction term and exclude the main effects; and quadratic terms in the form \code{I(x1^2)}.} \item{model}{the name of a statistical model to estimate. For a list of other supported models and their documentation see: \url{http://docs.zeligproject.org/articles/}.} \item{data}{the name of a data frame containing the variables referenced in the formula or a list of multiply imputed data frames each having the same variable names and row numbers (created by \code{Amelia} or \code{\link{to_zelig_mi}}).} \item{...}{additional arguments passed to \code{zelig}, relevant for the model to be estimated.} \item{by}{a factor variable contained in \code{data}. If supplied, \code{zelig} will subset the data frame based on the levels in the \code{by} variable, and estimate a model for each subset. This can save a considerable amount of effort. You may also use \code{by} to run models using MatchIt subclasses.} \item{cite}{If is set to 'TRUE' (default), the model citation will be printed to the console.} \item{below}{(defaults to 0) The point at which the dependent variable is censored from below. If any values in the dependent variable are observed to be less than the censoring point, it is assumed that that particular observation is censored from below at the observed value. (See for a Bayesian implementation that supports both left and right censoring.)} \item{robust}{defaults to FALSE. If TRUE, zelig() computes robust standard errors based on sandwich estimators (see and ) and the options selected in cluster.} \item{if}{robust = TRUE, you may select a variable to define groups of correlated observations. Let x3 be a variable that consists of either discrete numeric values, character strings, or factors that define strata. Then z.out <- zelig(y ~ x1 + x2, robust = TRUE, cluster = "x3", model = "tobit", data = mydata) means that the observations can be correlated within the strata defined by the variable x3, and that robust standard errors should be calculated according to those clusters. If robust = TRUE but cluster is not specified, zelig() assumes that each observation falls into its own cluster.} } \value{ Depending on the class of model selected, \code{zelig} will return an object with elements including \code{coefficients}, \code{residuals}, and \code{formula} which may be summarized using \code{summary(z.out)} or individually extracted using, for example, \code{coef(z.out)}. See \url{http://docs.zeligproject.org/articles/getters.html} for a list of functions to extract model components. You can also extract whole fitted model objects using \code{\link{from_zelig_model}}. } \description{ Logistic Regression for Dichotomous Dependent Variables } \details{ Additional parameters avaialable to this model include: \itemize{ \item weights: vector of weight values or a name of a variable in the dataset by which to weight the model. For more information see: \url{http://docs.zeligproject.org/articles/weights.html}. \item bootstrap: logical or numeric. If \code{FALSE} don't use bootstraps to robustly estimate uncertainty around model parameters due to sampling error. If an integer is supplied, the number of boostraps to run. For more information see: \url{http://docs.zeligproject.org/articles/bootstraps.html}. } } \section{Methods}{ \describe{ \item{\code{show(signif.stars = FALSE, subset = NULL, bagging = FALSE)}}{Display a Zelig object} }} \examples{ library(Zelig) data(turnout) z.out1 <- zelig(vote ~ age + race, model = "logit", data = turnout, cite = FALSE) summary(z.out1) summary(z.out1, odds_ratios = TRUE) x.out1 <- setx(z.out1, age = 36, race = "white") s.out1 <- sim(z.out1, x = x.out1) summary(s.out1) plot(s.out1) } \seealso{ Vignette: \url{http://docs.zeligproject.org/articles/zelig_logit.html} } Zelig/man/voteincome.Rd0000644000176200001440000000301113764455253014547 0ustar liggesusers\name{voteincome} \alias{voteincome} \docType{data} \title{Sample Turnout and Demographic Data from the 2000 Current Population Survey} \description{ This data set contains turnout and demographic data from a sample of respondents to the 2000 Current Population Survey (CPS). The states represented are South Carolina and Arkansas. The data represent only a sample and results from this example should not be used in publication. } \usage{data(voteincome)} \format{ A data frame containing 7 variables ("state", "year", "vote", "income", "education", "age", "female") and 1500 observations. \describe{ \item{\code{state}}{a factor variable with levels equal to "AR" (Arkansas) and "SC" (South Carolina)} \item{\code{year}}{an integer vector} \item{\code{vote}}{an integer vector taking on values "1" (Voted) and "0" (Did Not Vote)} \item{\code{income}}{an integer vector ranging from "4" (Less than \$5000) to "17" (Greater than \$75000) denoting family income. See the CPS codebook for more information on variable coding} \item{\code{education}}{an integer vector ranging from "1" (Less than High School Education) to "4" (More than a College Education). See the CPS codebook for more information on variable coding} \item{\code{age}}{an integer vector ranging from "18" to "85"} \item{\code{female}}{an integer vector taking on values "1" (Female) and "0" (Male)} } } \source{Census Bureau Current Population Survey} \references{\url{https://www.census.gov/programs-surveys/cps.html}} \keyword{datasets} Zelig/man/setx1.Rd0000644000176200001440000000465513754260262013453 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/wrappers.R \name{setx1} \alias{setx1} \title{Setting Explanatory Variable Values for First Differences} \usage{ setx1(obj, fn = NULL, data = NULL, cond = FALSE, ...) } \arguments{ \item{obj}{output object from \code{\link{zelig}}} \item{fn}{a list of functions to apply to the data frame} \item{data}{a new data frame used to set the values of explanatory variables. If \code{data = NULL} (the default), the data frame called in \code{\link{zelig}} is used} \item{cond}{a logical value indicating whether unconditional (default) or conditional (choose \code{cond = TRUE}) prediction should be performed. If you choose \code{cond = TRUE}, \code{setx1} will coerce \code{fn = NULL} and ignore the additional arguments in \code{\dots}. If \code{cond = TRUE} and \code{data = NULL}, \code{setx1} will prompt you for a data frame.} \item{...}{user-defined values of specific variables for overwriting the default values set by the function \code{fn}. For example, adding \code{var1 = mean(data\$var1)} or \code{x1 = 12} explicitly sets the value of \code{x1} to 12. In addition, you may specify one explanatory variable as a range of values, creating one observation for every unique value in the range of values} } \value{ The output is returned in a field to the Zelig object. For unconditional prediction, \code{x.out} is a model matrix based on the specified values for the explanatory variables. For multiple analyses (i.e., when choosing the \code{by} option in \code{\link{zelig}}, \code{setx1} returns the selected values calculated over the entire data frame. If you wish to calculate values over just one subset of the data frame, the 5th subset for example, you may use: \code{x.out <- setx(z.out[[5]])} } \description{ This documentation describes the \code{setx1} Zelig 4 compatibility wrapper function. The wrapper is primarily useful for setting fitted values for creating first differences in piped workflows. } \examples{ library(dplyr) # contains pipe operator \%>\% data(turnout) # plot first differences zelig(Fertility ~ Education, data = swiss, model = 'ls') \%>\% setx(z4, Education = 10) \%>\% setx1(z4, Education = 30) \%>\% sim() \%>\% plot() } \seealso{ The full Zelig manual may be accessed online at \url{http://docs.zeligproject.org/articles/} } \author{ Christopher Gandrud, Matt Owen, Olivia Lau, Kosuke Imai } \keyword{file} Zelig/man/model_lookup_df.Rd0000644000176200001440000000073413763512134015541 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/interface.R \docType{data} \name{model_lookup_df} \alias{model_lookup_df} \title{Instructions for how to convert non-Zelig fitted model objects to Zelig. Used in to_zelig} \format{ An object of class \code{data.frame} with 9 rows and 4 columns. } \usage{ model_lookup_df } \description{ Instructions for how to convert non-Zelig fitted model objects to Zelig. Used in to_zelig } \keyword{datasets} Zelig/man/ATT.Rd0000644000176200001440000000166513754260262013035 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/wrappers.R \name{ATT} \alias{ATT} \title{Compute simulated (sample) average treatment effects on the treated from a Zelig model estimation} \usage{ ATT(object, treatment, treated = 1, num = NULL) } \arguments{ \item{object}{an object of class Zelig} \item{treatment}{character string naming the variable that denotes the treatment and non-treated groups.} \item{treated}{value of \code{treatment} variable indicating treatment} \item{num}{number of simulations to run. Default is 1000.} } \description{ Compute simulated (sample) average treatment effects on the treated from a Zelig model estimation } \examples{ library(dplyr) data(sanction) z.att <- zelig(num ~ target + coop + mil, model = "poisson", data = sanction) \%>\% ATT(treatment = "mil") \%>\% get_qi(qi = "ATT", xvalue = "TE") } \author{ Christopher Gandrud } Zelig/man/Zelig-negbin-class.Rd0000644000176200001440000000653713763512134016023 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-negbinom.R \docType{class} \name{Zelig-negbin-class} \alias{Zelig-negbin-class} \alias{znegbin} \title{Negative Binomial Regression for Event Count Dependent Variables} \arguments{ \item{formula}{a symbolic representation of the model to be estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the dependent variable and \code{x1} and \code{x2} are the explanatory variables, and \code{y}, \code{x1}, and \code{x2} are contained in the same dataset. (You may include more than two explanatory variables, of course.) The \code{+} symbol means ``inclusion'' not ``addition.'' You may also include interaction terms and main effects in the form \code{x1*x2} without computing them in prior steps; \code{I(x1*x2)} to include only the interaction term and exclude the main effects; and quadratic terms in the form \code{I(x1^2)}.} \item{model}{the name of a statistical model to estimate. For a list of other supported models and their documentation see: \url{http://docs.zeligproject.org/articles/}.} \item{data}{the name of a data frame containing the variables referenced in the formula or a list of multiply imputed data frames each having the same variable names and row numbers (created by \code{Amelia} or \code{\link{to_zelig_mi}}).} \item{...}{additional arguments passed to \code{zelig}, relevant for the model to be estimated.} \item{by}{a factor variable contained in \code{data}. If supplied, \code{zelig} will subset the data frame based on the levels in the \code{by} variable, and estimate a model for each subset. This can save a considerable amount of effort. You may also use \code{by} to run models using MatchIt subclasses.} \item{cite}{If is set to 'TRUE' (default), the model citation will be printed to the console.} } \value{ Depending on the class of model selected, \code{zelig} will return an object with elements including \code{coefficients}, \code{residuals}, and \code{formula} which may be summarized using \code{summary(z.out)} or individually extracted using, for example, \code{coef(z.out)}. See \url{http://docs.zeligproject.org/articles/getters.html} for a list of functions to extract model components. You can also extract whole fitted model objects using \code{\link{from_zelig_model}}. } \description{ Negative Binomial Regression for Event Count Dependent Variables } \details{ Additional parameters avaialable to this model include: \itemize{ \item \code{weights}: vector of weight values or a name of a variable in the dataset by which to weight the model. For more information see: \url{http://docs.zeligproject.org/articles/weights.html}. \item \code{bootstrap}: logical or numeric. If \code{FALSE} don't use bootstraps to robustly estimate uncertainty around model parameters due to sampling error. If an integer is supplied, the number of boostraps to run. For more information see: \url{http://docs.zeligproject.org/articles/bootstraps.html}. } } \section{Methods}{ \describe{ \item{\code{zelig(formula, data, model = NULL, ..., weights = NULL, by, bootstrap = FALSE)}}{The zelig function estimates a variety of statistical models} }} \examples{ library(Zelig) data(sanction) z.out <- zelig(num ~ target + coop, model = "negbin", data = sanction) summary(z.out) } \seealso{ Vignette: \url{http://docs.zeligproject.org/articles/zelig_negbin.html} } Zelig/DESCRIPTION0000644000176200001440000000661113765157646013062 0ustar liggesusersPackage: Zelig License: GPL (>= 3) Title: Everyone's Statistical Software Authors@R: c( person("Christine", "Choirat", role = "aut"), person("Christopher", "Gandrud", role = "aut"), person("James", "Honaker", role = "aut"), person("Kosuke", "Imai", role = "aut"), person("Gary", "King", role = "aut"), person("Olivia", "Lau", role = "aut"), person("Robert", "Treacy", email = "zelig.zee@gmail.com", role = c("aut", "cre")), person("IQSS", "Harvard University", role = "cph") ) Description: A framework that brings together an abundance of common statistical models found across packages into a unified interface, and provides a common architecture for estimation and interpretation, as well as bridging functions to absorb increasingly more models into the package. Zelig allows each individual package, for each statistical model, to be accessed by a common uniformly structured call and set of arguments. Moreover, Zelig automates all the surrounding building blocks of a statistical work-flow--procedures and algorithms that may be essential to one user's application but which the original package developer did not use in their own research and might not themselves support. These include bootstrapping, jackknifing, and re-weighting of data. In particular, Zelig automatically generates predicted and simulated quantities of interest (such as relative risk ratios, average treatment effects, first differences and predicted and expected values) to interpret and visualize complex models. URL: https://cran.r-project.org/package=Zelig BugReports: https://github.com/IQSS/Zelig/issues Version: 5.1.7 Date: 2020-12-03 Depends: survival Imports: AER, Amelia, coda, dplyr (>= 0.3.0.2), Formula, geepack, jsonlite, sandwich, MASS, MatchIt, maxLik, MCMCpack, methods, quantreg, survey, VGAM Suggests: ei, eiPack, knitr, networkD3, optmatch, rmarkdown, testthat Collate: 'assertions.R' 'model-zelig.R' 'model-timeseries.R' 'model-ma.R' 'model-ar.R' 'model-arima.R' 'model-weibull.R' 'model-tobit.R' 'model-bayes.R' 'model-tobit-bayes.R' 'model-glm.R' 'model-binchoice.R' 'model-probit.R' 'model-probit-bayes.R' 'model-poisson.R' 'model-poisson-bayes.R' 'model-oprobit-bayes.R' 'model-normal.R' 'model-normal-bayes.R' 'model-mlogit-bayes.R' 'model-gamma.R' 'model-gee.R' 'model-logit.R' 'model-logit-bayes.R' 'model-factor-bayes.R' 'model-poisson-gee.R' 'model-normal-gee.R' 'model-gamma-gee.R' 'model-binchoice-gee.R' 'model-probit-gee.R' 'model-logit-gee.R' 'model-relogit.R' 'model-quantile.R' 'model-lognorm.R' 'model-exp.R' 'model-negbinom.R' 'model-ivreg.R' 'model-ls.R' 'utils.R' 'create-json.R' 'datasets.R' 'interface.R' 'model-survey.R' 'model-binchoice-survey.R' 'model-gamma-survey.R' 'model-logit-survey.R' 'model-normal-survey.R' 'model-poisson-survey.R' 'model-probit-survey.R' 'plots.R' 'wrappers.R' RoxygenNote: 7.1.1 NeedsCompilation: no Packaged: 2020-12-11 19:30:26 UTC; roberttreacy Author: Christine Choirat [aut], Christopher Gandrud [aut], James Honaker [aut], Kosuke Imai [aut], Gary King [aut], Olivia Lau [aut], Robert Treacy [aut, cre], IQSS Harvard University [cph] Maintainer: Robert Treacy Repository: CRAN Date/Publication: 2020-12-12 15:20:06 UTC Zelig/tests/0000755000176200001440000000000013764744322012502 5ustar liggesusersZelig/tests/testthat/0000755000176200001440000000000013765157646014352 5ustar liggesusersZelig/tests/testthat/test-gamma.R0000644000176200001440000000170613754260262016523 0ustar liggesusers# REQUIRE TEST Monte Carlo test gamma --------------------------------------------- test_that('REQUIRE TEST gamma Monte Carlo', { z <- zgamma$new() test.gamma <- z$mcunit(b0 = 1, b1 = -0.6, alpha = 3, minx = 0, maxx = 1, nsim = 2000, ci = 0.99, plot = FALSE) expect_true(test.gamma) }) # REQUIRE TEST gamma example --------------------------------------------------- test_that('REQUIRE TEST gamma example', { data(coalition) z.out <- zelig(duration ~ fract + numst2, model = "gamma", data = coalition) expect_error(plot(sim(setx(z.out))), NA) }) # REQUIRE TEST gamma to_zelig -------------------------------------------------- test_that('REQUIRE TEST gamma example', { data(coalition) m1 <- glm(duration ~ fract + numst2, family = Gamma(link="inverse"), data = coalition) expect_message(setx(m1), 'Assuming zgamma to convert to Zelig.') expect_error(plot(sim(setx(m1))), NA) }) Zelig/tests/testthat/test-assertions.R0000644000176200001440000000414013754260262017626 0ustar liggesusers# FAIL TESTS no Zelig model included ------------------------------------------- test_that('FAIL TEST setx method error if missing Zelig model estimation', { z5 <- zls$new() expect_error(z5$setx(), 'Zelig model has not been estimated.') }) test_that('FAIL TEST setrange method error if missing Zelig model estimation', { z5 <- zls$new() expect_error(z5$setrange(), 'Zelig model has not been estimated.') }) test_that('FAIL TEST sim method error if missing Zelig model estimation', { z5 <- zls$new() expect_error(z5$sim(), 'Zelig model has not been estimated.') }) test_that('FAIL TEST graph method error if missing Zelig model estimation', { z5 <- zls$new() expect_error(z5$graph(), 'Zelig model has not been estimated.') }) # FAIL TEST insufficient inputs for sim ---------------------------------------- test_that('FAIL TEST sim method error if missing Zelig model estimation', { z5 <- zls$new() expect_error(z5$sim(), 'Zelig model has not been estimated.') }) # FAIL TEST length is not greater than 1 --------------------------------------- test_that('FAIL TEST length is not greater than 1', { not_more_1 <- 1 expect_error(is_length_not_1(not_more_1), 'Length is 1.') }) # FAIL TEST vector does not vary ----------------------------------------------- test_that('FAIL TEST vector does not vary', { expect_error(is_varying(c(rep(1, 5))), 'Vector does not vary.') }) # REQUIRE TEST vector does not vary -------------------------------------------- test_that('REQIURE TEST vector does not vary', { expect_true(is_varying(c(1, 2, 3), fail = FALSE)) }) # FAIL TEST is_simsx error message --------------------------------------------- test_that('FAIL TEST is_simsx error message', { z <- zls$new() expect_error(is_simsx(z$sim.out), 'Simulations for individual fitted values are not present.') }) # FAIL TEST is_timeseries ------------------------------------------------------ test_that('FAIL TEST is_timeseries', { z <- zls$new() expect_false(is_timeseries(z)) expect_error(is_timeseries(z, fail = TRUE), 'Not a timeseries object.') }) Zelig/tests/testthat/test-tobit.R0000644000176200001440000000116013754260262016554 0ustar liggesusers# REQUIRE TEST Monte Carlo test tobit --------------------------------------------- test_that('REQUIRE TEST tobit Monte Carlo', { z <- ztobit$new() test.tobit <- z$mcunit(minx = 0, plot = FALSE) expect_true(test.tobit) }) # REQUIRE TEST update tobit formula -------------------------------------------- test_that('REQUIRE TEST update tobit formula', { data(tobin) z5<-ztobit$new() z5$zelig(durable ~ age + quant, data = tobin) z5.1_coefs <- coef(z5) controls <- ~ quant z5$zelig(formula = update(controls, durable ~ age + .), data = tobin) expect_equal(z5.1_coefs, coef(z5)) }) Zelig/tests/testthat/test-tobitbayes.R0000644000176200001440000000042513754260262017603 0ustar liggesusers# REQUIRE TEST Monte Carlo test tobitbayes --------------------------------------------- test_that('REQUIRE TEST tobitbayes Monte Carlo', { z <- ztobitbayes$new() test.tobitbayes <- z$mcunit(nsim=2000, ci=0.99, minx=0, plot = FALSE) expect_true(test.tobitbayes) })Zelig/tests/testthat/test-quantile.R0000644000176200001440000000333113764737054017270 0ustar liggesusers# REQUIRE TEST quantile regression doc example --------------------------------- test_that("REQUIRE TEST quantile regression doc example", { skip_on_cran() library(quantreg) library(dplyr) data("stackloss") z.out1 <- zelig(stack.loss ~ Air.Flow + Water.Temp + Acid.Conc., model = 'rq', data = stackloss) z.out2 <- zelig(stack.loss ~ Air.Flow + Water.Temp + Acid.Conc., model = 'rq', data = stackloss, tau = 0.5) z.set2 <- setx(z.out2, Air.Flow = seq(50, 80, by = 10)) z.sim2 <- sim(z.set2) expect_error(plot(z.sim2), NA) z.out3 <- zelig(stack.loss ~ Air.Flow + Water.Temp + Acid.Conc., model = 'rq', data = stackloss, tau = 0.25) z.set3 <- setx(z.out3, Air.Flow = seq(50, 80, by = 10)) z.sim3 <- sim(z.set3) expect_error(plot(z.sim3), NA) expect_equivalent(coef(z.out1)[[1]], coef(z.out2)[[1]]) qr.out1 <- rq(stack.loss ~ Air.Flow + Water.Temp + Acid.Conc., data = stackloss, tau = 0.5) expect_equivalent(coef(z.out1)[[2]], coef(qr.out1)[[2]]) expect_error(zelig(stack.loss ~ Air.Flow + Water.Temp + Acid.Conc., model = 'rq', data = stackloss, tau = c(0.25, 0.75)), 'tau argument only accepts 1 value.\nZelig is using only the first value.') }) # REQUIRE TEST quantile regression with Amelia imputed data -------------------- test_that('REQUIRE TEST quantile regression with Amelia imputed data',{ library(Amelia) library(dplyr) data(africa) a.out <- amelia(x = africa, cs = "country", ts = "year", logs = "gdp_pc") z.out <- zelig(gdp_pc ~ trade + civlib, model = "rq", data = a.out) expect_error(z.out %>% setx %>% sim %>% plot, NA) }) Zelig/tests/testthat/test-normalsurvey.R0000644000176200001440000000116213754260262020203 0ustar liggesusers# REQUIRE TEST Monte Carlo test normalsurvey ----------------------------------- test_that('REQUIRE TEST normalsurvey Monte Carlo', { z <- znormalsurvey$new() test.normalsurvey <- z$mcunit(plot = FALSE) expect_true(test.normalsurvey) }) # REQUIRE TEST to_zelig for normalsurvey --------------------------------------- test_that('REQUIRE TEST to_zelig for normalsurvey', { data(api) dstrat <- svydesign(id = ~1, strata = ~stype, weights = ~pw, data = apistrat, fpc = ~fpc) m1 <- svyglm(api00 ~ ell + meals + mobility, design = dstrat) expect_error(plot(sim(setx(m1))), NA) }) Zelig/tests/testthat/test-negbin.R0000644000176200001440000000036713754260262016705 0ustar liggesusers # REQUIRE TEST Monte Carlo test negbin --------------------------------------------- test_that('REQUIRE TEST negbin Monte Carlo', { set.seed(123) z <- znegbin$new() test.negbin <- z$mcunit(plot=FALSE) expect_true(test.negbin) }) Zelig/tests/testthat/test-probitbayes.R0000644000176200001440000000044513754260262017763 0ustar liggesusers# REQUIRE TEST Monte Carlo test probitbayes --------------------------------------------- test_that('REQUIRE TEST probitbayes Monte Carlo', { z <- zprobitbayes$new() test.probitbayes <- z$mcunit(minx=-1, maxx = 1, ci=0.99, nsim=2000, plot = FALSE) expect_true(test.probitbayes) })Zelig/tests/testthat/test-bayesdiagnostics.R0000644000176200001440000000254313754260262020774 0ustar liggesusers# REQUIRE TEST Bayes Diagnostics --------------------------------------------- test_that('REQUIRE TEST Bayes Diagnostics', { set.seed("123") data(macro) expect_error(zelig(unem ~ gdp + capmob + trade, model = "normal.bayes", bootstrap = 100, data = macro), "Error: The bootstrap is not available for Markov chain Monte Carlo (MCMC) models.", fixed=TRUE) z <- zelig(unem ~ gdp + capmob + trade, model = "normal.bayes", data = macro, verbose = FALSE) geweke.test <- z$geweke.diag() heidel.test <- z$heidel.diag() raftery.test <- z$raftery.diag() expect_equivalent(length(geweke.test),2) expect_equivalent(length(heidel.test),30) expect_equivalent(length(raftery.test),2) }) test_that('REQUIRE TEST Bayes Diagnostics for factors', { set.seed("123") data(swiss) names(swiss) <- c("Fert", "Agr", "Exam", "Educ", "Cath", "InfMort") z <- zelig(~ Agr + Exam + Educ + Cath + InfMort, model = "factor.bayes", data = swiss, factors = 2, verbose = FALSE, a0 = 1, b0 = 0.15, burnin = 500, mcmc = 5000) geweke.test <- z$geweke.diag() heidel.test <- z$heidel.diag() raftery.test <- z$raftery.diag() expect_equivalent(length(geweke.test),2) expect_equivalent(length(heidel.test),90) expect_equivalent(length(raftery.test),2) }) Zelig/tests/testthat/test-exp.R0000644000176200001440000000121513754260262016230 0ustar liggesusers# REQUIRE TEST Monte Carlo test exp --------------------------------------------- test_that('REQUIRE TEST exp Monte Carlo', { set.seed(123) z <- zexp$new() test.exp <- z$mcunit(plot = FALSE) expect_true(test.exp) }) # REQUIRE TEST (minimal) documentation example ------------------------------------------- test_that('REQUIRE TEST (minimal) documentation example', { data(coalition) z.out <- zelig(Surv(duration, ciep12) ~ fract + numst2, model = "exp", data = coalition) x.low <- setx(z.out, numst2 = 0) x.high <- setx(z.out, numst2 = 1) expect_error(sim(z.out, x = x.low, x1 = x.high), NA) }) Zelig/tests/testthat/test-plots.R0000644000176200001440000000273013764744076016613 0ustar liggesusers # FAIL TEST ci.plot if simrange is not supplied -------------------------------- test_that('FAIL TEST ci.plot if simrange is not supplied', { skip_on_cran() z <- zls$new() z$zelig(Fertility ~ Education, data = swiss) expect_error(ci.plot(z), 'Simulations for a range of fitted values are not present.') }) # FAIL TEST ci.plot first difference setrange and setrange1 same length -------- test_that('FAIL TEST ci.plot first difference setrange and setrange1 same length', { skip_on_cran() z <- zls$new() z$zelig(Fertility ~ Education, data = swiss) z$setrange(Education = 5:15) z$setrange1(Education = 10:11) z$sim() expect_error(z$graph(), 'The two fitted data ranges are not the same length.') # REQUIRE TEST for first difference over a range plots z <- zls$new() z$zelig(Fertility ~ Education, data = swiss) z$setrange(Education = 5:15) z$setrange1(Education = 15:25) z$sim() expect_error(z$graph(), NA) }) # REQUIRE TEST ordered plots --------------------------------------------- test_that('REQUIRE TEST ordered plots', { skip_on_cran() data(sanction) sanction$ncost <- factor(sanction$ncost, ordered = TRUE, levels = c("net gain", "little effect", "modest loss", "major loss")) z.out <- zoprobitbayes$new() z.out$zelig(ncost ~ mil + coop, data = sanction, verbose = FALSE) z.out$setx(mil=0) z.out$setx1(mil=1) z.out$sim() expect_true(is.null(plot(z.out))) }) Zelig/tests/testthat/test-survey.R0000644000176200001440000000436413764744262017011 0ustar liggesusers# REQUIRE TEST survey weights correctly passed -------------------------------- test_that('REQUIRE TEST survey weights correctly passed', { skip_on_cran() data(api, package = "survey") z.out1 <- zelig(api00 ~ meals + yr.rnd, model = "normal.survey", id = ~dnum, weights = 'pw', data = apiclus1, fpc = ~fpc) z.out2 <- zelig(api00 ~ meals + yr.rnd, model = "normal.survey", id = ~dnum, weights = ~pw, data = apiclus1, fpc = ~fpc) z.out3 <- zelig(api00 ~ meals + yr.rnd, model = "normal.survey", id = ~dnum, weights = apiclus1$pw, data = apiclus1, fpc = ~fpc) api_design <- svydesign(id = ~dnum, weights = ~pw, data = apiclus1, fpc = ~fpc ) model_glm <- svyglm(api00 ~ meals + yr.rnd, api_design, family = gaussian("identity")) expect_equal(coef(z.out1), coef(z.out2)) expect_equal(coef(z.out1), coef(z.out3)) expect_equal(coef(z.out1), coef(model_glm)) }) # REQUIRE TEST survey weights correctly passed -------------------------------- test_that('REQUIRE TEST survey glm with no weights', { skip_on_cran() data(api, package = "survey") z.out1_no_weights <- zelig(api00 ~ meals + yr.rnd, model = "normal.survey", id = ~dnum, data = apiclus1, fpc = ~fpc) api_design_no_weights <- svydesign(id = ~dnum, data = apiclus1, fpc = ~fpc, weights = ~pw ) model_glm_no_weights <- svyglm(api00 ~ meals + yr.rnd, api_design_no_weights, family = gaussian("identity")) expect_equal(coef(z.out1_no_weights), coef(model_glm_no_weights)) }) # REQUIRE TEST repweights ------------------------------------------------------ test_that('REQUIRE TEST repweights', { ### ----- NEED TO THINK OF A BETTER TEST ------ ## skip_on_cran() data(scd, package = "survey") BRRrep <- 2*cbind(c(1,0,1,0,1,0), c(1,0,0,1,0,1), c(0,1,1,0,0,1), c(0,1,0,1,1,0)) z.outREP <- zelig(alive ~ arrests , model = "normal.survey", repweights = BRRrep, type = "BRR", data = scd, na.action = NULL) }) Zelig/tests/testthat/test-normalbayes.R0000644000176200001440000000046313754260262017754 0ustar liggesusers# REQUIRE TEST Monte Carlo test normalbayes --------------------------------------------- test_that('REQUIRE TEST normalbayes Monte Carlo', { set.seed(123) z <- znormalbayes$new() test.normalbayes <- z$mcunit(minx=-1, maxx = 1, ci=0.99, nsim=2000, plot = TRUE) expect_true(test.normalbayes) })Zelig/tests/testthat/test-logitbayes.R0000644000176200001440000000041213754260262017574 0ustar liggesusers# REQUIRE TEST Monte Carlo test logitbayes ------------------------------------- test_that('REQUIRE TEST logitbayes Monte Carlo', { z <- zlogitbayes$new() test.logitbayes <- z$mcunit(nsim = 2000, ci = 0.99, plot = FALSE) expect_true(test.logitbayes) }) Zelig/tests/testthat/test-amelia.R0000644000176200001440000000153313754260262016667 0ustar liggesusers# REQUIRE TEST for Amelia integration, no-transformations ---------------------- test_that('REQUIRE TEST for Amelia integration, no-transformations', { library(Amelia) data(africa) a.out <- amelia(x = africa, cs = "country", ts = "year", logs = "gdp_pc") z.out <- zelig(gdp_pc ~ trade + civlib, model = "ls", data = a.out) z.set <- setx(z.out) z.sim <- sim(z.set) expect_equal(mean(z.sim$get_qi()), 1000, tolerance = 100) }) test_that('REQUIRE TEST for Amelia integration, log-transformation', { library(Amelia) data(africa) a.out <- amelia(x = africa, cs = "country", ts = "year", logs = "gdp_pc") z.out <- zelig(gdp_pc ~ trade + civlib, model = "ls", data = a.out) z.outl <- zelig(gdp_pc ~ log(trade) + civlib, model = "ls", data = a.out) expect_false(coef(z.out)[[1]][2] == coef(z.outl)[[1]][2]) }) Zelig/tests/testthat/test-probit.R0000644000176200001440000000173513754260262016742 0ustar liggesusers# REQUIRE TEST probit mc ------------------------------------------------------- test_that("REQUIRE TEST probit mc", { z <- zprobit$new() test.probit <- z$mcunit(plot = FALSE) expect_true(test.probit) }) # REQUIRE TEST probit example -------------------------------------------------- test_that("REQUIRE TEST probit example", { data(turnout) z.out <- zelig(vote ~ race + educate, model = "probit", data = turnout) x.out <- setx(z.out) s.out <- sim(z.out, x = x.out) expect_equal(sort(unique(zelig_qi_to_df(s.out)$predicted_value)), c(0, 1)) }) # REQUIRE TEST probit to_zelig ------------------------------------------------ test_that('REQUIRE TEST probit example', { data(turnout) m1 <- glm(vote ~ race + educate, family = binomial("probit"), data = turnout) m1.out <- setx(m1) m1.out <- sim(m1.out) expect_equal(sort(unique(zelig_qi_to_df(m1.out)$predicted_value)), c(0, 1)) expect_error(plot(sim(setx(m1))), NA) }) Zelig/tests/testthat/test-gammasurvey.R0000644000176200001440000000047113754260262017777 0ustar liggesusers# REQUIRE TEST Monte Carlo test gammasurvey --------------------------------------------- test_that('REQUIRE TEST gammasurvey Monte Carlo', { z <- zgammasurvey$new() test.gammasurvey <- z$mcunit(b0=1, b1=-0.6, alpha=3, minx=0, maxx=1, nsim=2000, ci=.99, plot = FALSE) expect_true(test.gammasurvey) })Zelig/tests/testthat/test-createJSON.R0000644000176200001440000000053113754260262017371 0ustar liggesusers# REQUIRE TEST toJSON --------------------------------------------- test_that('REQUIRE TEST toJSON', { j <- createJSON(movefile=FALSE) expect_true(j) mypath <- file.path("zelig5models.json") expect_true(file.exists(mypath)) expect_true(validate(readChar(mypath, file.info(mypath)$size))) file.remove(file.path(mypath)) })Zelig/tests/testthat/test-ls.R0000755000176200001440000001462113754260262016062 0ustar liggesusers# REQUIRE TEST Monte Carlo test ls --------------------------------------------- test_that('REQUIRE TEST ls Monte Carlo', { z <- zls$new() test.ls <- z$mcunit(plot = FALSE) expect_true(test.ls) }) # REQUIRE TEST ls with continuous covar ----------------------------------------- test_that('REQUIRE TEST ls continuous covar -- quickstart (Zelig 5 syntax)', { z5 <- zls$new() z5$zelig(Fertility ~ Education, data = swiss) # extract education coefficient parameter estimate and compare to reference expect_equivalent(round(as.numeric(z5$get_coef()[[1]][2]), 7), -0.8623503) }) # REQUIRE TEST ls with by ------------------------------------------------------- test_that('REQUIRE TEST ls with by', { # Majority Catholic dummy swiss$maj_catholic <- cut(swiss$Catholic, breaks = c(0, 51, 100)) z5by <- zls$new() z5by$zelig(Fertility ~ Education, data = swiss, by = 'maj_catholic') z5by$setx() z5by$sim() sims_df <- zelig_qi_to_df(z5by) expect_equal(length(unique(sims_df$by)), 2) }) # REQUIRE TEST gim method ------------------------------------------------------ #test_that('REQUIRE TESTls gim method', { #z5$gim() #}) # REQUIRE TEST for sim with ls models including factor levels ------------------ test_that('REQUIRE TEST for sim with models including factor levels', { expect_is(iris$Species, 'factor') z.out <- zelig(Petal.Width ~ Petal.Length + Species, data = iris, model = "ls") x.out1 <- setx(z.out, Petal.Length = 1:10) sims1 <- sim(z.out, x.out1) expect_equal(length(sims1$sim.out$range), 10) x.out2 <- setx(z.out, Petal.Length = 1:10, fn = list(numeric = Median)) sims2 <- sim(z.out, x.out2) expect_equal(length(sims2$sim.out$range), 10) }) # REQUIRE TEST for set with ls models including factors set within zelig call ---- test_that('REQUIRE TEST for set with ls models including factors set within zelig call', { data(macro) z1 <- zelig(unem ~ gdp + trade + capmob + as.factor(country), model = "ls", data = macro) setUS1 <- setx(z1, country = "United States") z2 <- zelig(unem ~ gdp + trade + capmob + factor(country, labels=letters[1:14]), model = "ls", data = macro) setUS2 <- setx(z2, country = "m") macro$country <- as.factor(macro$country) z3 <- zelig(unem ~ gdp + trade + capmob + country, model = "ls", data = macro) setUS3 <- setx(z3, country = "United States") expect_equal(setUS1$setx.out$x$mm[[1]][[16]], 1) expect_equal(setUS2$setx.out$x$mm[[1]][[16]], 1) expect_equal(setUS1$setx.out$x$mm[[1]][[16]], setUS3$setx.out$x$mm[[1]][[16]]) expect_equal(setUS2$setx.out$x$mm[[1]][[16]], setUS3$setx.out$x$mm[[1]][[16]]) }) # REQUIRE TEST for set with ls models including natural logs set within zelig call -- test_that('REQUIRE TEST for set with ls models including natural logs set within zelig call', { z1 <- zelig(speed ~ log(dist), data = cars, model = 'ls') setd1 <- setx(z1, dist = log(15)) cars$dist <- log(cars$dist) z2 <- zelig(speed ~ dist, data = cars, model = 'ls') setd2 <- setx(z2, dist = log(15)) expect_equal(round(setd1$setx.out$x$mm[[1]][[2]], digits = 5), 2.70805) expect_equal(setd1$setx.out$x$mm[[1]][[2]], setd2$setx.out$x$mm[[1]][[2]]) z3.1 <- zelig(Sepal.Length ~ log10(Petal.Length) + log(Sepal.Width), model = 'ls', data = iris, cite = FALSE) z3.2 <- zelig(Sepal.Length ~ log(Petal.Length, base = 10) + log(Sepal.Width), model = 'ls', data = iris, cite = FALSE) expect_equal(unname(coef(z3.1)), unname(coef(z3.2))) setz3 <- setx(z3.1) # expect_equal(as.vector(round(unlist(setz3$setx.out$x), digits = 2)), # c(1, 1, 1.47, 1.12)) }) # REQUIRE TEST for ls with interactions ---------------------------------------- test_that('REQUIRE TEST for ls with interactions', { states <- as.data.frame(state.x77) z <- zelig(Murder ~ Income * Population, data = states, model = 'ls') s1 <- setx(z, Population = 1500:1600, Income = 3098) s2 <- setx(z, Population = 1500:1600, Income = 6315) expect_equal(length(s1$setx.out$range), 101) expect_equal(length(s2$setx.out$range), 101) }) # REQUIRE TEST for ls with unrecognised variable name -------------------------- test_that('REQUIRE TEST for ls with unrecognised variable name', { states <- as.data.frame(state.x77) z <- zelig(Murder ~ Income * Population, data = states, model = 'ls') expect_error(setx(z, population = 1500:1600, Income = 3098), "Variable 'population' not in data set.") }) # REQUIRE TEST for ls setrange with equal length ranges ------------------------ test_that('REQUIRE TEST for ls setrange with equal length ranges and polynomials', { iris.poly <- cbind(iris, I(iris$Petal.Length^2)) names(iris.poly)[ncol(iris.poly)] <- 'pl_2' pl_range <- 1:7 # Polynomial found outside of formula z.cars1 <- zelig(Sepal.Length ~ Petal.Length + pl_2 + Species, data = iris.poly, model = 'ls', cite = FALSE) z.cars1 <- setx(z.cars1, Species = 'virginica', Petal.Length = pl_range, pl_2 = pl_range^2) expect_equal(nrow(zelig_setx_to_df(z.cars1)), length(pl_range)) # Polynomial found in formula z.cars2 <- zelig(Sepal.Length ~ Petal.Length + I(Petal.Length^2) + Species, data = iris, model = 'ls', cite = FALSE) z.cars2 <- setx(z.cars2, Species = 'virginica', Petal.Length = pl_range) expect_equal(nrow(zelig_setx_to_df(z.cars2)), length(pl_range)) expect_equal(zelig_setx_to_df(z.cars1)[[2]], zelig_setx_to_df(z.cars2)[[2]]) }) # REQUIRE TEST for . formulas -------------------------------------------------- test_that('REQUIRE TEST for . formulas', { z1 <- zelig(speed ~ ., data = cars, model = 'ls') zset <- setx(z1, dist = 5) expect_equal(names(coef(z1)), c("(Intercept)", "dist")) }) # REQUIRE TEST for to_zelig within setx ---------------------------------------- test_that('REQUIRE TEST for to_zelig within setx', { m1 <- lm(speed ~ dist, data = cars) zset <- setx(m1, dist = 5) expect_equal(zset$setx.out$x$mm[[1]][2], 5) plot(sim(zset)) m2 <- glm(speed ~ dist, data = cars, family = gaussian(link = "identity")) zset <- setx(m1, dist = 5) expect_equal(zset$setx.out$x$mm[[1]][2], 5) plot(sim(zset)) }) Zelig/tests/testthat/test-zelig.R0000644000176200001440000002666613754260262016567 0ustar liggesusers#### Integration tests for the Zelig estimate, set, sim, plot workflow #### # FAIL TEST sim workflow ------------------------------------------------------- test_that('FAIL TEST sim method warning if insufficient inputs', { z5 <- zls$new() expect_output(z5$zelig(Fertility ~ Education, model="ls", data = swiss), 'Argument model is only valid for the Zelig wrapper, but not the Zelig method, and will be ignored.') expect_warning(z5$sim(), 'No simulations drawn, likely due to insufficient inputs.') expect_error(z5$graph(), 'No simulated quantities of interest found.') }) # FAIL TEST ci.plot range > length = 1 ----------------------------------------- test_that('FAIL TEST ci.plot range > length = 1', { z <- zls$new() z$zelig(Fertility ~ Education, data = swiss) expect_warning(z$setrange(Education = 5), 'Only one fitted observation provided to setrange.\nConsider using setx instead.') z$sim() expect_error(z$graph(), 'Simulations for more than one fitted observation are required.') expect_warning(z$setrange1(Education = 5), 'Only one fitted observation provided to setrange.\nConsider using setx instead.') expect_error(z$graph(), 'Simulations for more than one fitted observation are required.') }) # REQUIRE TEST for by estimation workflow -------------------------------------- test_that('REQUIRE TEST for by estimation workflow', { # Majority Catholic dummy swiss$maj_catholic <- cut(swiss$Catholic, breaks = c(0, 51, 100)) z5 <- zls$new() z5$zelig(Fertility ~ Education, data = swiss, by = 'maj_catholic') z5$setrange(Education = 5:15) z5$sim() expect_error(z5$graph(), NA) }) # FAIL TEST for get_qi when applied to an object with no simulations ------------ test_that('FAIL TEST for get_qi when applied to an object with no simulations', { z <- zls$new() z$zelig(Fertility ~ Education, data = swiss) expect_error(z$get_qi(), 'No simulated quantities of interest found.') }) # FAIL TEST for get_qi when unsupported qi supplied ---------------------------- test_that('FAIL TEST for get_qi when unsupported qi supplied', { z5 <- zls$new() z5$zelig(Fertility ~ Education, data = swiss) z5$setrange(Education = 5:15) z5$sim() expect_error(z5$get_qi(qi = "fa", xvalue = "range"), 'qi must be ev or pv.') }) # FAIL TEST for estimation model failure --------------------------------------- test_that('FAIL TEST for estimation model failure', { no_vary_df <- data.frame(y = rep(1, 10), x = rep(2, 10)) z <- zarima$new() expect_error(z$zelig(y ~ x, data = no_vary_df), 'Dependent variable does not vary for at least one of the cases.') expect_error(summary(z), 'Zelig model has not been estimated.') }) # REQUIRE TEST for sim num argument -------------------------------------------- test_that('REQUIRE TEST for sim num argument', { z5 <- zls$new() z5$zelig(Fertility ~ Education, data = swiss) z5$setx(Education = 5) z5$sim() expect_equal(length(z5$get_qi()), 1000) z5$sim(num = 10) # Look into unexpected behaviour if sim order is reversed expect_equal(length(z5$get_qi()), 10) }) # REQUIRE TEST from_zelig_model returns expected fitted model object ----------------- test_that('REQUIRE TEST from_zelig_model returns expected fitted model object', { z5 <- zls$new() z5$zelig(Fertility ~ Education, data = swiss) model_object <- z5$from_zelig_model() expect_is(model_object, class = 'lm') expect_equal(as.character(model_object$call[1]), 'lm') }) # REQUIRE TEST from_zelig_model returns each fitted model object from mi ------------- test_that('REQUIRE TEST from_zelig_model returns each fitted model object from mi', { set.seed(123) n <- 100 x1 <- runif(n) x2 <- runif(n) y <- rnorm(n) data.1 <- data.frame(y = y, x = x1) data.2 <- data.frame(y = y, x = x2) mi.out <- to_zelig_mi(data.1, data.2) z.out <- zelig(y ~ x, model = "ls", data = mi.out) model_list <- z.out$from_zelig_model() expect_is(model_list, class = 'list') expect_equal(as.character(model_list[[2]]$call[1]), 'lm') }) # REQUIRE TEST functioning simparam with by and ATT ---------------------------- test_that('REQUIRE TEST functioning simparam with by and ATT', { set.seed(123) n <- 100 xx <- rbinom(n = n, size = 1, prob = 0.3) zz <- runif(n) ss <- runif(n) rr <- rbinom(n, size = 1, prob = 0.5) mypi <- 1/(1 + exp(-xx -3*zz -0.5)) yb <- rbinom(n, size = 1, prob = mypi) data <- data.frame(rr, ss, xx, zz, yb) zb.out <- zlogit$new() zb.out$zelig(yb ~ xx + zz, data = data, by = "rr") zb.out$ATT(treatment = "xx") out <- zb.out$get_qi(qi = "ATT", xvalue = "TE") expect_equal(length(out), 1000) }) # REQUIRE TEST getters values and dimensions and plot does not fail------------- test_that("REQUIRE TEST getters values and dimensions and plot does not fail", { set.seed(123) n <- 1000 myseq <- 1:n x <- myseq/n y <- x + (-1)^(myseq) * 0.1 mydata <- data.frame(y = y, x = x) mydata2 <- data.frame(y = y, x = x + 2) z.out <- zelig(y ~ x, model = "ls", data = mydata) expect_equivalent(round(as.numeric(z.out$get_coef()[[1]]), 2), c(0, 1)) expect_equivalent(length(z.out$get_predict()[[1]]), n) expect_equivalent(length(z.out$get_fitted()[[1]]), n) expect_equivalent(dim(z.out$get_vcov()[[1]]), c(2, 2)) z.out$setx(x = 0) z.out$setx1(x = 1) show.setx <- summary(z.out) z.out$sim() show.sim <- summary(z.out) expect_equivalent(length(z.out$get_qi(qi = "ev", xvalue = "x")), n) expect_equivalent(round(mean(z.out$get_qi(qi = "ev", xvalue = "x")), 2), 0) expect_equivalent(length(z.out$get_qi(qi = "ev", xvalue = "x1")), n) expect_equivalent(round(mean(z.out$get_qi(qi = "ev", xvalue = "x1")), 2), 1) expect_equivalent(length(z.out$get_qi(qi = "pv", xvalue = "x")), n) expect_equivalent(round(mean(z.out$get_qi(qi = "pv", xvalue = "x")), 2), 0) expect_equivalent(length(z.out$get_qi(qi = "pv", xvalue = "x1")), n) expect_equivalent(round(mean(z.out$get_qi(qi = "pv", xvalue = "x1")), 2), 1) expect_equivalent(length(z.out$get_qi(qi = "fd", xvalue = "x1")), n) expect_equivalent(round(mean(z.out$get_qi(qi = "fd", xvalue = "x1")), 2), 1) expect_false(show.setx[[1]]) expect_false(show.sim[[1]]) expect_true(is.null(plot(z.out))) xseq <- seq(from = 0, to = 1, length = 10) z.out$setrange(x = xseq) z.out$sim() expect_true(is.null(plot(z.out))) myref <- capture.output(z.out$references()) expect_equivalent(substr(myref[1], 1, 11), "R Core Team") set.seed(123) boot.out <- zelig(y ~ x, model = "ls", bootstrap = 20, data = mydata) expect_equivalent(round(as.numeric(boot.out$get_coef()[[1]]), 2), c(0, 1)) show.boot <- summary(boot.out, bagging = TRUE) expect_false(show.boot[[1]]) show.boot <- summary(boot.out, subset=2:3) expect_false(show.boot[[1]]) set.seed(123) mi.out <- zelig(y ~ x, model = "ls", data = mi(mydata, mydata2)) expect_equivalent(round(as.numeric(mi.out$get_coef()[[1]]), 2), c(0, 1)) expect_equivalent(round(as.numeric(mi.out$get_coef()[[2]]), 2), c(-2, 1)) expect_equivalent(length(mi.out$toJSON()), 1) show.mi <- summary(mi.out) expect_false(show.mi[[1]]) show.mi.subset <- summary(mi.out, subset = 1) expect_false(show.mi.subset[[1]]) }) # REQUIRE TEST Binary QI's and ATT effects and BY argument------------- test_that('REQUIRE TEST Binary QIs and ATT effects and BY argument', { set.seed(123) # Simulate data n <- 100 xx <- rbinom(n = n, size = 1, prob = 0.5) zz <- runif(n) ss <- runif(n) rr <- rbinom(n, size = 1, prob = 0.5) mypi <- 1/ (1+exp(-xx -3*zz -0.5)) yb <- rbinom(n, size = 1, prob = mypi) data <- data.frame(rr, ss, xx, zz, yb) # Estimate Zelig Logit models zb.out <- zlogit$new() zb.out$zelig(yb ~ xx + zz, data=data, by="rr") show.logit <- summary(zb.out) expect_false(show.logit[[1]]) zb2.out <- zlogit$new() zb2.out$zelig(yb ~ xx, data=data) zb3.out <- zlogit$new() zb3.out$zelig(yb ~ xx + zz, data=data) x.high <- setx(zb.out, xx = quantile(data$xx, prob = 0.75)) x.low <- setx(zb.out, xx = quantile(data$xx, prob = 0.25)) s.out <- sim(zb.out, x = x.high, x1 = x.low) show.logit <- summary(s.out) expect_false(show.logit[[1]]) expect_true(is.null(plot(s.out))) # Method to calculate ATT zb.out$ATT(treatment = "xx") # Getter to extract ATT out <- zb.out$get_qi(qi="ATT", xvalue="TE") expect_equal(length(out), 1000) # Plot ROC expect_true(is.null(rocplot(zb2.out, zb3.out))) }) # REQUIRE TEST for get_names method---------------------------------------------- test_that('REQUIRE TEST for names field', { z <- zls$new() z$zelig(Fertility ~ Education, data = swiss) expect_is(z$get_names(), class = 'character') expect_false(is.null(names(z))) }) # REQUIRE TEST for get_residuals method ----------------------------------------- test_that('REQUIRE TEST for get_residuals method', { z <- zls$new() z$zelig(Fertility ~ Education, data = swiss) expect_is(z$get_residuals(), class = 'list') expect_false(is.null(residuals(z))) }) # REQUIRE TEST for get_df_residual method ----------------------------------------- test_that('REQUIRE TEST for get_df_residual method', { z <- zls$new() z$zelig(Fertility ~ Education, data = swiss) expect_equal(length(z$get_df_residual()), 1) expect_equal(length(df.residual(z)), 1) }) # REQUIRE TEST for get_model_data method --------------------------------------- test_that('REQUIRE TEST for get_model_data method', { z <- zls$new() z$zelig(Fertility ~ Education, data = swiss) expect_is(z$get_model_data(), class = 'data.frame') }) # REQUIRE TEST for get_pvalue method --------------------------------------- test_that('REQUIRE TEST for get_pvalue', { z <- zls$new() z$zelig(Fertility ~ Education, data = swiss) expect_is(z$get_pvalue()[[1]], class = 'numeric') expect_equal(z$get_pvalue()[[1]], get_pvalue(z)[[1]]) }) # REQUIRE TEST for get_se method --------------------------------------- test_that('REQUIRE TEST for get_se', { z <- zls$new() z$zelig(Fertility ~ Education, data = swiss) expect_is(z$get_se()[[1]], class = 'numeric') expect_equal(z$get_se()[[1]], get_se(z)[[1]]) }) # REQUIRE TEST setx with logical covariates ------------------------------------ test_that('REQUIRE TEST setx with logical covariates', { swiss$maj_catholic <- cut(swiss$Catholic, breaks = c(0, 51, 100)) swiss$maj_catholic_logical <- FALSE swiss$maj_catholic_logical[swiss$maj_catholic == '(51,100]'] <- TRUE z5l <- zls$new() z5l$zelig(Fertility ~ Education + maj_catholic_logical, data = swiss) z5l$setx(maj_catholic_logical = TRUE) expect_is(z5l$setx.out$x, class = c("rowwise_df", "tbl_df", "tbl", "data.frame")) }) # REQUIRE TESTS for standard R methods with zelig models ----------------------- test_that('REQUIRE TESTS for standard R methods with zelig models', { z5 <- zls$new() z5$zelig(Fertility ~ Education, data = swiss) expect_equal(length(coefficients(z5)), length(coef(z5)), 2) expect_equal(nrow(vcov(z5)[[1]]), 2) expect_equal(length(fitted(z5)[[1]]), 47) expect_equal(length(predict(z5)[[1]]), 47) }) Zelig/tests/testthat/test-weights.R0000644000176200001440000000217613754260262017115 0ustar liggesusers# REQUIRE TEST weighting --------------------------------------------- test_that('REQUIRE TEST weighting', { set.seed(123) x <- runif(90) y <- c( 2*x[1:45], -3*x[46:90] ) + rnorm(90) z <- as.numeric(y>0) w1 <- c(rep(1.8, 45), rep(0.2,45)) mydata <- data.frame(z,y,x,w1) w2 <- rep(c(1.8,0.2), 45) z1.out <- zelig( y ~ x, cite = FALSE, model = "ls", weights = "w1", data = mydata) expect_equivalent(length(z1.out$get_coef()[[1]]),2) z2.out <- zelig( y ~ x, cite=FALSE, model="ls", weights=w2, data=mydata) expect_equivalent(length(z2.out$get_coef()[[1]]),2) z3.out <- zls$new() expect_warning(z3.out$zelig( y ~ x, weights="noSuchName", data=mydata)) z4.out <- zls$new() expect_warning(z4.out$zelig( y ~ x, weights=w2[1:10], data=mydata)) continuous.weights <- rep(x=c(0.6, 1, 1.4), times=30) z5.out <- zelig( z ~ x, model="logit", weights=continuous.weights, data=mydata) expect_equivalent(length(z5.out$get_coef()[[1]]),2) integer.weights <- rep(x=c(0, 1, 2), times=30) z6.out <- zelig( z ~ x, model="logit", weights=integer.weights, data=mydata) expect_equivalent(length(z6.out$get_coef()[[1]]),2) }) Zelig/tests/testthat/test-matchit.R0000644000176200001440000000121613754260262017066 0ustar liggesusers# REQUIRE TEST for matched data using MatchIt ---------------------------------- #test_that('REQUIRE TEST for matched data using MatchIt', { # library(MatchIt) # library(optmatch) # data(lalonde) # m.out <- matchit(treat ~ educ + black + hispan + age, data = lalonde, # method = "optimal") # z.out <- zelig(educ ~ treat + age, model = "ls", data = m.out) # s.out <- setx(z.out) # z.outl <- zelig(educ ~ treat + log(age), model = "ls", data = m.out) # s.outl <- setx(z.outl) # expect_false(s.out$setx.out$x$mm[[1]][3] == s.outl$setx.out$x$mm[[1]][3]) #}) # Not run due to unresolved environment issue Zelig/tests/testthat/test-arima.R0000644000176200001440000001366313764737522016550 0ustar liggesusers# REQUIRE TEST arima Monte Carlo ----------------------------------------------- ## Need to implement ## # REQUIRE TEST arima successful estimation ------------------------------------- test_that('REQUIRE TEST arima successful estimation', { skip_on_cran() data(seatshare) ts <- zarima$new() ## NEEDS a better test, possibly once get_coef has been implemented for arima expect_error( ts$zelig(unemp ~ leftseat, order = c(1,0,1), ts = "year", cs = "country", data = seatshare), NA) }) # FAIL TEST arima fails if DV does not vary ------------------------------------ test_that('FAIL TEST arima fails if DV does not vary', { skip_on_cran() no_vary_df <- data.frame(country = c(rep("A", 5), rep("B", 5)), year = c(1:5, 1:5), y = c(rep(1:5), rep(2, 5)), x = c(1, 3, -1, NA, 1, NA, 1, 2, NA, 5)) # a.out <- amelia(x = no_vary_df, cs = "country", ts = "year") zts <- zarima$new() expect_error( zts$zelig(y ~ x, ts = 'year', cs = 'country', order = c(1, 0, 1), data = no_vary_df), 'Dependent variable does not vary for at least one of the cases.') }) # FAIL TEST arima models ------------------------------------ test_that('REQUIRE TEST arima models', { skip_on_cran() n.obs <- 2000 x <- rnorm(n=n.obs) z <- rnorm(n=n.obs) t <- 1:n.obs r <- rep(c(1,2),n.obs/2) beta <- 1 phi <-0.3 y <- rep(NA,n.obs) y[1]<-beta*x[1] + rnorm(1) for(i in 2:n.obs){ y[i] <- phi*y[i-1] + beta*x[i] + rnorm(n=1, mean=0, sd=0.2) } mydata <- data.frame(y,x,z,t,r) mydata2 <- rbind(mydata[10:n.obs,],mydata[1:9,]) # reorder dataset # check ar model zj <- zar$new() zj$zelig(y~x + z , data=mydata, ts="t") expect_equivalent(length(zj$get_coef()[[1]]), 4) # check ma model zj <- zma$new() zj$zelig(y~x + z , data=mydata, ts="t") expect_equivalent(length(zj$get_coef()[[1]]), 4) # check ar-2, ma-1 model zj <- zarima$new() zj$zelig(y~x + z , order=c(2,0,1), data=mydata, ts="t") expect_equivalent(length(zj$get_coef()[[1]]), 6) # check integration zj <- zarima$new() zj$zelig(y~x + z , order=c(2,1,1), data=mydata, ts="t") expect_equivalent(length(zj$get_coef()[[1]]), 5) # check obervations out of time order zj <- zarima$new() zj$zelig(y~x + z -1, order=c(2,0,1), data=mydata2, ts="t") expect_equivalent(length(zj$get_coef()[[1]]), 5) zj$setx() zj$setx1(x=2) zj$sim() # ACF plot myorder <- eval(zj$zelig.call$order) mycoef <- coef(zj$zelig.out$z.out[[1]]) myparams <- zj$simparam$simparam[[1]] test <- Zelig:::simacf(coef=mycoef, order=myorder, params=myparams, alpha = 0.5) expect_true(is.null(zeligACFplot(test, omitzero=TRUE))) # plots expect_true(is.null(ci.plot(zj, qi="pvseries.shock"))) expect_true(is.null(ci.plot(zj, qi="pvseries.innovation"))) expect_true(is.null(plot(zj))) }) # REQUIRE TEST ensure that the workflow can be completed using the # Zelig 5 wrappers test_that("REQUIRE TEST timeseries reference class wrappers", { skip_on_cran() data(seatshare) subset <- seatshare[seatshare$country == "UNITED KINGDOM",] expect_error(ts.out <- zelig(unemp ~ leftseat, data = subset, model = "arima", order = c(2, 0, 1)), NA) expect_error(x.out <- setx(ts.out, leftseat = 0.75), NA) expect_error(s.out <- sim(x.out), NA) expect_error(s.out <- plot(s.out), NA) expect_error(x.out <- setx1(x.out, leftseat = 0.25), NA) expect_error(s.out <- sim(x.out), NA) expect_error(s.out <- plot(s.out), NA) }) # REQUIRE TEST to ensure that summary works with arima with sim ---------------- test_that("REQUIRE TEST to ensure that summary works with arima with sim", { skip_on_cran() data(seatshare) subset <- seatshare[seatshare$country == "UNITED KINGDOM",] s.out <- zelig(unemp ~ leftseat, data = subset, model = "arima", order = c(2,0,1)) %>% setx(leftseat = 0.25) %>% sim() expect_error(summary(s.out), NA) }) # FAILURE TEST cs ts by with timeseries ---------------------------------------- test_that("FAILURE TEST cs ts by with timeseries", { skip_on_cran() data(seatshare) ts <- zarima$new() expect_error( ts$zelig(unemp ~ leftseat, order = c(1,0,1), ts = "year", cs = "country", by = "TEST", data = seatshare), "cs and by are equivalent for this model. Only one needs to be specified." ) expect_error( ts$zelig(unemp ~ leftseat, order = c(1,0,1), cs = "country", data = seatshare), "ts must be specified if cs is specified." ) }) # REQUIRE TEST arima with differenced first-order autoregressive --------------- test_that("REQUIRE TEST arima with differenced first-order autoregressive", { skip_on_cran() data(seatshare) subset <- seatshare[seatshare$country == "UNITED KINGDOM",] s.out <- zelig(unemp ~ leftseat, data = subset, model = "arima", order = c(1, 1, 0)) %>% setx(leftseat = 0.25) expect_error(sim(s.out), NA) }) # FAIL TEST when data is not found (not exclusive to arima) -------------------- test_that("FAIL TEST when data is not found (not exclusive to arima)", { skip_on_cran() expect_error(zelig(formula = unemp ~ leftseat, model = "ma", ts = "year", data = subset), "data not found") }) # REQUIRE TEST timeseries deprecation ------------------------------------------ test_that("REQUIRE TEST timeseries deprecation", { skip_on_cran() data(seatshare) subset <- seatshare[seatshare$country == "UNITED KINGDOM",] expect_warning( ts.out <- zelig(formula = unemp ~ leftseat, order = c(1, 0, 0), ts = "year", data = subset, model = "arima"), "All Zelig time series models are deprecated" ) }) Zelig/tests/testthat/test-relogit.R0000755000176200001440000001173613754260262017115 0ustar liggesusers# REQUIRE TEST Monte Carlo test relogit ---------------------------------------- test_that('REQUIRE TEST relogit Monte Carlo', { z <- zrelogit$new() test.relogit <- z$mcunit(alpha = 0.1, b0 = -4, nsim = 1000, plot = FALSE) expect_true(test.relogit) }) # REQUIRE TEST relogit vignette example ------------------------------------------------ test_that('REQUIRE TEST relogit vignette example', { data(mid) z.out1 <- zelig(conflict ~ major + contig + power + maxdem + mindem + years, data = mid, model = "relogit", tau = 1042/303772) x.out1 <- setx(z.out1) s.out1 <- sim(z.out1, x = x.out1) sims <- zelig_qi_to_df(s.out1) expect_lt(mean(sims$predicted_value), 0.1) }) # REQUIRE TEST relogit vignette logs transformation ---------------------------- test_that('REQUIRE TEST relogit vignette example', { data(mid) z.out1 <- zelig(conflict ~ major + contig + power + maxdem + mindem + years, data = mid, model = "relogit", tau = 1042/303772) z.outlog <- zelig(conflict ~ major + contig + log(power) + maxdem + mindem + years, data = mid, model = "relogit", tau = 1042/303772) x.outlog <- setx(z.outlog, power = log(0.5)) expect_false(coef(x.outlog)['power'] == coef(z.out1)['power']) }) # FAIL TEST relogit with tau <= 0 ---------------------------------------------- test_that('FAIL TEST relogit with tau <= 0', { data(mid) expect_error(zelig(conflict ~ major + contig + power + maxdem + mindem + years, data = mid, model = "relogit", tau = -0.1), "tau is the population proportion of 1's for the response variable.\nIt must be > 0.") }) # REQUIRE TEST relogit with tau range ------------------------------------------ test_that('REQUIRE TEST relogit with tau range', { data(mid) expect_error(z.out <- zelig(conflict ~ major + contig + power + maxdem + mindem + years, data = mid, model = "relogit", tau = c(0.002, 0.005)), "tau must be a vector of length less than or equal to 1. For multiple taus, estimate models individually.") }) # REQUIRE TEST relogit works with predict -------------------------------------- test_that("REQUIRE TEST relogit works with predict", { data(mid) x <- zelig(conflict ~ major, data = mid, model = "relogit", tau = 1042/303772) x <- from_zelig_model(x) expect_warning(predict(x, newdata = mid[1, ]), NA) }) # REQUIRE TEST relogit follows ISQ (2001, eq. 11) ------------------------------ test_that("REQUIRE TEST relogit follows ISQ (2001, eq. 11)", { data(mid) z.out1 <- zelig(conflict ~ major + contig + power + maxdem + mindem + years, data = mid, model = "relogit", tau = 1042/303772, cite = FALSE, case.control = "weighting") expect_equal(round(coef(z.out1)[[2]], 6), 1.672177) expect_equal(colnames(summary(z.out1)$coefficients)[2], "Std. Error (robust)") vcov_z.out1 <- vcov(z.out1) z.out.vcov_not_robust <- z.out1 z.out.vcov_not_robust$robust.se <- FALSE expect_false(round(vcov_z.out1[[1]][1]) == round(vcov(z.out.vcov_not_robust)[[1]][1])) # Not adequately tested !!! z.out1 %>% setx() %>% sim() %>% plot() z.out.vcov_not_robust %>% setx() %>% sim() %>% plot() }) # REQUIRE TEST Odds Ratio summary ---------------------------------------------- test_that('REQUIRE TEST Odds Ratio summary', { data(mid) z.out1 <- zelig(conflict ~ major + contig + power + maxdem + mindem + years, data = mid, model = "relogit", tau = 1042/303772, cite = FALSE, case.control = "weighting") sum_weighting <- summary(z.out1, odds_ratios = FALSE) sum_or_weighting <- summary(z.out1, odds_ratios = TRUE) expect_false(sum_weighting$coefficients[1, 1] == sum_or_weighting$coefficients[1, 1]) expect_equal(colnames(sum_or_weighting$coefficients)[2], "Std. Error (OR, robust)") z.out2 <- zelig(conflict ~ major + contig + power + maxdem + mindem + years, data = mid, model = "relogit", tau = 1042/303772, cite = FALSE, case.control = "prior") sum_weighting2 <- summary(z.out2, odds_ratios = FALSE) sum_or_weighting2 <- summary(z.out2, odds_ratios = TRUE) expect_equal(colnames(sum_or_weighting2$coefficients)[2], "Std. Error (OR)") }) # REQUIRE TEST get_predict takes type = "response" ---------------------------- test_that('REQUIRE TEST get_predict takes type = "response"', { data(mid) z.out1 <- zelig(conflict ~ major + contig + power + maxdem + mindem + years, data = mid, model = "relogit", tau = 1042/303772) prob1 <- z.out1$get_predict(type = "response") expect_gt(min(sapply(prob1, min)), 0) prob2 <- predict(z.out1, type = "response") expect_gt(min(sapply(prob2, min)), 0) }) Zelig/tests/testthat/test-poissonsurvey.R0000644000176200001440000000043413754260262020406 0ustar liggesusers# REQUIRE TEST Monte Carlo test poissonsurvey --------------------------------------------- test_that('REQUIRE TEST poissonsurvey Monte Carlo', { set.seed("123") z <- zpoissonsurvey$new() test.poissonsurvey <- z$mcunit(plot = FALSE) expect_true(test.poissonsurvey) })Zelig/tests/testthat/test-logitsurvey.R0000644000176200001440000000040713754260262020032 0ustar liggesusers# REQUIRE TEST Monte Carlo test logitsurvey --------------------------------------------- test_that('REQUIRE TEST logitsurvey Monte Carlo', { z <- zlogitsurvey$new() test.logitsurvey <- z$mcunit(plot = FALSE, ci=0.99) expect_true(test.logitsurvey) })Zelig/tests/testthat/test-probitsurvey.R0000644000176200001440000000045413764734706020227 0ustar liggesusers# REQUIRE TEST Monte Carlo test probitsurvey --------------------------------------------- test_that('REQUIRE TEST probitsurvey Monte Carlo', { skip_on_cran() z <- zprobitsurvey$new() test.probitsurvey <- z$mcunit(minx = -1, maxx = 1, plot = FALSE) expect_true(test.probitsurvey) }) Zelig/tests/testthat/test-poissonbayes.R0000644000176200001440000000044113754260262020152 0ustar liggesusers# REQUIRE TEST Monte Carlo test poissonbayes --------------------------------------------- test_that('REQUIRE TEST poissonbayes Monte Carlo', { z <- zpoissonbayes$new() test.poissonbayes <- z$mcunit(minx=1, nsim = 2000, ci=0.99, plot = FALSE) expect_true(test.poissonbayes) })Zelig/tests/testthat/test-lognom.R0000755000176200001440000000015613754260262016735 0ustar liggesusersz <- zlognorm$new() test.lognorm <- z$mcunit(minx=0, ci=0.99, nsim=1000, plot=FALSE) expect_true(test.lognorm)Zelig/tests/testthat/test-logit.R0000755000176200001440000000176713754260262016571 0ustar liggesusers# REQUIRE TEST Monte Carlo test logit ------------------------------------------ test_that('REQUIRE TEST logit Monte Carlo', { z <- zlogit$new() test <- z$mcunit(minx = -2, maxx = 2, plot = FALSE) expect_true(test) }) # REQUIRE TEST logit example and show odds_ratios ------------------------------ test_that('REQUIRE TEST logit example and show odds_ratios', { data(turnout) z.out1 <- zelig(vote ~ age + race, model = "logit", data = turnout, cite = FALSE) betas <- coef(z.out1) ors <- summary(z.out1, odds_ratios = TRUE) ors <- ors$summ[[1]]$coefficients[1:3] expect_equal(exp(betas)[[1]], ors[1]) }) # REQUIRE TEST logit example and show odds_ratios ------------------------------ test_that('REQUIRE TEST logit to_zelig', { data(turnout) m1 <- glm(vote ~ age + race, family = binomial(link="logit"), data = turnout) m1_sims <- sim(setx(m1)) expect_equal(sort(unique(zelig_qi_to_df(m1_sims)$predicted_value)), c(0, 1)) }) Zelig/tests/testthat/test-normal.R0000644000176200001440000000037013754260262016725 0ustar liggesusers# REQUIRE TEST Monte Carlo test normal --------------------------------------------- test_that('REQUIRE TEST normal Monte Carlo', { set.seed(123) z <- znormal$new() test.normal <- z$mcunit(plot = FALSE) expect_true(test.normal) }) Zelig/tests/testthat/test-interface.R0000644000176200001440000001131013754260262017371 0ustar liggesusers# REQUIRE TEST from_zelig_model returns expected fitted model object ----------- test_that('REQUIRE TEST from_zelig_model returns expected fitted model object', { z5 <- zls$new() z5$zelig(Fertility ~ Education, data = swiss) expect_is(from_zelig_model(z5), class = 'lm') }) # REQUIRE TEST zelig_qi_to_df setx, setrange, by --------------- --------------- test_that('REQUIRE TEST zelig_qi_to_df setx, setrange, by', { #### QIs without first difference or range, from covariates fitted at ## central tendencies z.1 <- zelig(Petal.Width ~ Petal.Length + Species, data = iris, model = "ls") z.1 <- setx(z.1) expect_equal(names(zelig_setx_to_df(z.1)), c('Petal.Length', 'Species')) z.1 <- sim(z.1) expect_equal(nrow(zelig_qi_to_df(z.1)), 1000) #### QIs for first differences z.2 <- zelig(Petal.Width ~ Petal.Length + Species, data = iris, model = "ls") z.2a <- setx(z.2, Petal.Length = 2) z.2b <- setx(z.2, Petal.Length = 4.4) z.2 <- sim(z.2, x = z.2a, x1 = z.2a) z2_extracted <- zelig_qi_to_df(z.2) expect_equal(nrow(z2_extracted), 2000) expect_equal(names(z2_extracted), c("setx_value", "Petal.Length", "Species", "expected_value", "predicted_value")) #### QIs for first differences, estimated by Species z.3 <- zelig(Petal.Width ~ Petal.Length, by = "Species", data = iris, model = "ls") z.3a <- setx(z.3, Petal.Length = 2) z.3b <- setx(z.3, Petal.Length = 4.4) z.3 <- sim(z.3, x = z.3a, x1 = z.3a) expect_equal(nrow(zelig_qi_to_df(z.3)), 6000) #### QIs for a range of fitted values z.4 <- zelig(Petal.Width ~ Petal.Length + Species, data = iris, model = "ls") z.4 <- setx(z.4, Petal.Length = 2:4) z.4 <- sim(z.4) z4_extracted <- zelig_qi_to_df(z.4) expect_equal(nrow(z4_extracted), 3000) expect_is(z4_extracted, class = 'data.frame') #### QIs for a range of fitted values, estimated by Species z.5 <- zelig(Petal.Width ~ Petal.Length, by = "Species", data = iris, model = "ls") z.5 <- setx(z.5, Petal.Length = 2:4) z.5 <- sim(z.5) z5_extracted <- zelig_qi_to_df(z.5) expect_equal(nrow(z5_extracted), 9000) expect_equal(names(z5_extracted), c('setx_value', 'by', 'Petal.Length', 'expected_value', 'predicted_value')) #### QIs for two ranges of fitted values z.6 <- zelig(Petal.Width ~ Petal.Length + Species, data = iris, model = "ls") z.6a <- setx(z.6, Petal.Length = 2:4, Species = 'setosa') z.6b <- setx(z.6, Petal.Length = 2:4, Species = 'virginica') expect_equal(nrow(zelig_setx_to_df(z.6b)), 3) z.6 <- sim(z.6, x = z.6a, x1 = z.6b) expect_equal(nrow(zelig_qi_to_df(z.6)), 6000) }) # REQUIRE TEST zelig_qi_to_df multinomial outcome ------------------------------ test_that('REQUIRE TEST zelig_qi_to_df multinomial outcome', { library(dplyr) set.seed(123) data(mexico) sims1_setx <- zelig(vote88 ~ pristr + othcok + othsocok, model = "mlogit.bayes", data = mexico, verbose = FALSE) %>% setx() %>% sim() %>% zelig_qi_to_df() sims1_setrange <- zelig(vote88 ~ pristr + othcok + othsocok, model = "mlogit.bayes", data = mexico, verbose = FALSE) %>% setx(pristr = 1:3) %>% sim() %>% zelig_qi_to_df() expected_col_names <- c("setx_value", "pristr", "othcok", "othsocok", "expected_P(Y=1)", "expected_P(Y=2)", "expected_P(Y=3)", "predicted_value") expect_equal(names(sims1_setx), expected_col_names) expect_equal(names(sims1_setrange), expected_col_names) slimmed_setx <- qi_slimmer(sims1_setx, qi_type = "expected_P(Y=2)") expect_lt(slimmed_setx$qi_ci_median, 0.25) slimmed_setrange <- qi_slimmer(sims1_setrange, qi_type = "predicted_value") expected_sr_colnames <- c("setx_value", "pristr", "othcok", "othsocok", "predicted_proportion_(Y=1)", "predicted_proportion_(Y=2)", "predicted_proportion_(Y=3)") expect_equal(names(slimmed_setrange), expected_sr_colnames) }) # FAIL TEST to_zelig failure with unsupported model ---------------------------- test_that('FAIL TEST to_zelig failure with unsupported model', { x <- rnorm(100) y <- rpois(100, exp(1 + x)) m1 <- glm(y ~ x, family = quasi(variance = "mu", link = "log")) expect_error(setx(m1), "Not a Zelig object and not convertible to one.") expect_error(setx(x), "Not a Zelig object and not convertible to one.") }) Zelig/tests/testthat/test-utils.R0000644000176200001440000000560213762522270016577 0ustar liggesuserscontext('test-utils.R') test_that("REQUIRE TEST Median()", { input <- c(1, 2, 3) expected <- 2 actual <- Median(input) expect_equal(actual, expected) }) # REQUIRE TEST for to_zelig_mi ------------------------------------------------- # test_that('REQUIRE TEST for to_zelig_mi', { # set.seed(123) # n <- 100 # x1 <- runif(n) # x2 <- runif(n) # y <- rnorm(n) # data.1 <- data.frame(y = y, x = x1) # data.2 <- data.frame(y = y, x = x2) # mi.out <- to_zelig_mi(data.1, data.2) # z.out.mi <- zelig(y ~ x, model = "ls", data = mi.out) # expect_error(summary(z.out.mi), NA) # expect_equivalent(round(as.numeric(z.out.mi$get_coef()[[1]][2]), 3), 0.1) # expect_equivalent(round(as.numeric(combine_coef_se(z.out.mi)[[1]][1]), 3), # -0.122) # z.out.mi.boot <- zelig(y ~ x, model = "ls", data = mi.out, bootstrap = 20) # expect_equal(round(as.numeric(combine_coef_se(z.out.mi.boot)[[1]][1]), 3), # -0.094) # expect_error(z.out.log <- zelig(y ~ log(x), model = "ls", data = mi.out), # NA) # expect_error(z.out.log10 <- zelig(y ~ log(x, base = 10), model = "ls", # data = mi.out), NA) # }) # REQUIRE TEST for combine_coef_se for bootstrapped ---------------------------- # test_that('REQUIRE TEST for combine_coef_se for bootstrapped', { # set.seed(123) # n <- 100 # data.1 <- data.frame(y = rnorm(n), x = runif(n)) # z.out.boot <- zelig(y ~ x, model = "ls", data = data.1, bootstrap = 20) # expect_error(summary(z.out.boot), NA) # expect_equal(round(as.numeric(combine_coef_se(z.out.boot)[[1]][1]), 3), # 0.007) # summary(z.out.boot, bagging = TRUE) # expect_equal(round(as.numeric( # combine_coef_se(z.out.boot, bagging = TRUE)[[1]][1]), 3), # -0.052) # z5_ls <- zelig(Fertility ~ Education, model = "ls", data = swiss) # expect_equal(length(combine_coef_se(z5_ls)), 3) # }) # REQUIRE TEST for to_zelig_mi ------------------------------------------------- test_that('REQUIRE TEST for to_zelig_mi -- with list of data.frames', { set.seed(123) n <- 100 x1 <- runif(n) x2 <- runif(n) y <- rnorm(n) data.1 <- data.frame(y = y, x = x1) data.2 <- data.frame(y = y, x = x2) data_mi = list(data.1, data.2) mi.out <- to_zelig_mi(data_mi) z.out <- zelig(y ~ x, model = "ls", data = mi.out) expect_equivalent(round(as.numeric(z.out$get_coef()[[1]][2]), 3), 0.1) }) # FAIL TEST for to_zelig_mi ---------------------------------------------------- test_that('FAIL TESTS for to_zelig_mi', { x <- 100 expect_error(to_zelig_mi(x)) }) # FAIL TEST for or_summary ----------------------------------------------------- test_that("FAIL TEST for or_summary", { expect_error(or_summary(1:10), "obj must be of summary.glm class.") }) Zelig/tests/testthat/test-qislimmer.R0000644000176200001440000000260013754260262017435 0ustar liggesusers# REQUIRE TEST for qi_slimmer -------------------------------------------------- test_that('REQUIRE TEST for qi_slimmer', { qi.full.interval <- zelig(Petal.Width ~ Petal.Length + Species, data = iris, model = "ls") %>% setx(Petal.Length = 2:4, Species = "setosa") %>% sim() %>% zelig_qi_to_df() expect_equal(nrow(qi_slimmer(qi.full.interval)), 3) expect_equal(nrow(qi_slimmer(qi.full.interval, qi_type = 'pv')), 3) expect_equal(nrow(qi_slimmer(qi.full.interval, ci = 90)), 3) }) # FAIL TEST for qi_slimmer -------------------------------------------------- test_that('REQUIRE TEST for qi_slimmer', { qi.full.interval <- zelig(Petal.Width ~ Petal.Length + Species, data = iris, model = "ls") %>% setx(Petal.Length = 2:4, Species = "setosa") %>% sim() %>% zelig_qi_to_df() expect_error(qi_slimmer(qi.full.interval, qi_type = 'TEST')) expect_error(qi_slimmer(qi.full.interval, ci = 900), '900 will not produce a valid central interval.') z <- zelig(Petal.Width ~ Petal.Length + Species, data = iris, model = "ls") expect_error(qi_slimmer(z), 'df must be a data frame created by zelig_qi_to_df.') df_test <- data.frame(a = 1, b = 2) expect_error(qi_slimmer(df_test), 'The data frame does not appear to have been created by zelig_qi_to_df.') }) Zelig/tests/testthat/test-weibull.R0000644000176200001440000000045513754260262017104 0ustar liggesusers# REQUIRE TEST Monte Carlo weibull --------------------------------------------- test_that('REQUIRE TEST weibull Monte Carlo', { z <- zweibull$new() test.weibull<-z$mcunit(minx = 2, maxx = 3, nsim = 2000, alpha = 1.5, b0 = -1, b1 = 2, ci = 0.99, plot = FALSE) expect_true(test.weibull) })Zelig/tests/testthat/test-wrappers.R0000644000176200001440000000603713754260262017306 0ustar liggesusers# Zelig 4 ls wrapper working --------------------------------------------------- test_that('ls wrapper continuous covar -- quickstart (Zelig 4 syntax)', { z4 <- zelig(Fertility ~ Education, data = swiss, model = 'ls', cite = FALSE) # extract education coefficient parameter estimate and compare to reference expect_equivalent(round(as.numeric(z4$get_coef()[[1]][2]), 7), -0.8623503) }) # Test missing model argument error--------------------------------------------- test_that('missing model argument error', { expect_error(zelig(Fertility ~ Education, data = swiss), 'Estimation model type not specified.\nSelect estimation model type with the model argument.' ) }) # Test non-supported model type error ------------------------------------------ test_that('non-supported model type error', { expect_error(zelig(Fertility ~ Education, data = swiss, model = 'TEST'), 'TEST is not a supported model type' ) }) # REQUIRE TEST wrapper setx ---------------------------------------------------- test_that('REQUIRE TEST wrapper setx', { z4 <- zelig(Fertility ~ Education, data = swiss, model = 'ls') z4_set <- setx(z4) z4_set_vector <- round(as.vector(unlist(z4_set$setx.out))) expect_equivalent(z4_set_vector, c(1, 1, 11)) }) # REQUIRE TEST wrapper setx1 ---------------------------------------------------- test_that('REQUIRE TEST wrapper setx1', { zpipe <- zelig(Fertility ~ Education, data = swiss, model = 'ls') %>% setx(z4, Education = 10) %>% setx1(z4, Education = 30) %>% sim() expect_equal(length(zpipe$sim.out), 2) }) # FAIL TEST non-zelig objects -------------------------------------------------- test_that('setx and sim non-zelig object fail', { expect_error(setx('TEST'), 'Not a Zelig object and not convertible to one.') expect_error(sim('TEST'), 'Not a Zelig object.') }) # REQUIRE TEST sim wrapper minimal working -------------------------------------- test_that('REQUIRE TEST sim wraper minimal working', { z5 <- zls$new() z5 <- zelig(Fertility ~ Education, data = swiss, model = 'ls') set_x <- setx(z5, Education = 5) zsimwrap <- sim(z5, x = set_x, num = 10) expect_equal(length(zsimwrap$get_qi()), 10) expect_equal(length(zsimwrap$get_qi()), length(get_qi(zsimwrap))) z5$setx(Education = 5) zsimwrap <- sim(z5, num = 10) expect_equal(length(zsimwrap$get_qi()), 10) }) # REQUIRE TEST ATT wrapper ----------------------------------------------------- test_that('REQUIRE TEST ATT wrapper', { data(sanction) # no wrapper zqi.out <- zelig(num ~ target + coop + mil, model = "poisson", data = sanction) zqi.out$ATT(treatment = "mil") my.att <- zqi.out$get_qi(qi = "ATT", xvalue = "TE") # with wrapper library(dplyr) z.att <- zelig(num ~ target + coop + mil, model = "poisson", data = sanction) %>% ATT(treatment = "mil") %>% get_qi(qi = "ATT", xvalue = "TE") expect_equal(length(my.att), length(z.att)) }) Zelig/tests/testthat/test-normal-gee.R0000644000176200001440000000272713754260262017473 0ustar liggesusers# REQUIRE TEST normal.gee with . formula --------------------------------------- test_that('REQUIRE TEST normal.gee with . formula', { # test initially created by @andreashandel library(dplyr) # make some fake cluster ID mtcars$myid = sample(1:10, size = nrow(mtcars), replace = TRUE) # sort by cluster ID mydata <- mtcars %>% dplyr::arrange(myid) m1 <- geepack::geeglm(formula = mpg ~ ., family = gaussian, data = mydata, id = mydata$myid) #this works z1 <- zelig(formula = mpg ~ ., model = "normal.gee", id = "myid", data = mydata) expect_equal(coef(m1), coef(z1)) z.set <- setx(z1) z.sim <- sim(z.set) expect_equal(nrow(zelig_qi_to_df(z.sim)), 1000) }) # REQUIRE TEST normal.gee with multiply imputed data --------------------------- test_that('REQUIRE TEST normal.gee with . formula', { # test initially created by @andreashandel library(dplyr) # make some fake cluster ID mtcars$myid = sample(1:10, size = nrow(mtcars), replace = TRUE) # sort by cluster ID mydata1 <- mtcars %>% dplyr::arrange(myid) %>% as.data.frame mydata2 = mydata1 # create MI data mydata_mi <- to_zelig_mi(mydata1, mydata2) zmi <- zelig(formula = mpg ~ cyl + disp, model = "normal.gee", id = "myid", data = mydata_mi) expect_error(summary(zmi), NA) z.set <- setx(zmi) z.sim <- sim(z.set) expect_equal(nrow(zelig_qi_to_df(z.sim)), 1000) }) Zelig/tests/testthat/test-poisson.R0000644000176200001440000000221213754260262017124 0ustar liggesusers# REQUIRE TEST Monte Carlo poisson --------------------------------------------- test_that('REQUIRE TEST Monte Carlo poisson', { set.seed("123") z <- zpoisson$new() test.poisson <- z$mcunit(minx = 0, plot = FALSE) expect_true(test.poisson) }) # REQUIRE TEST poisson example ------------------------------------------------- test_that('REQUIRE TEST poisson example', { data(sanction) z.out <- zelig(num ~ target + coop, model = "poisson", data = sanction) x.out <- setx(z.out) s.out <- sim(z.out, x = x.out) expect_error(s.out$graph(), NA) }) # REQUIRE TEST poisson get_pvalue ------------------------------------------------- test_that('REQUIRE TEST poisson example', { data(sanction) z.out <- zelig(num ~ target + coop, model = "poisson", data = sanction) expect_error(z.out$get_pvalue(), NA) }) # REQUIRE TEST poisson to_zelig ------------------------------------------------- test_that('REQUIRE TEST poisson example', { data(sanction) m1 <- glm(num ~ target + coop, family = poisson("log"), data = sanction) zset <- setx(m1, target = 2) expect_equal(zset$setx.out$x$mm[[1]][2], 2) }) Zelig/tests/testthat/test-ivreg.R0000644000176200001440000000562213754260262016556 0ustar liggesusers# REQUIRE TEST ivreg Monte Carlo ----------------------------------------------- #test_that("REQUIRE Test ivreg Monte Carlo", { # z <- zivreg$new() # test.ivreg <- z$mcunit(plot = FALSE) # expect_true(test.ivreg) #}) # REQUIRE TEST ivreg AER example with log transformations ---------------------- test_that("REQUIRE TEST ivreg AER example with log transformations", { library(AER) # Example from AER (version 1.2-5) documentation data("CigarettesSW") CigarettesSW$rprice <- with(CigarettesSW, price/cpi) CigarettesSW$rincome <- with(CigarettesSW, income/population/cpi) CigarettesSW$tdiff <- with(CigarettesSW, (taxs - tax)/cpi) CigarettesSW1995 <- subset(CigarettesSW, year == 1995) # Unwrapped fm <- ivreg(log(packs) ~ log(rprice) + log(rincome) | log(rincome) + tdiff + I(tax/cpi), data = CigarettesSW1995) # Zelig wrapped CigarettesSW1995$log_rprice <- log(CigarettesSW1995$rprice) CigarettesSW1995$log_rincome <- log(CigarettesSW1995$rincome) ziv.out <- zelig(log(packs) ~ log_rprice + log_rincome | log_rincome + tdiff + I(tax/cpi), data = CigarettesSW1995, model = 'ivreg') expect_equal(coef(fm)[[2]], coef(ziv.out)[[2]]) expect_equivalent(vcov(fm), vcov(ziv.out)[[1]]) }) # REQUIRE TEST ivreg setx and sim ---------------------------------------------- test_that("REQUIRE TEST ivreg setx", { data("CigarettesSW") CigarettesSW$rprice <- with(CigarettesSW, price/cpi) CigarettesSW$rincome <- with(CigarettesSW, income/population/cpi) CigarettesSW$tdiff <- with(CigarettesSW, (taxs - tax)/cpi) CigarettesSW1995 <- subset(CigarettesSW, year == 1995) CigarettesSW1995$log_rprice <- log(CigarettesSW1995$rprice) CigarettesSW1995$log_rincome <- log(CigarettesSW1995$rincome) ziv.out <- zelig(log(packs) ~ log_rprice + log_rincome | log_rincome + tdiff + I(tax/cpi), data = CigarettesSW1995, model = 'ivreg') ziv.set <- setx(ziv.out, log_rprice = log(95:118)) expect_equal(length(ziv.set$setx.out$range), 24) expect_error(sim(ziv.set), NA) expect_error(plot(sim(ziv.set)), NA) }) # FAIL TEST ivreg with 2nd stage covariates logged in zelig call --------------- test_that("FAIL TEST ivreg with 2nd stage covariates logged in zelig call", { data("CigarettesSW") CigarettesSW$rprice <- with(CigarettesSW, price/cpi) CigarettesSW$rincome <- with(CigarettesSW, income/population/cpi) CigarettesSW$tdiff <- with(CigarettesSW, (taxs - tax)/cpi) CigarettesSW1995 <- subset(CigarettesSW, year == 1995) expect_error( ziv.out <- zelig(log(packs) ~ log(rprice) + log(rincome) | log(rincome) + tdiff + I(tax/cpi), data = CigarettesSW1995, model = 'ivreg'), "logging values in the zelig call is not currently supported for ivreg models." ) }) Zelig/tests/testthat.R0000755000176200001440000000016213762522270014461 0ustar liggesuserslibrary(AER) library(dplyr) library(geepack) library(survey) library(testthat) set.seed(123) test_check("Zelig") Zelig/R/0000755000176200001440000000000013764425626011544 5ustar liggesusersZelig/R/model-oprobit-bayes.R0000644000176200001440000001543113754260262015540 0ustar liggesusers#' Bayesian Ordered Probit Regression #' @param formula a symbolic representation of the model to be #' estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the #' dependent variable and \code{x1} and \code{x2} are the explanatory #' variables, and \code{y}, \code{x1}, and \code{x2} are contained in the #' same dataset. (You may include more than two explanatory variables, #' of course.) The \code{+} symbol means ``inclusion'' not #' ``addition.'' You may also include interaction terms and main #' effects in the form \code{x1*x2} without computing them in prior #' steps; \code{I(x1*x2)} to include only the interaction term and #' exclude the main effects; and quadratic terms in the form #' \code{I(x1^2)}. #'@param model the name of a statistical model to estimate. #' For a list of other supported models and their documentation see: #' \url{http://docs.zeligproject.org/articles/}. #'@param data the name of a data frame containing the variables #' referenced in the formula or a list of multiply imputed data frames #' each having the same variable names and row numbers (created by #' \code{Amelia} or \code{\link{to_zelig_mi}}). #'@param ... additional arguments passed to \code{zelig}, #' relevant for the model to be estimated. #'@param by a factor variable contained in \code{data}. If supplied, #' \code{zelig} will subset #' the data frame based on the levels in the \code{by} variable, and #' estimate a model for each subset. This can save a considerable amount of #' effort. You may also use \code{by} to run models using MatchIt #' subclasses. #'@param cite If is set to 'TRUE' (default), the model citation will be printed #' to the console. #' #'@details #' Additional parameters avaialable to many models include: #' \itemize{ #' \item \code{weights}: vector of weight values or a name of a variable in the dataset #' by which to weight the model. For more information see: #' \url{http://docs.zeligproject.org/articles/weights.html}. #' \item \code{burnin}: number of the initial MCMC iterations to be discarded (defaults to 1,000). #' \item \code{mcmc}: number of the MCMC iterations after burnin (defaults to 10,000). #' \item \code{thin}: thinning interval for the Markov chain. Only every thin-th draw from #' the Markov chain is kept. The value of mcmc must be divisible by this value. The default #' value is 1. #' \item \code{verbose}: defaults to FALSE. If TRUE, the progress of the sampler (every 10\%) #' is printed to the screen. #' \item \code{seed}: seed for the random number generator. The default is \code{NA} which #' corresponds to a random seed of 12345. #' \item \code{beta.start}: starting values for the Markov chain, either a scalar or vector #' with length equal to the number of estimated coefficients. The default is \code{NA}, such #' that the maximum likelihood estimates are used as the starting values. #' } #' Use the following parameters to specify the model's priors: #' \itemize{ #' \item \code{b0}: prior mean for the coefficients, either a numeric vector or a #' scalar. If a scalar value, that value will be the prior mean for all the #' coefficients. The default is 0. #' \item \code{B0}: prior precision parameter for the coefficients, either a #' square matrix (with the dimensions equal to the number of the coefficients) or #' a scalar. If a scalar value, that value times an identity matrix will be the #' prior precision parameter. The default is 0, which leads to an improper prior. #' } #' @return Depending on the class of model selected, \code{zelig} will return #' an object with elements including \code{coefficients}, \code{residuals}, #' and \code{formula} which may be summarized using #' \code{summary(z.out)} or individually extracted using, for example, #' \code{coef(z.out)}. See #' \url{http://docs.zeligproject.org/articles/getters.html} for a list of #' functions to extract model components. You can also extract whole fitted #' model objects using \code{\link{from_zelig_model}}. #' #' Vignette: \url{http://docs.zeligproject.org/articles/zelig_oprobitbayes.html} #' @import methods #' @export Zelig-oprobit-bayes #' @exportClass Zelig-oprobit-bayes #' #' @include model-zelig.R #' @include model-bayes.R zoprobitbayes <- setRefClass("Zelig-oprobit-bayes", contains = c("Zelig-bayes")) zoprobitbayes$methods( initialize = function() { callSuper() .self$name <- "oprobit-bayes" .self$year <- 2013 .self$category <- "discrete" .self$authors <- "Ben Goodrich, Ying Lu" .self$description = "Bayesian Probit Regression for Dichotomous Dependent Variables" .self$fn <- quote(MCMCpack::MCMCoprobit) # JSON from parent .self$wrapper <- "oprobit.bayes" } ) zoprobitbayes$methods( param = function(z.out) { mysimparam <- callSuper(z.out) # Produce the model matrix in order to get all terms (explicit and implicit) # from the regression model. mat <- model.matrix(.self$formula, data = .self$data) # Response Terms p <- ncol(mat) # All coefficients coefficients <- mysimparam # Coefficients for predictor variables beta <- coefficients[, 1:p] # Middle values of "gamma" matrix mid.gamma <- coefficients[, -(1:p)] # ... level <- ncol(coefficients) - p + 2 # Initialize the "gamma" parameters gamma <- matrix(NA, nrow(coefficients), level + 1) # The first, second and last values are fixed gamma[, 1] <- -Inf gamma[, 2] <- 0 gamma[, ncol(gamma)] <- Inf # All others are determined by the coef-matrix (now stored in mid.gamma) if (ncol(gamma) > 3) gamma[, 3:(ncol(gamma) - 1)] <- mid.gamma # return mysimparam <- list(simparam = beta, simalpha = gamma) return(mysimparam) } ) zoprobitbayes$methods( qi = function(simparam, mm) { beta <- simparam$simparam gamma <- simparam$simalpha labels <- levels(model.response(model.frame(.self$formula, data = .self$data))) # x is implicitly cast into a matrix eta <- beta %*% t(mm) # **TODO: Sort out sizes of matrices for these things. ev <- array(NA, c(nrow(eta), ncol(gamma) - 1, ncol(eta))) pv <- matrix(NA, nrow(eta), ncol(eta)) # Compute Expected Values # *********************** # Note that the inverse link function is: # pnorm(gamma[, j+1]-eta) - pnorm(gamma[, j]-eta) for (j in 1:(ncol(gamma) - 1)) { ev[, j, ] <- pnorm(gamma[, j + 1] - eta) - pnorm(gamma[, j] - eta) } colnames(ev) <- labels # Compute Predicted Values # ************************ for (j in 1:nrow(pv)) { mu <- eta[j, ] pv[j, ] <- as.character(cut(mu, gamma[j, ], labels = labels)) } pv <- as.factor(pv) # **TODO: Update summarize to work with at most 3-dimensional arrays ev <- ev[, , 1] return(list(ev = ev, pv = pv)) } ) Zelig/R/model-binchoice-survey.R0000644000176200001440000000115513754260262016235 0ustar liggesusers#' Object for Binary Choice outcomes with Survey Weights #' for inheritance across models in Zelig #' #' @import methods #' @export Zelig-binchoice-survey #' @exportClass Zelig-binchoice-survey #' #' @include model-zelig.R #' @include model-binchoice.R #' @include model-survey.R zbinchoicesurvey <- setRefClass("Zelig-binchoice-survey", contains = c("Zelig-survey", "Zelig-binchoice")) zbinchoicesurvey$methods( initialize = function() { callSuper() .self$family <- "binomial" .self$category <- "continuous" # JSON from parent } ) Zelig/R/model-poisson-bayes.R0000644000176200001440000001310013754260262015543 0ustar liggesusers#' Bayesian Poisson Regression #' #' @param formula a symbolic representation of the model to be #' estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the #' dependent variable and \code{x1} and \code{x2} are the explanatory #' variables, and \code{y}, \code{x1}, and \code{x2} are contained in the #' same dataset. (You may include more than two explanatory variables, #' of course.) The \code{+} symbol means ``inclusion'' not #' ``addition.'' You may also include interaction terms and main #' effects in the form \code{x1*x2} without computing them in prior #' steps; \code{I(x1*x2)} to include only the interaction term and #' exclude the main effects; and quadratic terms in the form #' \code{I(x1^2)}. #' @param model the name of a statistical model to estimate. #' For a list of other supported models and their documentation see: #' \url{http://docs.zeligproject.org/articles/}. #' @param data the name of a data frame containing the variables #' referenced in the formula or a list of multiply imputed data frames #' each having the same variable names and row numbers (created by #' \code{Amelia} or \code{\link{to_zelig_mi}}). #' @param ... additional arguments passed to \code{zelig}, #' relevant for the model to be estimated. #' @param by a factor variable contained in \code{data}. If supplied, #' \code{zelig} will subset #' the data frame based on the levels in the \code{by} variable, and #' estimate a model for each subset. This can save a considerable amount of #' effort. You may also use \code{by} to run models using MatchIt #' subclasses. #' @param cite If is set to 'TRUE' (default), the model citation will be printed #' to the console. #' @examples #' data(sanction) #' z.out <- zelig(num ~ target + coop, model = "poisson.bayes",data = sanction, verbose = FALSE) #' #' @details #' Additional parameters avaialable to this model include: #' \itemize{ #' \item \code{weights}: vector of weight values or a name of a variable in the dataset #' by which to weight the model. For more information see: #' \url{http://docs.zeligproject.org/articles/weights.html}. #' \item \code{burnin}: number of the initial MCMC iterations to be discarded (defaults to 1,000). #' \item \code{mcmc}: number of the MCMC iterations after burnin (defaults to 10,000). #' \item \code{tune}: Metropolis tuning parameter, either a positive scalar or a vector of length #' kk, where kk is the number of coefficients. The tuning parameter should be set such that the #' acceptance rate of the Metropolis algorithm is satisfactory (typically between 0.20 and 0.5). #' The default value is 1.1. #' \item \code{thin}: thinning interval for the Markov chain. Only every thin-th draw from the #' Markov chain is kept. The value of mcmc must be divisible by this value. The default value is 1. #' \item \code{verbose}: defaults to FALSE. If TRUE, the progress of the sampler (every 10\%) is #' printed to the screen. #' \item \code{seed}: seed for the random number generator. The default is \code{NA} which #' corresponds to a random seed of 12345. #' \item \code{beta.start}: starting values for the Markov chain, either a scalar or vector #' with length equal to the number of estimated coefficients. The default is \code{NA}, such that the maximum likelihood estimates are used as the starting values. #' } #' Use the following parameters to specify the model's priors: #' \itemize{ #' \item \code{b0}: prior mean for the coefficients, either a numeric vector or a scalar. #' If a scalar value, that value will be the prior mean for all the coefficients. #' The default is 0. #' \item \code{B0}: prior precision parameter for the coefficients, either a square matrix #' (with the dimensions equal to the number of the coefficients) or a scalar. #' If a scalar value, that value times an identity matrix will be the prior precision parameter. #' The default is 0, which leads to an improper prior. #' } #' @return Depending on the class of model selected, \code{zelig} will return #' an object with elements including \code{coefficients}, \code{residuals}, #' and \code{formula} which may be summarized using #' \code{summary(z.out)} or individually extracted using, for example, #' \code{coef(z.out)}. See #' \url{http://docs.zeligproject.org/articles/getters.html} for a list of #' functions to extract model components. You can also extract whole fitted #' model objects using \code{\link{from_zelig_model}}. #' #' #' @seealso Vignette: \url{http://docs.zeligproject.org/articles/zelig_poissonbayes.html} #' @import methods #' @export Zelig-poisson-bayes #' @exportClass Zelig-poisson-bayes #' #' @include model-zelig.R #' @include model-bayes.R #' @include model-poisson.R zpoissonbayes <- setRefClass("Zelig-poisson-bayes", contains = c("Zelig-bayes", "Zelig-poisson")) zpoissonbayes$methods( initialize = function() { callSuper() .self$name <- "poisson-bayes" .self$family <- "poisson" .self$link <- "log" .self$linkinv <- eval(call(.self$family, .self$link))$linkinv .self$year <- 2013 .self$category <- "continuous" .self$authors <- "Ben Goodrich, Ying Lu" .self$description = "Bayesian Poisson Regression" .self$fn <- quote(MCMCpack::MCMCpoisson) # JSON from parent .self$wrapper <- "poisson.bayes" } ) zpoissonbayes$methods( mcfun = function(x, b0=0, b1=1, ..., sim=TRUE){ lambda <- exp(b0 + b1 * x) if(sim){ y <- rpois(n=length(x), lambda=lambda) return(y) }else{ return(lambda) } } ) Zelig/R/create-json.R0000755000176200001440000001203513754260262014075 0ustar liggesusers#' @include utils.R #' @include model-zelig.R #' @include model-ls.R #' @include model-glm.R #' @include model-ivreg.R #' @include model-binchoice.R #' @include model-logit.R #' @include model-probit.R #' @include model-poisson.R #' @include model-normal.R #' @include model-gamma.R #' @include model-negbinom.R #' @include model-exp.R #' @include model-lognorm.R #' @include model-tobit.R #' @include model-quantile.R #' @include model-relogit.R #' @include model-gee.R #' @include model-binchoice-gee.R #' @include model-logit-gee.R #' @include model-probit-gee.R #' @include model-gamma-gee.R #' @include model-normal-gee.R #' @include model-poisson-gee.R #' @include model-bayes.R #' @include model-factor-bayes.R #' @include model-logit-bayes.R #' @include model-mlogit-bayes.R #' @include model-normal-bayes.R #' @include model-oprobit-bayes.R #' @include model-poisson-bayes.R #' @include model-probit-bayes.R #' @include model-tobit-bayes.R #' @include model-weibull.R #' @include model-timeseries.R #' @include model-arima.R #' @include model-ar.R #' @include model-ma.R #library(jsonlite) createJSON <- function(movefile = TRUE){ z5ls <- zls$new() z5ls$toJSON() z5logit <- zlogit$new() z5logit$toJSON() z5ivreg <- zivreg$new() z5ivreg$toJSON() z5probit <- zprobit$new() z5probit$toJSON() z5poisson <- zpoisson$new() z5poisson$toJSON() z5normal <- znormal$new() z5normal$toJSON() z5gamma <- zgamma$new() z5gamma$toJSON() z5negbin <- znegbin$new() z5negbin$toJSON() z5exp <- zexp$new() z5exp$toJSON() z5lognorm <- zlognorm$new() z5lognorm$toJSON() z5tobit <- ztobit$new() z5tobit$toJSON() z5quantile <- zquantile$new() z5quantile$toJSON() z5relogit <- zrelogit$new() z5relogit$toJSON() z5logitgee <- zlogitgee$new() z5logitgee$toJSON() z5probitgee <- zprobitgee$new() z5probitgee$toJSON() z5gammagee <- zgammagee$new() z5gammagee$toJSON() z5normalgee <- znormalgee$new() z5normalgee$toJSON() z5poissongee <- zpoissongee$new() z5poissongee$toJSON() z5factorbayes <- zfactorbayes$new() z5factorbayes$toJSON() z5logitbayes <- zlogitbayes$new() z5logitbayes$toJSON() z5mlogitbayes <- zmlogitbayes$new() z5mlogitbayes$toJSON() z5normalbayes <- znormalbayes$new() z5normalbayes$toJSON() z5oprobitbayes <- zoprobitbayes$new() z5oprobitbayes$toJSON() z5poissonbayes <- zpoissonbayes$new() z5poissonbayes$toJSON() z5probitbayes <- zprobitbayes$new() z5probitbayes$toJSON() z5tobitbayes <- ztobitbayes$new() z5tobitbayes$toJSON() z5weibull <- zweibull$new() z5weibull$toJSON() z5logitsurvey <- zlogitsurvey$new() z5logitsurvey$toJSON() z5probitsurvey <- zprobitsurvey$new() z5probitsurvey$toJSON() z5gammasurvey <- zgammasurvey$new() z5gammasurvey$toJSON() z5normalsurvey <- znormalsurvey$new() z5normalsurvey$toJSON() z5poissonsurvey <- zpoissonsurvey$new() z5poissonsurvey$toJSON() z5arima <- zarima$new() z5arima$toJSON() z5ar <- zar$new() z5ar$toJSON() z5ma <- zma$new() z5ma$toJSON() zeligmodels <- list(zelig5models = list( "ls" = z5ls$ljson, "ivreg" = z5ivreg$ljson, "logit" = z5logit$ljson, "probit" = z5probit$ljson, "poisson" = z5poisson$ljson, "normal" = z5normal$ljson, "gamma" = z5gamma$ljson, "negbin" = z5negbin$ljson, "exp" = z5exp$ljson, "lognorm" = z5lognorm$ljson, "tobit" = z5tobit$ljson, "quantile" = z5quantile$ljson, "relogit" = z5relogit$ljson, "logitgee" = z5logitgee$ljson, "probitgee" = z5probitgee$ljson, "gammagee" = z5gammagee$ljson, "normalgee" = z5normalgee$ljson, "poissongee" = z5poissongee$ljson, "factorbayes" = z5factorbayes$ljson, "logitbayes" = z5logitbayes$ljson, "mlogitbayes" = z5mlogitbayes$ljson, "normalbayes" = z5normalbayes$ljson, "oprobitbayes" = z5oprobitbayes$ljson, "poissonbayes" = z5poissonbayes$ljson, "probitbayes" = z5probitbayes$ljson, "tobitbayes" = z5tobitbayes$ljson, "weibull" = z5weibull$ljson, "logitsurvey" = z5logitsurvey$ljson, "probitsurvey" = z5probitsurvey$ljson, "normalsurvey" = z5normalsurvey$ljson, "gammasurvey" = z5gammasurvey$ljson, "poissonsurvey" = z5poissonsurvey$ljson, "arima" = z5arima$ljson, "ma" = z5ma$ljson, "ar" = z5ar$ljson)) cat(toJSON(zeligmodels, pretty = TRUE), "\n", file = file.path("zelig5models.json")) if (movefile){ file.rename(from = file.path("zelig5models.json"), to = file.path("inst", "JSON", "zelig5models.json")) } return(TRUE) } Zelig/R/model-ivreg.R0000644000176200001440000002125113754260262014072 0ustar liggesusers#' Instrumental-Variable Regression #'@param formula a symbolic representation of the model to be #' estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the #' dependent variable and \code{x1} and \code{x2} are the explanatory #' variables, and \code{y}, \code{x1}, and \code{x2} are contained in the #' same dataset. (You may include more than two explanatory variables, #' of course.) The \code{+} symbol means ``inclusion'' not #' ``addition.'' You may also include interaction terms and main #' effects in the form \code{x1*x2} without computing them in prior #' steps; \code{I(x1*x2)} to include only the interaction term and #' exclude the main effects; and quadratic terms in the form #' \code{I(x1^2)}. #'@param model the name of a statistical model to estimate. #' For a list of other supported models and their documentation see: #' \url{http://docs.zeligproject.org/articles/}. #'@param data the name of a data frame containing the variables #' referenced in the formula or a list of multiply imputed data frames #' each having the same variable names and row numbers (created by #' \code{Amelia} or \code{\link{to_zelig_mi}}). #'@param ... additional arguments passed to \code{zelig}, #' relevant for the model to be estimated. #'@param by a factor variable contained in \code{data}. If supplied, #' \code{zelig} will subset #' the data frame based on the levels in the \code{by} variable, and #' estimate a model for each subset. This can save a considerable amount of #' effort. You may also use \code{by} to run models using MatchIt #' subclasses. #'@param cite If is set to 'TRUE' (default), the model citation will be printed #' to the console. #' #'@details #' Additional parameters avaialable to many models include: #' \itemize{ #' \item weights: vector of weight values or a name of a variable in the dataset #' by which to weight the model. For more information see: #' \url{http://docs.zeligproject.org/articles/weights.html}. #' \item bootstrap: logical or numeric. If \code{FALSE} don't use bootstraps to #' robustly estimate uncertainty around model parameters due to sampling error. #' If an integer is supplied, the number of boostraps to run. #' For more information see: #' \url{http://docs.zeligproject.org/articles/bootstraps.html}. #' } #' @return Depending on the class of model selected, \code{zelig} will return #' an object with elements including \code{coefficients}, \code{residuals}, #' and \code{formula} which may be summarized using #' \code{summary(z.out)} or individually extracted using, for example, #' \code{coef(z.out)}. See #' \url{http://docs.zeligproject.org/articles/getters.html} for a list of #' functions to extract model components. You can also extract whole fitted #' model objects using \code{\link{from_zelig_model}}. #' #' #' #' @examples #' library(Zelig) #' library(dplyr) # for the pipe operator %>% #' # load and transform data #' data("CigarettesSW") #' CigarettesSW$rprice <- with(CigarettesSW, price/cpi) #' CigarettesSW$rincome <- with(CigarettesSW, income/population/cpi) #' CigarettesSW$tdiff <- with(CigarettesSW, (taxs - tax)/cpi) #' # log second stage independent variables, as logging internally for ivreg is #' # not currently supported #' CigarettesSW$log_rprice <- log(CigarettesSW$rprice) #' CigarettesSW$log_rincome <- log(CigarettesSW$rincome) #' z.out1 <- zelig(log(packs) ~ log_rprice + log_rincome | #' log_rincome + tdiff + I(tax/cpi),data = CigarettesSW, subset = year == "1995",model = "ivreg") #' summary(z.out1) #' @seealso Vignette: \url{http://docs.zeligproject.org/articles/zelig_ivreg.html} #' Fit instrumental-variable regression by two-stage least squares. This is #' equivalent to direct instrumental-variables estimation when the number of #' instruments is equal to the number of predictors. #' #' @param formula specification(s) of the regression relationship #' @param instruments the instruments. Either `instruments` is missing and #' formula has three parts as in `y ~ x1 + x2 | z1 + z2 + z3` (recommended) or #' formula is `y ~ x1 + x2` and instruments is a one-sided formula #' `~ z1 + z2 + z3`. Using `instruments` is not recommended with `zelig`. # @param an optional list. See the `contrasts.arg` of # \code{\link{model.matrix.default}}. #' @param model,x,y logicals. If `TRUE` the corresponding components of the fit #' (the model frame, the model matrices , the response) are returned. #' @param ... further arguments passed to methods. See also \code{\link{zelig}}. #' #' @details Regressors and instruments for `ivreg` are most easily specified in #' a formula with two parts on the right-hand side, e.g., #' `y ~ x1 + x2 | z1 + z2 + z3`, where `x1` and `x2` are the regressors and #' `z1`, `z2`, and `z3` are the instruments. Note that exogenous regressors #' have to be included as instruments for themselves. For example, if there is #' one exogenous regressor `ex` and one endogenous regressor `en` with #' instrument `in`, the appropriate formula would be `y ~ ex + en | ex + in`. #' Equivalently, this can be specified as `y ~ ex + en | . - en + in`, i.e., #' by providing an update formula with a `.` in the second part of the #' formula. The latter is typically more convenient, if there is a large #' number of exogenous regressors. #' #' @examples #' library(Zelig) #' library(AER) # for sandwich vcov #' library(dplyr) # for the pipe operator %>% #' #' # load and transform data #' data("CigarettesSW") #' CigarettesSW$rprice <- with(CigarettesSW, price/cpi) #' CigarettesSW$rincome <- with(CigarettesSW, income/population/cpi) #' CigarettesSW$tdiff <- with(CigarettesSW, (taxs - tax)/cpi) #' #' # log second stage independent variables, as logging internally for ivreg is #' # not currently supported #' CigarettesSW$log_rprice <- log(CigarettesSW$rprice) #' CigarettesSW$log_rincome <- log(CigarettesSW$rincome) #' #' # estimate model #' z.out1 <- zelig(log(packs) ~ log_rprice + log_rincome | #' log_rincome + tdiff + I(tax/cpi), #' data = CigarettesSW, #' model = "ivreg") #' summary(z.out1) #' #' @source `ivreg` is from Christian Kleiber and Achim Zeileis (2008). Applied #' Econometrics with R. New York: Springer-Verlag. ISBN 978-0-387-77316-2. URL #' #' #' @seealso \code{\link{zelig}}, #' Greene, W. H. (1993) *Econometric Analysis*, 2nd ed., Macmillan. #' #' @md #' @import methods #' @export Zelig-ivreg #' @exportClass Zelig-ivreg #' #' @include model-zelig.R zivreg <- setRefClass("Zelig-ivreg", contains = "Zelig") zivreg$methods( initialize = function() { callSuper() .self$name <- "ivreg" .self$authors <- "Christopher Gandrud" .self$packageauthors <- "Christian Kleiber and Achim Zeileis" .self$year <- 2008 .self$description <- "Instrumental-Variable Regression" .self$fn <- quote(AER::ivreg) # JSON .self$outcome <- "continous" .self$wrapper <- "ivreg" .self$acceptweights <- TRUE } ) zivreg$methods( zelig = function(formula, data, ..., weights = NULL, by = NULL, bootstrap = FALSE) { .self$zelig.call <- match.call(expand.dots = TRUE) .self$model.call <- .self$zelig.call callSuper(formula = formula, data = data, ..., weights = weights, by = by, bootstrap = bootstrap) # Automated Background Test Statistics and Criteria rse <- lapply(.self$zelig.out$z.out, (function(x) vcovHC(x, type = "HC0"))) rse.se <- sqrt(diag(rse[[1]])) # Needs to work with "by" argument est.se <- sqrt(diag(.self$get_vcov()[[1]])) } ) zivreg$methods( param = function(z.out, method = "mvn") { if(identical(method,"mvn")){ return(list(simparam = mvrnorm(.self$num, coef(z.out), vcov(z.out)), simalpha = rep(summary(z.out)$sigma, .self$num) ) ) } else if(identical(method, "point")){ return(list(simparam = t(as.matrix(coef(z.out))), simalpha = summary(z.out)$sigma)) } else { stop("param called with method argument of undefined type.") } } ) zivreg$methods( qi = function(simparam, mm) { ev <- simparam$simparam %*% t(mm) pv <- as.matrix(rnorm(n = length(ev), mean = ev, sd = simparam$simalpha), nrow = length(ev), ncol = 1) return(list(ev = ev, pv = pv)) } ) #zivreg$methods( # mcfun = function(z, h, b0 = 0, b1 = 1, alpha = 1, sim = TRUE){ # x <- b0 + 2*z + 3*h + sim * rnorm(n = length(z), sd = alpha + 1) # y <- b0 + b1*x + sim * rnorm(n = length(z), sd = alpha) # yx <- list(y, x) # return(yx) # } #) Zelig/R/model-gee.R0000755000176200001440000000501013754260262013514 0ustar liggesusers#' Generalized Estimating Equations Model object for inheritance across models in Zelig #' #' @import methods #' @export Zelig-gee #' @exportClass Zelig-gee #' #' @include model-zelig.R zgee <- setRefClass("Zelig-gee", contains = "Zelig") zgee$methods( initialize = function() { callSuper() .self$packageauthors <- "Soren Hojsgaard, Ulrich Halekoh, and Jun Yan" .self$modelauthors <- "Patrick Lam" .self$acceptweights <- TRUE } ) zgee$methods( zelig = function(formula, id, ..., zcor = NULL, corstr = "independence", data, weights = NULL, by = NULL, bootstrap = FALSE) { localData <- data # avoids CRAN warning about deep assignment from formula existing separately as argument and field .self$zelig.call <- match.call(expand.dots = TRUE) .self$model.call <- .self$zelig.call if (corstr == "fixed" && is.null(zcor)) stop("R must be defined") # if id is a valid column-name in data, then we just need to extract the # column and re-order the data.frame and cluster information if (is.character(id) && length(id) == 1 && id %in% colnames(localData)) { id <- localData[, id] localData <- localData[order(id), ] id <- sort(id) } .self$model.call$family <- call(.self$family, .self$link) .self$model.call$id <- id .self$model.call$zcor <- zcor .self$model.call$corstr <- corstr callSuper(formula = formula, data = localData, ..., weights = weights, by = by, bootstrap = bootstrap) # Prettify summary display without modifying .self$model.call for (i in length(.self$zelig.out$z.out)) { .self$zelig.out$z.out[[i]]$call$id <- .self$zelig.call$id .self$zelig.out$z.out[[i]]$call$zcor <- "zcor" } } ) zgee$methods( param = function(z.out, method="mvn") { so <- summary(z.out) shape <- so$dispersion if(identical(method,"point")){ return( list(simparam = t(as.matrix(coef(z.out))), simalpha = shape[1][1] )) }else if(identical(method,"mvn")){ simalpha <- rnorm(n = .self$num, mean = shape[1][[1]], sd = shape[2][[1]]) simparam.local <- mvrnorm(n = .self$num, mu = coef(z.out), Sigma = so$cov.unscaled) simparam.local <- list(simparam = simparam.local, simalpha = simalpha) return(simparam.local) } } ) # zgee$methods( # show = function() { # for (i in length(.self$zelig.out$z.out)) { # .self$zelig.out$z.out[[i]]$call$id <- "id" # } # callSuper() # } # ) Zelig/R/model-negbinom.R0000755000176200001440000001264313754260262014564 0ustar liggesusers#' Negative Binomial Regression for Event Count Dependent Variables #'@param formula a symbolic representation of the model to be #' estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the #' dependent variable and \code{x1} and \code{x2} are the explanatory #' variables, and \code{y}, \code{x1}, and \code{x2} are contained in the #' same dataset. (You may include more than two explanatory variables, #' of course.) The \code{+} symbol means ``inclusion'' not #' ``addition.'' You may also include interaction terms and main #' effects in the form \code{x1*x2} without computing them in prior #' steps; \code{I(x1*x2)} to include only the interaction term and #' exclude the main effects; and quadratic terms in the form #' \code{I(x1^2)}. #' @param model the name of a statistical model to estimate. #' For a list of other supported models and their documentation see: #' \url{http://docs.zeligproject.org/articles/}. #' @param data the name of a data frame containing the variables #' referenced in the formula or a list of multiply imputed data frames #' each having the same variable names and row numbers (created by #' \code{Amelia} or \code{\link{to_zelig_mi}}). #' @param ... additional arguments passed to \code{zelig}, #' relevant for the model to be estimated. #' @param by a factor variable contained in \code{data}. If supplied, #' \code{zelig} will subset #' the data frame based on the levels in the \code{by} variable, and #' estimate a model for each subset. This can save a considerable amount of #' effort. You may also use \code{by} to run models using MatchIt #' subclasses. #' @param cite If is set to 'TRUE' (default), the model citation will be printed #' to the console. #' #' @details #' Additional parameters avaialable to this model include: #' \itemize{ #' \item \code{weights}: vector of weight values or a name of a variable in the dataset #' by which to weight the model. For more information see: #' \url{http://docs.zeligproject.org/articles/weights.html}. #' \item \code{bootstrap}: logical or numeric. If \code{FALSE} don't use bootstraps to #' robustly estimate uncertainty around model parameters due to sampling error. #' If an integer is supplied, the number of boostraps to run. #' For more information see: #' \url{http://docs.zeligproject.org/articles/bootstraps.html}. #' } #' @return Depending on the class of model selected, \code{zelig} will return #' an object with elements including \code{coefficients}, \code{residuals}, #' and \code{formula} which may be summarized using #' \code{summary(z.out)} or individually extracted using, for example, #' \code{coef(z.out)}. See #' \url{http://docs.zeligproject.org/articles/getters.html} for a list of #' functions to extract model components. You can also extract whole fitted #' model objects using \code{\link{from_zelig_model}}. #' #'@examples #' library(Zelig) #' data(sanction) #' z.out <- zelig(num ~ target + coop, model = "negbin", data = sanction) #' summary(z.out) #' #' @seealso Vignette: \url{http://docs.zeligproject.org/articles/zelig_negbin.html} #' @import methods #' @export Zelig-negbin #' @exportClass Zelig-negbin #' #' @include model-zelig.R znegbin <- setRefClass("Zelig-negbin", contains = "Zelig", field = list(simalpha = "list" # ancillary parameters )) znegbin$methods( initialize = function() { callSuper() .self$fn <- quote(MASS::glm.nb) .self$name <- "negbin" .self$authors <- "Kosuke Imai, Gary King, Olivia Lau" .self$packageauthors <- "William N. Venables, and Brian D. Ripley" .self$year <- 2008 .self$category <- "count" .self$description <- "Negative Binomial Regression for Event Count Dependent Variables" # JSON .self$outcome <- "discrete" .self$wrapper <- "negbin" .self$acceptweights <- TRUE } ) znegbin$methods( zelig = function(formula, data, ..., weights=NULL, by = NULL, bootstrap = FALSE) { .self$zelig.call <- match.call(expand.dots = TRUE) .self$model.call <- .self$zelig.call callSuper(formula=formula, data=data, ..., weights=weights, by = by, bootstrap = bootstrap) rse <- lapply(.self$zelig.out$z.out, (function(x) vcovHC(x, type = "HC0"))) .self$test.statistics<- list(robust.se = rse) } ) znegbin$methods( param = function(z.out, method="mvn") { simalpha.local <- z.out$theta if(identical(method,"mvn")){ simparam.local <- mvrnorm(n = .self$num, mu = coef(z.out), Sigma = vcov(z.out)) simparam.local <- list(simparam = simparam.local, simalpha = simalpha.local) return(simparam.local) } else if(identical(method,"point")){ return(list(simparam = t(as.matrix(coef(z.out))), simalpha = simalpha.local)) } } ) znegbin$methods( qi = function(simparam, mm) { coeff <- simparam$simparam alpha <- simparam$simalpha inverse <- family(.self$zelig.out$z.out[[1]])$linkinv eta <- coeff %*% t(mm) theta <- matrix(inverse(eta), nrow=nrow(coeff)) ev <- theta pv <- matrix(NA, nrow=nrow(theta), ncol=ncol(theta)) # for (i in 1:ncol(ev)) pv[, i] <- rnegbin(nrow(ev), mu = ev[i, ], theta = alpha[i]) return(list(ev = ev, pv = pv)) } ) znegbin$methods( mcfun = function(x, b0=0, b1=1, ..., sim=TRUE){ mu <- exp(b0 + b1 * x) if(sim){ y <- rnbinom(n=length(x), 1, mu=mu) return(y) }else{ return(mu) } } ) Zelig/R/model-ma.R0000755000176200001440000001033413754260262013356 0ustar liggesusers#' Time-Series Model with Moving Average #' #' Warning: \code{summary} does not work with timeseries models after #' simulation. #' #' @param formula a symbolic representation of the model to be #' estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the #' dependent variable and \code{x1} and \code{x2} are the explanatory #' variables, and \code{y}, \code{x1}, and \code{x2} are contained in the #' same dataset. (You may include more than two explanatory variables, #' of course.) The \code{+} symbol means ``inclusion'' not #' ``addition.'' You may also include interaction terms and main #' effects in the form \code{x1*x2} without computing them in prior #' steps; \code{I(x1*x2)} to include only the interaction term and #' exclude the main effects; and quadratic terms in the form #' \code{I(x1^2)}. #' @param model the name of a statistical model to estimate. #' For a list of other supported models and their documentation see: #' \url{http://docs.zeligproject.org/articles/}. #' @param data the name of a data frame containing the variables #' referenced in the formula or a list of multiply imputed data frames #' each having the same variable names and row numbers (created by #' \code{Amelia} or \code{\link{to_zelig_mi}}). #' @param ... additional arguments passed to \code{zelig}, #' relevant for the model to be estimated. #' @param by a factor variable contained in \code{data}. If supplied, #' \code{zelig} will subset #' the data frame based on the levels in the \code{by} variable, and #' estimate a model for each subset. This can save a considerable amount of #' effort. You may also use \code{by} to run models using MatchIt #' subclasses. #' @param cite If is set to 'TRUE' (default), the model citation will be printed #' to the console. #' @param ts The name of the variable containing the time indicator. This should be passed in as #' a string. If this variable is not provided, Zelig will assume that the data is already #' ordered by time. #' @param cs Name of a variable that denotes the cross-sectional element of the data, for example, #' country name in a dataset with time-series across different countries. As a variable name, #' this should be in quotes. If this is not provided, Zelig will assume that all observations #' come from the same unit over time, and should be pooled, but if provided, individual models will #' be run in each cross-section. #' If \code{cs} is given as an argument, \code{ts} must also be provided. Additionally, \code{by} #' must be \code{NULL}. #' @param order A vector of length 3 passed in as \code{c(p,d,q)} where p represents the order of the #' autoregressive model, d represents the number of differences taken in the model, and q represents #' the order of the moving average model. #' @details #' Currently only the Reference class syntax for time series. This model does not accept #' Bootstraps or weights. #' #' #' @return Depending on the class of model selected, \code{zelig} will return #' an object with elements including \code{coefficients}, \code{residuals}, #' and \code{formula} which may be summarized using #' \code{summary(z.out)} or individually extracted using, for example, #' \code{coef(z.out)}. See #' \url{http://docs.zeligproject.org/articles/getters.html} for a list of #' functions to extract model components. You can also extract whole fitted #' model objects using \code{\link{from_zelig_model}}. #' @examples #' data(seatshare) #' subset <- seatshare[seatshare$country == "UNITED KINGDOM",] #' ts.out <- zelig(formula = unemp ~ leftseat, model = "ma", ts = "year", data = subset) #' summary(ts.out) #' #' @seealso Vignette: \url{http://docs.zeligproject.org/articles/zelig_ma.html} #' @import methods #' @export Zelig-ma #' @exportClass Zelig-ma #' #' @include model-zelig.R #' @include model-timeseries.R zma <- setRefClass("Zelig-ma", contains = "Zelig-timeseries") zma$methods( initialize = function() { callSuper() .self$name <- "ma" .self$link <- "identity" .self$fn <- quote(zeligArimaWrapper) .self$description = "Time-Series Model with Moving Average" .self$packageauthors <- "R Core Team" .self$outcome <- "continuous" .self$wrapper <- "timeseries" } ) Zelig/R/model-gamma.R0000755000176200001440000001164713754260262014053 0ustar liggesusers#' Gamma Regression for Continuous, Positive Dependent Variables #'@param formula a symbolic representation of the model to be #' estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the #' dependent variable and \code{x1} and \code{x2} are the explanatory #' variables, and \code{y}, \code{x1}, and \code{x2} are contained in the #' same dataset. (You may include more than two explanatory variables, #' of course.) The \code{+} symbol means ``inclusion'' not #' ``addition.'' You may also include interaction terms and main #' effects in the form \code{x1*x2} without computing them in prior #' steps; \code{I(x1*x2)} to include only the interaction term and #' exclude the main effects; and quadratic terms in the form #' \code{I(x1^2)}. #'@param model the name of a statistical model to estimate. #' For a list of other supported models and their documentation see: #' \url{http://docs.zeligproject.org/articles/}. #'@param data the name of a data frame containing the variables #' referenced in the formula or a list of multiply imputed data frames #' each having the same variable names and row numbers (created by #' \code{Amelia} or \code{\link{to_zelig_mi}}). #'@param ... additional arguments passed to \code{zelig}, #' relevant for the model to be estimated. #'@param by a factor variable contained in \code{data}. If supplied, #' \code{zelig} will subset #' the data frame based on the levels in the \code{by} variable, and #' estimate a model for each subset. This can save a considerable amount of #' effort. You may also use \code{by} to run models using MatchIt #' subclasses. #'@param cite If is set to 'TRUE' (default), the model citation will be printed #' to the console. #' #' @details #' Additional parameters avaialable to this model include: #' \itemize{ #' \item \code{weights}: vector of weight values or a name of a variable in the dataset #' by which to weight the model. For more information see: #' \url{http://docs.zeligproject.org/articles/weights.html}. #' \item \code{bootstrap}: logical or numeric. If \code{FALSE} don't use bootstraps to #' robustly estimate uncertainty around model parameters due to sampling error. #' If an integer is supplied, the number of boostraps to run. #' For more information see: #' \url{http://docs.zeligproject.org/articles/bootstraps.html}. #' } #' @return Depending on the class of model selected, \code{zelig} will return #' an object with elements including \code{coefficients}, \code{residuals}, #' and \code{formula} which may be summarized using #' \code{summary(z.out)} or individually extracted using, for example, #' \code{coef(z.out)}. See #' \url{http://docs.zeligproject.org/articles/getters.html} for a list of #' functions to extract model components. You can also extract whole fitted #' model objects using \code{\link{from_zelig_model}}. #' #' @examples #' library(Zelig) #' data(coalition) #' z.out <- zelig(duration ~ fract + numst2, model = "gamma", data = coalition) #' summary(z.out) #' #' @seealso Vignette: \url{http://docs.zeligproject.org/articles/zelig_gamma.html} #' @import methods #' @export Zelig-gamma #' @exportClass Zelig-gamma #' #' @include model-zelig.R #' @include model-glm.R zgamma <- setRefClass("Zelig-gamma", contains = "Zelig-glm") zgamma$methods( initialize = function() { callSuper() .self$name <- "gamma" .self$family <- "Gamma" .self$link <- "inverse" .self$authors <- "Kosuke Imai, Gary King, Olivia Lau" .self$year <- 2007 .self$category <- "bounded" .self$description <- "Gamma Regression for Continuous, Positive Dependent Variables" # JSON .self$outcome <- "continous" .self$wrapper <- "gamma" } ) zgamma$methods( param = function(z.out, method="mvn") { shape <- MASS::gamma.shape(z.out) if(identical(method, "mvn")){ simalpha <- rnorm(n = .self$num, mean = shape$alpha, sd = shape$SE) simparam.local <- mvrnorm(n = .self$num, mu = coef(z.out), Sigma = vcov(z.out)) simparam.local <- list(simparam = simparam.local, simalpha = simalpha) return(simparam.local) } else if(identical(method,"point")){ return(list(simparam = t(as.matrix(coef(z.out))), simalpha = shape$alpha )) } } ) zgamma$methods( qi = function(simparam, mm) { coeff <- simparam$simparam eta <- (coeff %*% t(mm) ) * simparam$simalpha # JH need to better understand this parameterization. Coefs appear parameterized so E(y_i) = 1/ (x_i\hat{\beta}) theta <- matrix(1 / eta, nrow = nrow(coeff), ncol=1) ev <- theta * simparam$simalpha pv<- matrix(rgamma(nrow(ev), shape = simparam$simalpha, scale = theta), nrow=nrow(ev), ncol=1) return(list(ev = ev, pv = pv)) } ) zgamma$methods( mcfun = function(x, b0=0, b1=1, alpha=1, sim=TRUE){ lambda <- 1/(b0 + b1 * x) if(sim){ y <- rgamma(n=length(x), shape=alpha, scale = lambda) return(y) }else{ return(alpha * lambda) } } ) Zelig/R/model-probit-bayes.R0000644000176200001440000001336313754260262015363 0ustar liggesusers#' Bayesian Probit Regression #' #' @param formula a symbolic representation of the model to be #' estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the #' dependent variable and \code{x1} and \code{x2} are the explanatory #' variables, and \code{y}, \code{x1}, and \code{x2} are contained in the #' same dataset. (You may include more than two explanatory variables, #' of course.) The \code{+} symbol means ``inclusion'' not #' ``addition.'' You may also include interaction terms and main #' effects in the form \code{x1*x2} without computing them in prior #' steps; \code{I(x1*x2)} to include only the interaction term and #' exclude the main effects; and quadratic terms in the form #' \code{I(x1^2)}. #' @param model the name of a statistical model to estimate. #' For a list of supported models and their documentation see: #' \url{http://docs.zeligproject.org/articles/}. #' @param data the name of a data frame containing the variables #' referenced in the formula or a list of multiply imputed data frames #' each having the same variable names and row numbers (created by #' \code{Amelia} or \code{\link{to_zelig_mi}}). #' @param ... additional arguments passed to \code{zelig}, #' relevant for the model to be estimated. #' @param by a factor variable contained in \code{data}. If supplied, #' \code{zelig} will subset #' the data frame based on the levels in the \code{by} variable, and #' estimate a model for each subset. This can save a considerable amount of #' effort. For example, to run the same model on all fifty states, you could #' use: \code{z.out <- zelig(y ~ x1 + x2, data = mydata, model = 'ls', #' by = 'state')} You may also use \code{by} to run models using MatchIt #' subclasses. #' @param cite If is set to 'TRUE' (default), the model citation will be printed #' to the console. #' #' @details #' Additional parameters avaialable to this model include: #' \itemize{ #' \item \code{weights}: vector of weight values or a name of a variable in the dataset #' by which to weight the model. For more information see: #' \url{http://docs.zeligproject.org/articles/weights.html}. #' \item \code{burnin}: number of the initial MCMC iterations to be discarded (defaults to 1,000). #' \item \code{mcmc}: number of the MCMC iterations after burnin (defaults to 10,000). #' \item \code{thin}: thinning interval for the Markov chain. Only every thin-th draw from the #' Markov chain is kept. The value of mcmc must be divisible by this value. The default value is 1. #' \item \code{verbose}: defaults to FALSE. If TRUE, the progress of the sampler (every 10\%) is #' printed to the screen. #' \item \code{seed}: seed for the random number generator. The default is \code{NA} which #' corresponds to a random seed of 12345. #' \item \code{beta.start}: starting values for the Markov chain, either a scalar or vector with #' length equal to the number of estimated coefficients. The default is \code{NA}, such that the #' maximum likelihood estimates are used as the starting values. #' } #' Use the following parameters to specify the model's priors: #' \itemize{ #' \item \code{b0}: prior mean for the coefficients, either a numeric vector or a scalar. #' If a scalar value, that value will be the prior mean for all the coefficients. The default is 0. #' \item \code{B0}: prior precision parameter for the coefficients, either a square matrix (with #' the dimensions equal to the number of the coefficients) or a scalar. If a scalar value, that #' value times an identity matrix will be the prior precision parameter. The default is 0, which #' leads to an improper prior. #' } #' Use the following arguments to specify optional output for the model: #' \itemize{ #' \item \code{bayes.resid}: defaults to FALSE. If TRUE, the latent Bayesian residuals for all #' observations are returned. Alternatively, users can specify a vector of observations for #' which the latent residuals should be returned. #' } #' @return Depending on the class of model selected, \code{zelig} will return #' an object with elements including \code{coefficients}, \code{residuals}, #' and \code{formula} which may be summarized using #' \code{summary(z.out)} or individually extracted using, for example, #' \code{coef(z.out)}. See #' \url{http://docs.zeligproject.org/articles/getters.html} for a list of #' functions to extract model components. You can also extract whole fitted #' model objects using \code{\link{from_zelig_model}}. #' #' #' @examples #' data(turnout) #' z.out <- zelig(vote ~ race + educate, model = "probit.bayes",data = turnout, verbose = FALSE) #' summary(z.out) #' #' @seealso Vignette: \url{http://docs.zeligproject.org/articles/zelig_probitbayes.html} #' @import methods #' @export Zelig-probit-bayes #' @exportClass Zelig-probit-bayes #' #' @include model-zelig.R #' @include model-probit.R zprobitbayes <- setRefClass("Zelig-probit-bayes", contains = c("Zelig-bayes", "Zelig-probit")) zprobitbayes$methods( initialize = function() { callSuper() .self$name <- "probit-bayes" .self$family <- "binomial" .self$link <- "probit" .self$linkinv <- eval(call(.self$family, .self$link))$linkinv .self$year <- 2013 .self$category <- "dichotomous" .self$authors <- "Ben Goodrich, Ying Lu" .self$description = "Bayesian Probit Regression for Dichotomous Dependent Variables" .self$fn <- quote(MCMCpack::MCMCprobit) # JSON from parent .self$wrapper <- "probit.bayes" } ) zprobitbayes$methods( mcfun = function(x, b0=0, b1=1, ..., sim=TRUE){ mu <- pnorm(b0 + b1 * x) if(sim){ y <- rbinom(n=length(x), size=1, prob=mu) return(y) }else{ return(mu) } } ) Zelig/R/utils.R0000755000176200001440000005533713764425626013047 0ustar liggesusers#' Compute the Statistical Mode of a Vector #' @aliases Mode mode #' @param x a vector of numeric, factor, or ordered values #' @return the statistical mode of the vector. If more than one mode exists, #' the last one in the factor order is arbitrarily chosen (by design) #' @export #' @author Christopher Gandrud and Matt Owen Mode <- function (x) { # build a table of values of x tab <- table(as.factor(x)) # find the mode, if there is more than one arbitrarily pick the last max_tab <- names(which(tab == max(tab))) v <- max_tab[length(max_tab)] # if it came in as a factor, we need to re-cast it as a factor, with the same exact levels if (is.factor(x)) return(factor(v, levels = levels(x))) # re-cast as any other data-type as(v, class(x)) } ## Zelig 3 and 4 backward compatibility ## This enables backward compatibility, but results in a warning when library attached # mode <- Mode #' Compute the Statistical Median of a Vector #' @param x a vector of numeric or ordered values #' @param na.rm ignored #' @return the median of the vector #' @export #' @author Matt Owen Median <- function (x, na.rm=NULL) { v <- ifelse(is.numeric(x), median(x), levels(x)[ceiling(median(as.numeric(x)))] ) if (is.ordered(x)) v <- factor(v, levels(x)) v } #' Create a table, but ensure that the correct #' columns exist. In particular, this allows for #' entires with zero as a value, which is not #' the default for standard tables #' @param x a vector #' @param levels a vector of levels #' @param ... parameters for table #' @return a table #' @author Matt Owen table.levels <- function (x, levels, ...) { # if levels are not explicitly set, then # search inside of x if (missing(levels)) { levels <- attr(x, 'levels') table(factor(x, levels=levels), ...) } # otherwise just do the normal thing else { table(factor(x, levels=levels), ...) } } #' Compute central tendancy as approrpriate to data type #' @param val a vector of values #' @return a mean (if numeric) or a median (if ordered) or mode (otherwise) #' @export avg <- function(val) { if (is.numeric(val)) mean(val) else if (is.ordered(val)) Median(val) else Mode(val) } #' Set new value of a factor variable, checking for existing levels #' @param fv factor variable #' @param v value #' @return a factor variable with a value \code{val} and the same levels #' @keywords internal setfactor <- function (fv, v) { lev <- levels(fv) if (!v %in% lev) stop("Wrong factor") return(factor(v, levels = lev)) } #' Set new value of a variable as approrpriate to data type #' @param val old value #' @param newval new value #' @return a variable of the same type with a value \code{val} #' @keywords internal setval <- function(val, newval) { if (is.numeric(val)) newval else if (is.ordered(val)) newval else if (is.logical(val)) newval else { lev <- levels(val) if (!newval %in% lev) stop("Wrong factor", call. = FALSE) return(factor(newval, levels = lev)) } } #' Calculate the reduced dataset to be used in \code{\link{setx}} #' #' #' This method is used internally #' #' @param dataset Zelig object data, possibly split to deal with \code{by} #' argument #' @param s list of variables and their tentative \code{setx} values #' @param formula a simplified version of the Zelig object formula (typically #' with 1 on the lhs) #' @param data Zelig object data #' @param avg function of data transformations #' @return a list of all the model variables either at their central tendancy or #' their \code{setx} value #' #' @keywords internal #' @author Christine Choirat and Christopher Gandrud #' @export reduce = function(dataset, s, formula, data, avg = avg) { pred <- try(terms(fit <- lm(formula, data), "predvars"), silent = TRUE) if ("try-error" %in% class(pred)) # exp and weibull pred <- try(terms(fit <- survreg(formula, data), "predvars"), silent = TRUE) dataset <- model.frame(fit) ldata <- lapply(dataset, avg) if (length(s) > 0) { n <- union(as.character(attr(pred, "predvars"))[-1], names(dataset)) if (is.list(s[[1]])) s <- s[[1]] m <- match(names(s), n) ma <- m[!is.na(m)] if (!all(complete.cases(m))) { w <- paste("Variable '", names(s[is.na(m)]), "' not in data set.\n", sep = "") stop(w, call. = FALSE) } for (i in seq(n[ma])) { ldata[n[ma]][i][[1]] <- setval(dataset[n[ma]][i][[1]], s[n[ma]][i][[1]]) } } return(ldata) } #' Create QI summary matrix #' @param qi quantity of interest in the discrete case #' @return a formatted qi #' @keywords internal #' @author Christine Choirat statmat <- function(qi) { if (!is.matrix(qi)) qi <- as.matrix(qi, ncol = 1) m <- t(apply(qi, 2, quantile, c(.5, .025, .975), na.rm = TRUE)) n <- matrix(apply(qi, 2, mean, na.rm = TRUE)) colnames(n) <- "mean" o <- matrix(apply(qi, 2, sd, na.rm = TRUE)) colnames(o) <- "sd" p <- cbind(n, o, m) return(p) } #' Describe Here #' @param qi quantity of interest in the discrete case #' @param num number of simulations #' @return a formatted quantity of interest #' @keywords internal #' @author Christine Choirat statlevel <- function(qi, num) { if (is.matrix(qi)){ #m <- t(apply(qi, 2, table)) / num all.levels <- levels(qi) m <- t(apply(qi, 2, function(x) table(factor(x, levels=all.levels)))) / num } else { m <- table(qi) / num } return(m) } #' Pass Quantities of Interest to Appropriate Summary Function #' #' @param qi quantity of interest (e.g., estimated value or predicted value) #' @param num number of simulations #' @return a formatted qi #' @keywords internal #' @author Christine Choirat stat <- function(qi, num) { if (is.null(attr(qi, "levels"))) return(statmat(qi)) else return(statlevel(qi, num)) } #' Generate Formulae that Consider Clustering #' #' This method is used internally by the "Zelig" Package to interpret #' clustering in GEE models. #' @param formula a formula object #' @param cluster a vector #' @return a formula object describing clustering cluster.formula <- function (formula, cluster) { # Convert LHS of formula to a string lhs <- deparse(formula[[2]]) cluster.part <- if (is.null(cluster)) # NULL values require sprintf("cluster(1:nrow(%s))", lhs) else # Otherwise we trust user input sprintf("cluster(%s)", cluster) update(formula, paste(". ~ .", cluster.part, sep = " + ")) } #' Zelig Copy of plyr::mutate to avoid namespace conflict with dplyr #' #' @source Hadley Wickham (2011). The Split-Apply-Combine Strategy for Data #' Analysis. Journal of Statistical Software, 40(1), 1-29. URL #' \url{https://www.jstatsoft.org/v40/i01/}. #' @keywords internal zelig_mutate <- function (.data, ...) { stopifnot(is.data.frame(.data) || is.list(.data) || is.environment(.data)) cols <- as.list(substitute(list(...))[-1]) cols <- cols[names(cols) != ""] for (col in names(cols)) { .data[[col]] <- eval(cols[[col]], .data, parent.frame()) } .data } #' Convenience function for setrange and setrange1 #' #' @param x data passed to setrange or setrange1 #' @keywords internal expand_grid_setrange <- function(x) { # m <- expand.grid(x) set_lengths <- unlist(lapply(x, length)) unique_set_lengths <- unique(as.vector(set_lengths)) m <- data.frame() for (i in unique_set_lengths) { temp_df <- data.frame(row.names = 1:i) for (u in 1:length(x)) { if (length(x[[u]]) == i) { temp_df <- cbind(temp_df, x[[u]]) names(temp_df)[ncol(temp_df)] <- names(x)[u] } } if (nrow(m) == 0) m <- temp_df else m <- merge(m, temp_df) } if (nrow(m) == 1) warning('Only one fitted observation provided to setrange.\nConsider using setx instead.', call. = FALSE) return(m) } #' Bundle Multiply Imputed Data Sets into an Object for Zelig #' #' This object prepares multiply imputed data sets so they can be used by #' \code{zelig}. #' @note This function creates a list of \code{data.frame} objects, which #' resembles the storage of imputed data sets in the \code{amelia} object. #' @param ... a set of \code{data.frame}'s or a single list of \code{data.frame}'s #' @return an \code{mi} object composed of a list of data frames. #' #' @author Matt Owen, James Honaker, and Christopher Gandrud #' #' @examples #' # create datasets #' n <- 100 #' x1 <- runif(n) #' x2 <- runif(n) #' y <- rnorm(n) #' data.1 <- data.frame(y = y, x = x1) #' data.2 <- data.frame(y = y, x = x2) #' #' # merge datasets into one object as if imputed datasets #' #' mi.out <- to_zelig_mi(data.1, data.2) #' #' # pass object in place of data argument #' z.out <- zelig(y ~ x, model = "ls", data = mi.out) #' @export to_zelig_mi <- function (...) { # Get arguments as list imputations <- list(...) # If user passes a list of data.frames rather than several data.frames as separate arguments if((class(imputations[[1]]) == 'list') & (length(imputations) == 1)){ imputations = imputations[[1]] } # Labelling names(imputations) <- paste0("imp", 1:length(imputations)) # Ensure that everything is a data.frame for (k in length(imputations):1) { if (!is.data.frame(imputations[[k]])){ imputations[[k]] <- NULL warning("Item ", k, " of the provided objects is not a data.frame and will be ignored.\n") } } if(length(imputations) < 1){ stop("The resulting object contains no data.frames, and as such is not a valid multiple imputation object.", call. = FALSE) } if(length(imputations) < 2){ stop("The resulting object contains only one data.frame, and as such is not a valid multiple imputation object.", call. = FALSE) } class(imputations) <-c("mi", "list") return(imputations) } #' Enables backwards compatability for preparing non-amelia imputed data sets #' for \code{zelig}. #' #' See \code{\link{to_zelig_mi}} #' #' @param ... a set of \code{data.frame}'s #' @return an \code{mi} object composed of a list of data frames. mi <- to_zelig_mi #' Conduct variable transformations called inside a \code{zelig} call #' #' @param formula model formulae #' @param data data frame used in \code{formula} #' @param FUN character string of the transformation function. Currently #' supports \code{factor} and \code{log}. #' @param check logical whether to just check if a formula contains an #' internally called transformation and return \code{TRUE} or \code{FALSE} #' @param f_out logical whether to return the converted formula #' @param d_out logical whether to return the converted data frame. Note: #' \code{f_out} must be missing #' #' @author Christopher Gandrud #' @keywords internal transformer <- function(formula, data, FUN = 'log', check, f_out, d_out) { if (!missing(data)) { if (is.data.frame(data)) is_df <- TRUE else if (!is.data.frame(data) & is.list(data)) is_df <- FALSE else stop('data must be either a data.frame or a list', call. = FALSE) } if (FUN == 'as.factor') FUN_temp <- 'as\\.factor' else FUN_temp <- FUN FUN_str <- sprintf('%s.*\\(', FUN_temp) f <- as.character(formula)[3] f_split <- unlist(strsplit(f, split = '\\+')) to_transform <- grep(pattern = FUN_str, f_split) if (!missing(check)) { if (length(to_transform) > 0) return(TRUE) else return(FALSE) } if (length(to_transform) > 0) { to_transform_raw <- trimws(f_split[to_transform]) if (FUN == 'factor') to_transform_raw <- gsub('^as\\.', '', to_transform_raw) to_transform_plain_args <- gsub(FUN_str, '', to_transform_raw) to_transform_plain <- gsub(',\\(.*)', '', to_transform_plain_args) to_transform_plain <- gsub('\\)', '', to_transform_plain) to_transform_plain <- trimws(gsub(',.*', '', to_transform_plain)) if (is_df) not_in_data <- !all(to_transform_plain %in% names(data)) else if (!isTRUE(is_df)) not_in_data <- !all(to_transform_plain %in% names(data[[1]])) if (not_in_data) stop('Unable to find variable to transform.') if (!missing(f_out)) { f_split[to_transform] <- to_transform_plain rhs <- paste(f_split, collapse = ' + ') lhs <- gsub('\\(\\)', '', formula[2]) f_new <- paste(lhs, '~', rhs) f_out <- as.Formula(f_new) return(f_out) } else if (!missing(d_out)) { transformer_fun <- trimws(gsub('\\(.*', '', to_transform_raw)) transformer_args_str <- gsub('\\)', '', to_transform_plain_args) transformer_args_list <- list() for (i in seq_along(transformer_args_str)) { args_temp <- unlist(strsplit(gsub(' ', '' , transformer_args_str[i]), ',')) if (is_df) args_temp[1] <- sprintf('data[, "%s"]', args_temp[1]) else if (!isTRUE(is_df)) args_temp[1] <- sprintf('data[[h]][, "%s"]', args_temp[1]) arg_names <- gsub('\\=.*', '', args_temp) arg_names[1] <- 'x' args_temp <- gsub('.*\\=', '', args_temp) args_temp_list <- list() if (is_df) { for (u in seq_along(args_temp)) args_temp_list[[u]] <- eval(parse(text = args_temp[u])) } else if (!isTRUE(is_df)) { for (h in seq_along(data)) { temp_list <- list() for (u in seq_along(args_temp)) { temp_list[[u]] <- eval(parse(text = args_temp[u])) names(temp_list)[u] <- arg_names[u] } args_temp_list[[h]] <- temp_list } } if (is_df) { names(args_temp_list) <- arg_names data[, to_transform_plain[i]] <- do.call( what = transformer_fun[i], args = args_temp_list) } else if (!isTRUE(is_df)) { for (j in seq_along(data)) { data[[j]][, to_transform_plain[i]] <- do.call( what = transformer_fun[i], args = args_temp_list[[j]]) } } } return(data) } } else if (length(to_transform) == 0) { if (!missing(f_out)) return(formula) else if (d_out) return(data) } } #' Remove package names from fitted model object calls. #' #' Enables \code{\link{from_zelig_model}} output to work with stargazer. #' @param x a fitted model object result #' @keywords internal strip_package_name <- function(x) { if ("vglm" %in% class(x)) # maybe generalise to all s4? call_temp <- gsub('^.*(?=(::))', '', x@call[1], perl = TRUE) else call_temp <- gsub('^.*(?=(::))', '', x$call[1], perl = TRUE) call_temp <- gsub('::', '', call_temp, perl = TRUE) if ("vglm" %in% class(x)) x@call[1] <- as.call(list(as.symbol(call_temp))) else x$call[1] <- as.call(list(as.symbol(call_temp))) return(x) } #' Extract p-values from a fitted model object #' @param x a fitted Zelig object #' @keywords internal p_pull <- function(x) { if ("vglm" %in% class(x)) { # maybe generalise to all s4? p_values <- summary(x)@coef3[, 'Pr(>|z|)'] } else { p_values <- summary(x)$coefficients if ('Pr(>|t|)' %in% colnames(p_values)) { p_values <- p_values[, 'Pr(>|t|)'] } else { p_values <- p_values[, 'Pr(>|z|)'] } } return(p_values) } #' Extract standard errors from a fitted model object #' @param x a fitted Zelig object #' @keywords internal se_pull <- function(x) { if ("vglm" %in% class(x)) # maybe generalise to all s4? se <- summary(x)@coef3[, "Std. Error"] else se <- summary(x)$coefficients[, "Std. Error"] return(se) } #' Drop intercept columns or values from a data frame or named vector, #' respectively #' #' @param x a data frame or named vector #' @keywords internal rm_intercept <- function(x) { intercept_names <- c('(Intercept)', 'X.Intercept.', '(Intercept).*') names_x <- names(x) if (any(intercept_names %in% names(x))) { keep <- !(names(x) %in% intercept_names) if (is.data.frame(x)) x <- data.frame(x[, names_x[keep]]) else if (is.vector(x)) x <- x[keep] names(x) <- names_x[keep] } return(x) } #' Combines estimated coefficients and associated statistics #' from models estimated with multiply imputed data sets or bootstrapped #' #' @param obj a zelig object with an estimated model #' @param out_type either \code{"matrix"} or \code{"list"} specifying #' whether the results should be returned as a matrix or a list. #' @param bagging logical whether or not to bag the bootstrapped coefficients #' @param messages logical whether or not to return messages for what is being #' returned #' #' @return If the model uses multiply imputed or bootstrapped data then a #' matrix (default) or list of combined coefficients (\code{coef}), standard #' errors (\code{se}), z values (\code{zvalue}), p-values (\code{p}) is #' returned. Rubin's Rules are used to combine output from multiply imputed #' data. An error is returned if no imputations were included or there wasn't #' bootstrapping. Please use \code{get_coef}, \code{get_se}, and #' \code{get_pvalue} methods instead in cases where there are no imputations or #' bootstrap. #' #' @examples #' set.seed(123) #' #' ## Multiple imputation example #' # Create fake imputed data #' n <- 100 #' x1 <- runif(n) #' x2 <- runif(n) #' y <- rnorm(n) #' data.1 <- data.frame(y = y, x = x1) #' data.2 <- data.frame(y = y, x = x2) #' #' # Estimate model #' mi.out <- to_zelig_mi(data.1, data.2) #' z.out.mi <- zelig(y ~ x, model = "ls", data = mi.out) #' #' # Combine and extract coefficients and standard errors #' combine_coef_se(z.out.mi) #' #' ## Bootstrap example #' z.out.boot <- zelig(y ~ x, model = "ls", data = data.1, bootstrap = 20) #' combine_coef_se(z.out.boot) #' #' @author Christopher Gandrud and James Honaker #' @source Partially based on \code{\link{mi.meld}} from Amelia. #' #' @export combine_coef_se <- function(obj, out_type = 'matrix', bagging = FALSE, messages = TRUE) { is_zelig(obj) is_uninitializedField(obj$zelig.out) if (!(out_type %in% c('matrix', 'list'))) stop('out_type must be either "matrix" or "list"', call. = FALSE) if (obj$mi || obj$bootstrap) { coeflist <- obj$get_coef() vcovlist <- obj$get_vcov() coef_names <- names(coeflist[[1]]) am.m <- length(coeflist) if (obj$bootstrap & !obj$mi) am.m <- am.m - 1 am.k <- length(coeflist[[1]]) if (obj$bootstrap & !obj$mi) q <- matrix(unlist(coeflist[-(am.m + 1)]), nrow = am.m, ncol = am.k, byrow = TRUE) else if (obj$mi) { q <- matrix(unlist(coeflist), nrow = am.m, ncol = am.k, byrow = TRUE) se <- matrix(NA, nrow = am.m, ncol = am.k) for(i in 1:am.m){ se[i, ] <- sqrt(diag(vcovlist[[i]])) } } ones <- matrix(1, nrow = 1, ncol = am.m) comb_q <- (ones %*% q)/am.m if (obj$mi) ave.se2 <- (ones %*% (se^2)) / am.m diff <- q - matrix(1, nrow = am.m, ncol = 1) %*% comb_q sq2 <- (ones %*% (diff^2))/(am.m - 1) if (obj$mi) { if (messages) message('Combining imputations. . .') comb_se <- sqrt(ave.se2 + sq2 * (1 + 1/am.m)) coef <- as.vector(comb_q) se <- as.vector(comb_se) } else if (obj$bootstrap & !obj$mi) { if (messages) message('Combining bootstraps . . .') comb_se <- sqrt(sq2 * (1 + 1/am.m)) if (bagging) { coef <- as.vector(comb_q) } else { coef <- coeflist[[am.m + 1]] } se <- as.vector(comb_se) } zvalue <- coef / se pr_z <- 2 * (1 - pnorm(abs(zvalue))) if (out_type == 'matrix') { out <- cbind(coef, se, zvalue, pr_z) colnames(out) <- c("Estimate", "Std.Error", "z value", "Pr(>|z|)") rownames(out) <- coef_names } else if (out_type == 'list') { out <- list(coef = coef, se = se, zvalue = zvalue, p = pr_z) for (i in seq(out)) names(out[[i]]) <- coef_names } return(out) } else if (!(obj$mi || obj$bootstrap)) { message('No multiply imputed or bootstrapped estimates found.\nReturning untransformed list of coefficients and standard errors.') out <- list(coef = coef(obj), se = get_se(obj), pvalue = get_pvalue(obj) ) return(out) } } #' Find vcov for GEE models #' #' @param obj a \code{geeglm} class object. vcov_gee <- function(obj) { if (!("geeglm" %in% class(obj))) stop('Not a geeglm class object', call. = FALSE) out <- obj$geese$vbeta return(out) } #' Find vcov for quantile regression models #' #' @param obj a \code{rq} class object. vcov_rq <- function(obj) { if (!("rq" %in% class(obj))) stop('Not an rq class object', call. = FALSE) out <- summary(obj, cov = TRUE)$cov return(out) } #' Find odds ratios for coefficients and standard errors #' for glm.summary class objects #' #' @param obj a \code{glm.summary} class object #' @param label_mod_coef character string for how to modify the coefficient #' label. #' @param label_mod_se character string for how to modify the standard error #' label. or_summary <- function(obj, label_mod_coef = "(OR)", label_mod_se = "(OR)"){ if (class(obj) != "summary.glm") stop("obj must be of summary.glm class.", call. = FALSE) obj$coefficients[, 1] <- exp(obj$coefficients[, 1]) var_diag = diag(vcov(obj)) obj$coefficients[, 2] <- sqrt(obj$coefficients[, 1] ^ 2 * var_diag) colnames(obj$coefficients)[c(1, 2)] <- paste( colnames(obj$coefficients)[c(1, 2)], c(label_mod_coef, label_mod_se)) return(obj) } Zelig/R/model-glm.R0000755000176200001440000000224613754260262013543 0ustar liggesusers#' Generalized Linear Model object for inheritance across models in Zelig #' #' @import methods #' @export Zelig-glm #' @exportClass Zelig-glm #' #' @include model-zelig.R zglm <- setRefClass("Zelig-glm", contains = "Zelig", fields = list(family = "character", link = "character", linkinv = "function")) zglm$methods( initialize = function() { callSuper() .self$fn <- quote(stats::glm) .self$packageauthors <- "R Core Team" .self$acceptweights <- FALSE # "Why glm refers to the number of trials as weight is a trick question to the developers' conscience." } ) zglm$methods( zelig = function(formula, data, ..., weights = NULL, by = NULL, bootstrap = FALSE) { .self$zelig.call <- match.call(expand.dots = TRUE) .self$model.call <- .self$zelig.call .self$model.call$family <- call(.self$family, .self$link) callSuper(formula = formula, data = data, ..., weights = weights, by = by, bootstrap = bootstrap) rse <- lapply(.self$zelig.out$z.out, (function(x) vcovHC(x, type = "HC0"))) .self$test.statistics <- list(robust.se = rse) } ) Zelig/R/model-ar.R0000755000176200001440000001061713754260262013367 0ustar liggesusers#' Time-Series Model with Autoregressive Disturbance #' #' Warning: \code{summary} does not work with timeseries models after #' simulation. #' #' @param formula a symbolic representation of the model to be #' estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the #' dependent variable and \code{x1} and \code{x2} are the explanatory #' variables, and \code{y}, \code{x1}, and \code{x2} are contained in the #' same dataset. (You may include more than two explanatory variables, #' of course.) The \code{+} symbol means ``inclusion'' not #' ``addition.'' You may also include interaction terms and main #' effects in the form \code{x1*x2} without computing them in prior #' steps; \code{I(x1*x2)} to include only the interaction term and #' exclude the main effects; and quadratic terms in the form #' \code{I(x1^2)}. #' @param model the name of a statistical model to estimate. #' For a list of supported models and their documentation see: #' \url{http://docs.zeligproject.org/articles/}. #' @param data the name of a data frame containing the variables #' referenced in the formula or a list of multiply imputed data frames #' each having the same variable names and row numbers (created by #' \code{Amelia} or \code{\link{to_zelig_mi}}). #' @param ... additional arguments passed to \code{zelig}, #' relevant for the model to be estimated. #' @param by a factor variable contained in \code{data}. If supplied, #' \code{zelig} will subset #' the data frame based on the levels in the \code{by} variable, and #' estimate a model for each subset. This can save a considerable amount of #' effort. For example, to run the same model on all fifty states, you could #' use: \code{z.out <- zelig(y ~ x1 + x2, data = mydata, model = 'ls', #' by = 'state')} You may also use \code{by} to run models using MatchIt #' subclasses. #' @param cite If is set to 'TRUE' (default), the model citation will be printed #' to the console. #' @param ts The name of the variable containing the time indicator. This should be passed in as #' a string. If this variable is not provided, Zelig will assume that the data is already #' ordered by time. #' @param cs Name of a variable that denotes the cross-sectional element of the data, for example, #' country name in a dataset with time-series across different countries. As a variable name, #' this should be in quotes. If this is not provided, Zelig will assume that all observations #' come from the same unit over time, and should be pooled, but if provided, individual models will #' be run in each cross-section. #' If \code{cs} is given as an argument, \code{ts} must also be provided. Additionally, \code{by} #' must be \code{NULL}. #' @param order A vector of length 3 passed in as \code{c(p,d,q)} where p represents the order of the #' autoregressive model, d represents the number of differences taken in the model, and q represents #' the order of the moving average model. #' @details #' Currently only the Reference class syntax for time series. This model does not accept #' Bootstraps or weights. #' #' #' @return Depending on the class of model selected, \code{zelig} will return #' an object with elements including \code{coefficients}, \code{residuals}, #' and \code{formula} which may be summarized using #' \code{summary(z.out)} or individually extracted using, for example, #' \code{coef(z.out)}. See #' \url{http://docs.zeligproject.org/articles/getters.html} for a list of #' functions to extract model components. You can also extract whole fitted #' model objects using \code{\link{from_zelig_model}}. #' @examples #' data(seatshare) #' subset <- seatshare[seatshare$country == "UNITED KINGDOM",] #' ts.out <- zelig(formula = unemp ~ leftseat, model = "ar", ts = "year", data = subset) #' summary(ts.out) #' #' @seealso Vignette: \url{http://docs.zeligproject.org/articles/zelig_ar.html} #' #' @import methods #' @export Zelig-ar #' @exportClass Zelig-ar #' #' @include model-zelig.R #' @include model-timeseries.R zar <- setRefClass("Zelig-ar", contains = "Zelig-timeseries") zar$methods( initialize = function() { callSuper() .self$name <- "ar" .self$link <- "identity" .self$fn <- quote(zeligArimaWrapper) .self$description = "Time-Series Model with Autoregressive Disturbance" .self$packageauthors <- "R Core Team" .self$outcome <- "continuous" .self$wrapper <- "timeseries" } ) Zelig/R/model-probit-survey.R0000755000176200001440000001336513754260262015622 0ustar liggesusers#' Probit Regression with Survey Weights #' #' @param formula a symbolic representation of the model to be #' estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the #' dependent variable and \code{x1} and \code{x2} are the explanatory #' variables, and \code{y}, \code{x1}, and \code{x2} are contained in the #' same dataset. (You may include more than two explanatory variables, #' of course.) The \code{+} symbol means ``inclusion'' not #' ``addition.'' You may also include interaction terms and main #' effects in the form \code{x1*x2} without computing them in prior #' steps; \code{I(x1*x2)} to include only the interaction term and #' exclude the main effects; and quadratic terms in the form #' \code{I(x1^2)}. #' @param model the name of a statistical model to estimate. #' For a list of other supported models and their documentation see: #' \url{http://docs.zeligproject.org/articles/}. #' @param data the name of a data frame containing the variables #' referenced in the formula or a list of multiply imputed data frames #' each having the same variable names and row numbers (created by #' \code{Amelia} or \code{\link{to_zelig_mi}}). #' @param ... additional arguments passed to \code{zelig}, #' relevant for the model to be estimated. #' @param by a factor variable contained in \code{data}. If supplied, #' \code{zelig} will subset #' the data frame based on the levels in the \code{by} variable, and #' estimate a model for each subset. This can save a considerable amount of #' effort. You may also use \code{by} to run models using MatchIt #' subclasses. #' @param cite If is set to 'TRUE' (default), the model citation will be printed #' to the console. #' @param below: point at which the dependent variable is censored from below. #' If the dependent variable is only censored from above, set \code{below = -Inf}. #' The default value is 0. #' @param above: point at which the dependent variable is censored from above. #' If the dependent variable is only censored from below, set \code{above = Inf}. #' The default value is \code{Inf}. #' @details #' Additional parameters avaialable to this model include: #' \itemize{ #' \item weights: vector of weight values or a name of a variable in the dataset #' by which to weight the model. For more information see: #' \url{http://docs.zeligproject.org/articles/weights.html}. #' \item burnin: number of the initial MCMC iterations to be discarded (defaults to 1,000). #' \item mcmc: number of the MCMC iterations after burnin (defaults to 10,000). #' \item thin: thinning interval for the Markov chain. Only every thin-th #' draw from the Markov chain is kept. The value of mcmc must be divisible by this value. #' The default value is 1. #' \item verbose: defaults to FALSE. If TRUE, the progress of the sampler (every 10\%) #' is printed to the screen. #' \item seed: seed for the random number generator. The default is \code{NA} which #' corresponds to a random seed of 12345. #' \item beta.start: starting values for the Markov chain, either a scalar or #' vector with length equal to the number of estimated coefficients. The default is #' \code{NA}, such that the maximum likelihood estimates are used as the starting values. #' } #' Use the following parameters to specify the model's priors: #' \itemize{ #' \item b0: prior mean for the coefficients, either a numeric vector or a scalar. #' If a scalar value, that value will be the prior mean for all the coefficients. #' The default is 0. #' \item B0: prior precision parameter for the coefficients, either a square matrix #' (with the dimensions equal to the number of the coefficients) or a scalar. #' If a scalar value, that value times an identity matrix will be the prior precision parameter. #' The default is 0, which leads to an improper prior. #' \item c0: c0/2 is the shape parameter for the Inverse Gamma prior on the variance of the #' disturbance terms. #' \item d0: d0/2 is the scale parameter for the Inverse Gamma prior on the variance of the #' disturbance terms. #' } #' @return Depending on the class of model selected, \code{zelig} will return #' an object with elements including \code{coefficients}, \code{residuals}, #' and \code{formula} which may be summarized using #' \code{summary(z.out)} or individually extracted using, for example, #' \code{coef(z.out)}. See #' \url{http://docs.zeligproject.org/articles/getters.html} for a list of #' functions to extract model components. You can also extract whole fitted #' model objects using \code{\link{from_zelig_model}}. #' #'@examples #' data(api, package="survey") #' z.out1 <- zelig(enroll ~ api99 + yr.rnd , #' model = "poisson.survey", data = apistrat) #' summary(z.out1) #' x.low <- setx(z.out1, api99= quantile(apistrat$api99, 0.2)) #' x.high <- setx(z.out1, api99= quantile(apistrat$api99, 0.8)) #' s.out1 <- sim(z.out1, x=x.low, x1=x.high) #' summary(s.out1) #' plot(s.out1) #' #' @seealso Vignette: \url{http://docs.zeligproject.org/articles/zelig_probitsurvey.html} #' @import methods #' @export Zelig-probit-survey #' @exportClass Zelig-probit-survey #' #' @include model-zelig.R #' @include model-binchoice-survey.R zprobitsurvey <- setRefClass("Zelig-probit-survey", contains = c("Zelig-binchoice-survey")) zprobitsurvey$methods( initialize = function() { callSuper() .self$name <- "probit-survey" .self$link <- "probit" .self$description <- "Probit Regression with Survey Weights" .self$wrapper <- "probit.survey" } ) zprobitsurvey$methods( mcfun = function(x, b0=0, b1=1, ..., sim=TRUE){ mu <- pnorm(b0 + b1 * x) if(sim){ y <- rbinom(n=length(x), size=1, prob=mu) return(y) }else{ return(mu) } } ) Zelig/R/model-lognorm.R0000755000176200001440000001660013754260262014440 0ustar liggesusers#' Log-Normal Regression for Duration Dependent Variables #'@param formula a symbolic representation of the model to be #' estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the #' dependent variable and \code{x1} and \code{x2} are the explanatory #' variables, and \code{y}, \code{x1}, and \code{x2} are contained in the #' same dataset. (You may include more than two explanatory variables, #' of course.) The \code{+} symbol means ``inclusion'' not #' ``addition.'' You may also include interaction terms and main #' effects in the form \code{x1*x2} without computing them in prior #' steps; \code{I(x1*x2)} to include only the interaction term and #' exclude the main effects; and quadratic terms in the form #' \code{I(x1^2)}. #' @param model the name of a statistical model to estimate. #' For a list of other supported models and their documentation see: #' \url{http://docs.zeligproject.org/articles/}. #' @param data the name of a data frame containing the variables #' referenced in the formula or a list of multiply imputed data frames #' each having the same variable names and row numbers (created by #' \code{Amelia} or \code{\link{to_zelig_mi}}). #' @param ... additional arguments passed to \code{zelig}, #' relevant for the model to be estimated. #' @param by a factor variable contained in \code{data}. If supplied, #' \code{zelig} will subset #' the data frame based on the levels in the \code{by} variable, and #' estimate a model for each subset. This can save a considerable amount of #' effort. You may also use \code{by} to run models using MatchIt #' subclasses. #' @param cite If is set to 'TRUE' (default), the model citation will be printed #' to the console. #' @param robust defaults to FALSE. If TRUE, zelig() computes robust standard errors based #' on sandwich estimators (see and ) based on the options in cluster. #' @param cluster if robust = TRUE, you may select a variable to define groups of correlated #' observations. Let x3 be a variable that consists of either discrete numeric values, character #' strings, or factors that define strata. Then # 'z.out <- zelig(y ~ x1 + x2, robust = TRUE, cluster = "x3", model = "exp", data = mydata) #' means that the observations can be correlated within the strata defined by the variable x3, #' and that robust standard errors should be calculated according to those clusters. #' If robust = TRUE but cluster is not specified, zelig() assumes that each observation falls #' into its own cluster. #' #' #' @details #' Additional parameters avaialable to many models include: #' \itemize{ #' \item weights: vector of weight values or a name of a variable in the dataset #' by which to weight the model. For more information see: #' \url{http://docs.zeligproject.org/articles/weights.html}. #' \item bootstrap: logical or numeric. If \code{FALSE} don't use bootstraps to #' robustly estimate uncertainty around model parameters due to sampling error. #' If an integer is supplied, the number of boostraps to run. #' For more information see: #' \url{http://docs.zeligproject.org/articles/bootstraps.html}. #' } #' @return Depending on the class of model selected, \code{zelig} will return #' an object with elements including \code{coefficients}, \code{residuals}, #' and \code{formula} which may be summarized using #' \code{summary(z.out)} or individually extracted using, for example, #' \code{coef(z.out)}. See #' \url{http://docs.zeligproject.org/articles/getters.html} for a list of #' functions to extract model components. You can also extract whole fitted #' model objects using \code{\link{from_zelig_model}}. #' #'@examples #' library(Zelig) #' data(coalition) #' z.out <- zelig(Surv(duration, ciep12) ~ fract + numst2, model ="lognorm", data = coalition) #' summary(z.out) #' #' @seealso Vignette: \url{http://docs.zeligproject.org/articles/zelig_lognorm.html} #' @import methods #' @export Zelig-lognorm #' @exportClass Zelig-lognorm #' #' @include model-zelig.R zlognorm <- setRefClass("Zelig-lognorm", contains ="Zelig", fields = list(linkinv = "function")) zlognorm$methods( initialize = function() { callSuper() .self$name <- "lognorm" .self$authors <- "Matthew Owen, Olivia Lau, Kosuke Imai, Gary King" .self$packageauthors <- "Terry M Therneau, and Thomas Lumley" .self$year <- 2007 .self$description <- "Log-Normal Regression for Duration Dependent Variables" .self$fn <- quote(survival::survreg) .self$linkinv <- survreg.distributions[["lognormal"]]$itrans # JSON .self$outcome <- "discrete" .self$wrapper <- "lognorm" .self$acceptweights <- TRUE } ) zlognorm$methods( zelig = function(formula, ..., robust = FALSE, cluster = NULL, data, weights = NULL, by = NULL, bootstrap = FALSE) { localFormula <- formula # avoids CRAN warning about deep assignment from formula existing separately as argument and field .self$zelig.call <- match.call(expand.dots = TRUE) .self$model.call <- .self$zelig.call if (!(is.null(cluster) || robust)) stop("If cluster is specified, then `robust` must be TRUE") # Add cluster term if (robust || !is.null(cluster)) localFormula <- cluster.formula(localFormula, cluster) .self$model.call$dist <- "lognormal" .self$model.call$model <- FALSE callSuper(formula = localFormula, data = data, ..., robust = robust, cluster = cluster, weights = weights, by = by, bootstrap = bootstrap) if(!robust){ fn2 <- function(fc, data) { fc$data <- data return(fc) } robust.model.call <- .self$model.call robust.model.call$robust <- TRUE robust.zelig.out <- .self$data %>% group_by_(.self$by) %>% do(z.out = eval(fn2(robust.model.call, quote(as.data.frame(.))))$var ) .self$test.statistics<- list(robust.se = robust.zelig.out$z.out) } } ) zlognorm$methods( param = function(z.out, method="mvn") { if(identical(method,"mvn")){ coeff <- coef(z.out) mu <- c(coeff, log(z.out$scale)) cov <- vcov(z.out) simulations <- mvrnorm(.self$num, mu = mu, Sigma = cov) simparam.local <- as.matrix(simulations[, 1:length(coeff)]) simalpha <- as.matrix(simulations[, -(1:length(coeff))]) simparam.local <- list(simparam = simparam.local, simalpha = simalpha) return(simparam.local) } else if(identical(method,"point")){ return(list(simparam = t(as.matrix(coef(z.out))), simalpha = log(z.out$scale) )) } } ) zlognorm$methods( qi = function(simparam, mm) { alpha <- simparam$simalpha beta <- simparam$simparam coeff <- simparam$simparam eta <- coeff %*% t(mm) theta <- as.matrix(apply(eta, 2, linkinv)) ev <- exp(log(theta) + 0.5 * (exp(alpha))^2) pv <- as.matrix(rlnorm(n=length(ev), meanlog=log(theta), sdlog=exp(alpha)), nrow=length(ev), ncol=1) dimnames(ev) <- dimnames(theta) return(list(ev = ev, pv = pv)) } ) zlognorm$methods( mcfun = function(x, b0=0, b1=1, alpha=1, sim=TRUE){ .self$mcformula <- as.Formula("Surv(y.sim, event) ~ x.sim") mu <- b0 + b1 * x event <- rep(1, length(x)) y.sim <- rlnorm(n=length(x), meanlog=mu, sdlog=alpha) y.hat <- exp(mu + 0.5*alpha^2) if(sim){ mydata <- data.frame(y.sim=y.sim, event=event, x.sim=x) return(mydata) }else{ mydata <- data.frame(y.hat=y.hat, event=event, x.seq=x) return(mydata) } } ) Zelig/R/model-gamma-survey.R0000755000176200001440000001100013754260262015365 0ustar liggesusers#' Gamma Regression with Survey Weights #' #'@param formula a symbolic representation of the model to be #' estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the #' dependent variable and \code{x1} and \code{x2} are the explanatory #' variables, and \code{y}, \code{x1}, and \code{x2} are contained in the #' same dataset. (You may include more than two explanatory variables, #' of course.) The \code{+} symbol means ``inclusion'' not #' ``addition.'' You may also include interaction terms and main #' effects in the form \code{x1*x2} without computing them in prior #' steps; \code{I(x1*x2)} to include only the interaction term and #' exclude the main effects; and quadratic terms in the form #' \code{I(x1^2)}. #'@param model the name of a statistical model to estimate. #' For a list of other supported models and their documentation see: #' \url{http://docs.zeligproject.org/articles/}. #'@param data the name of a data frame containing the variables #' referenced in the formula or a list of multiply imputed data frames #' each having the same variable names and row numbers (created by #' \code{Amelia} or \code{\link{to_zelig_mi}}). #'@param ... additional arguments passed to \code{zelig}, #' relevant for the model to be estimated. #'@param by a factor variable contained in \code{data}. If supplied, #' \code{zelig} will subset #' the data frame based on the levels in the \code{by} variable, and #' estimate a model for each subset. This can save a considerable amount of #' effort. You may also use \code{by} to run models using MatchIt #' subclasses. #'@param cite If is set to 'TRUE' (default), the model citation will be printed #' to the console. #' #' @details #' Additional parameters avaialable to this model include: #' \itemize{ #' \item \code{weights}: vector of weight values or a name of a variable in the dataset #' by which to weight the model. For more information see: #' \url{http://docs.zeligproject.org/articles/weights.html}. #' \item \code{bootstrap}: logical or numeric. If \code{FALSE} don't use bootstraps to #' robustly estimate uncertainty around model parameters due to sampling error. #' If an integer is supplied, the number of boostraps to run. #' For more information see: #' \url{http://docs.zeligproject.org/articles/bootstraps.html}. #' } #' @return Depending on the class of model selected, \code{zelig} will return #' an object with elements including \code{coefficients}, \code{residuals}, #' and \code{formula} which may be summarized using #' \code{summary(z.out)} or individually extracted using, for example, #' \code{coef(z.out)}. See #' \url{http://docs.zeligproject.org/articles/getters.html} for a list of #' functions to extract model components. You can also extract whole fitted #' model objects using \code{\link{from_zelig_model}}. #'@examples #' library(Zelig) #' data(api, package="survey") #' z.out1 <- zelig(api00 ~ meals + yr.rnd, model = "gamma.survey", #' weights = ~pw, data = apistrat) #' summary(z.out1) #' #' @seealso Vignette: \url{http://docs.zeligproject.org/articles/zelig_gammasurvey.html} #' @import methods #' @export Zelig-gamma #' @exportClass Zelig-gamma #' #' @include model-zelig.R #' @include model-survey.R #' @include model-gamma.R zgammasurvey <- setRefClass("Zelig-gamma-survey", contains = c("Zelig-survey", "Zelig-gamma")) zgammasurvey$methods( initialize = function() { callSuper() .self$name <- "gamma-survey" .self$family <- "Gamma" .self$link <- "inverse" .self$linkinv <- eval(call(.self$family, .self$link))$linkinv .self$category <- "continuous" .self$description = "Gamma Regression with Survey Weights" # JSON from parent .self$wrapper <- "gamma.survey" } ) zgammasurvey$methods( param = function(z.out, method="mvn") { shape <- MASS::gamma.shape(z.out) if(identical(method,"mvn")){ simalpha <- rnorm(n = .self$num, mean = shape$alpha, sd = shape$SE) simparam.local <- mvrnorm(n = .self$num, mu = coef(z.out), Sigma = vcov(z.out)) simparam.local <- list(simparam = simparam.local, simalpha = simalpha) return(simparam.local) } else if(identical(method,"point")){ return(list(simparam = t(as.matrix(coef(z.out))), simalpha = shape$alpha)) } } ) zgammasurvey$methods( mcfun = function(x, b0=0, b1=1, alpha=1, sim=TRUE){ lambda <- 1/(b0 + b1 * x) if(sim){ y <- rgamma(n=length(x), shape=alpha, scale = lambda) return(y) }else{ return(alpha * lambda) } } ) Zelig/R/model-survey.R0000755000176200001440000001020313754260262014311 0ustar liggesusers#' Survey models in Zelig for weights for complex sampling designs #' #' @import methods #' @export Zelig-survey #' @exportClass Zelig-survey #' #' @include model-zelig.R zsurvey <- setRefClass("Zelig-survey", contains = "Zelig") zsurvey$methods(initialize = function() { callSuper() .self$fn <- quote(survey::svyglm) .self$packageauthors <- "Thomas Lumley" .self$modelauthors <- "Nicholas Carnes" .self$acceptweights <- TRUE }) zsurvey$methods(zelig = function(formula, data, ids = ~1, probs = NULL, strata = NULL, fpc = NULL, nest = FALSE, check.strata = !nest, repweights = NULL, type = NULL, combined.weights = FALSE, rho = NULL, bootstrap.average = NULL, scale = NULL, rscales = NULL, fpctype = "fraction", ..., weights = NULL, by = NULL, bootstrap = FALSE) { .self$zelig.call <- match.call(expand.dots = TRUE) warning("Not all features are available in Zelig Survey.\nConsider using surveyglm and setx directly.\nFor details see: .", call. = FALSE) recastString2Formula <- function(a) { if (is.character(a)) { a <- as.Formula(paste("~", a)) } return(a) } extract_vector <- function(x, df = data) { if ("formula" %in% class(x)) x <- as.character(x)[[2]] if (is.character(x)) if (x %in% names(df)) x <- df[, x] return(x) } checkLogical <- function(a, name = "") { if (!("logical" %in% class(a))) { cat(paste("Warning: argument ", name, " is a logical and should be set to TRUE for FALSE.", sep = "")) return(FALSE) } else { return(TRUE) } } localWeights <- weights # avoids CRAN warning about deep assignment from treatment existing separately as argument and field ## Check arguments: ## Zelig generally accepts formula names of variables present in dataset, but survey ## package looks for formula expressions or data frames, so make conversion of any ## character arguments. ids <- recastString2Formula(ids) probs <- recastString2Formula(probs) # Convert to vector from data frame as formula experssion for weights was # not being passed localWeights <- extract_vector(localWeights) #localWeights <- recastString2Formula(localWeights) strata <- recastString2Formula(strata) fpc <- recastString2Formula(fpc) checkforerror <- checkLogical(nest, "nest") checkforerror <- checkLogical(check.strata, "check.strata") repweights <- recastString2Formula(repweights) # type should be a string checkforerror <- checkLogical(combined.weights, "combined.weights") # rho is shrinkage factor scale is scaling constant rscales is scaling constant if (is.null(repweights)) { design <- survey::svydesign(data = data, ids = ids, probs = probs, strata = strata, fpc = fpc, nest = nest, check.strata = check.strata, weights = localWeights) } else { design <- survey::svrepdesign(data = data, repweights = repweights, type = type, weights = localWeights, combined.weights = combined.weights, rho = rho, bootstrap.average = bootstrap.average, scale = scale, rscales = rscales, fpctype = fpctype, fpc = fpc) } .self$model.call <- as.call(list(.self$fn, formula = .self$zelig.call$formula, design = design)) # fn will be set again by super, but initialized here for clarity .self$model.call$family <- call(.self$family, .self$link) callSuper(formula = formula, data = data, weights = localWeights, ..., by = by, bootstrap = bootstrap) }) Zelig/R/model-arima.R0000755000176200001440000004357713754260262014071 0ustar liggesusers#' Autoregressive and Moving-Average Models with Integration for Time-Series Data #' #' Warning: \code{summary} does not work with timeseries models after #' simulation. #' #' @param formula a symbolic representation of the model to be #' estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the #' dependent variable and \code{x1} and \code{x2} are the explanatory #' variables, and \code{y}, \code{x1}, and \code{x2} are contained in the #' same dataset. (You may include more than two explanatory variables, #' of course.) The \code{+} symbol means ``inclusion'' not #' ``addition.'' You may also include interaction terms and main #' effects in the form \code{x1*x2} without computing them in prior #' steps; \code{I(x1*x2)} to include only the interaction term and #' exclude the main effects; and quadratic terms in the form #' \code{I(x1^2)}. #' @param model the name of a statistical model to estimate. #' For a list of supported models and their documentation see: #' \url{http://docs.zeligproject.org/articles/}. #' @param data the name of a data frame containing the variables #' referenced in the formula or a list of multiply imputed data frames #' each having the same variable names and row numbers (created by #' \code{Amelia} or \code{\link{to_zelig_mi}}). #' @param ... additional arguments passed to \code{zelig}, #' relevant for the model to be estimated. #' @param by a factor variable contained in \code{data}. If supplied, #' \code{zelig} will subset #' the data frame based on the levels in the \code{by} variable, and #' estimate a model for each subset. This can save a considerable amount of #' effort. For example, to run the same model on all fifty states, you could #' use: \code{z.out <- zelig(y ~ x1 + x2, data = mydata, model = 'ls', #' by = 'state')} You may also use \code{by} to run models using MatchIt #' subclasses. #' @param cite If is set to 'TRUE' (default), the model citation will be printed #' to the console. #' @param ts The name of the variable containing the time indicator. This should be passed in as #' a string. If this variable is not provided, Zelig will assume that the data is already #' ordered by time. #' @param cs Name of a variable that denotes the cross-sectional element of the data, for example, #' country name in a dataset with time-series across different countries. As a variable name, #' this should be in quotes. If this is not provided, Zelig will assume that all observations #' come from the same unit over time, and should be pooled, but if provided, individual models will #' be run in each cross-section. #' If \code{cs} is given as an argument, \code{ts} must also be provided. Additionally, \code{by} #' must be \code{NULL}. #' @param order A vector of length 3 passed in as \code{c(p,d,q)} where p represents the order of the #' autoregressive model, d represents the number of differences taken in the model, and q represents #' the order of the moving average model. #' @details #' Currently only the Reference class syntax for time series. This model does not accept #' Bootstraps or weights. #' #' #' @return Depending on the class of model selected, \code{zelig} will return #' an object with elements including \code{coefficients}, \code{residuals}, #' and \code{formula} which may be summarized using #' \code{summary(z.out)} or individually extracted using, for example, #' \code{coef(z.out)}. See #' \url{http://docs.zeligproject.org/articles/getters.html} for a list of #' functions to extract model components. You can also extract whole fitted #' model objects using \code{\link{from_zelig_model}}. #' @examples #' data(seatshare) #' subset <- seatshare[seatshare$country == "UNITED KINGDOM",] #' ts.out <- zarima$new() #' ts.out$zelig(unemp ~ leftseat, order = c(1, 0, 1), data = subset) #' #' # Set fitted values and simulate quantities of interest #' ts.out$setx(leftseat = 0.75) #' ts.out$setx1(leftseat = 0.25) #' ts.out$sim() #' #' @seealso Vignette: \url{http://docs.zeligproject.org/articles/zelig_arima.html} #' @import methods #' @export Zelig-arima #' @exportClass Zelig-arima #' #' @include model-zelig.R #' @include model-timeseries.R zarima <- setRefClass("Zelig-arima", contains = "Zelig-timeseries") zarima$methods( initialize = function() { callSuper() .self$name <- "arima" .self$link <- "identity" #.self$family <- "gaussian" .self$fn <- quote(zeligArimaWrapper) #.self$linkinv <- eval(call(.self$family, .self$link))$linkinv .self$description <- "Autoregressive Moving-Average Models for Time-Series Data" # JSON .self$outcome <- "continuous" .self$wrapper <- "timeseries" } ) zarima$methods( qi = function(simparam, mm, mm1=NULL){ myorder <- eval(.self$zelig.call$order) mycoef <- coef(.self$zelig.out$z.out[[1]]) sd <- sqrt(.self$zelig.out$z.out[[1]]$sigma2) ## Check mm and mm1. Particularly for issues surrounding intercept. rebuildMM <- function(simparam, x){ xnames <- colnames(x) snames <- colnames(simparam) ## parameter "intercept" can be spelt "(Intercept)"" in model matrix if("(Intercept)" %in% xnames){ flag <- xnames == "(Intercept)" xnames[flag] <- "intercept" colnames(x)[flag]<- "intercept" # this is equivalent to: colnames(x) <- xnames } ## "intercept" can be included in model matrix when not an estimated parameter (for example in models with integration) xnamesflag <- xnames %in% snames x <- x[, xnamesflag, drop=FALSE] return(x) } mm <- rebuildMM(simparam, mm) if(!is.null(mm1)){ mm1 <- rebuildMM(simparam, mm1) } ## Make ACF acf <- simacf(coef=mycoef, order=myorder, params=simparam, alpha=0.05) acf.length <- length(acf$expected.acf) t1 <- 2*acf.length t2 <- 2*acf.length if((.self$bsetx1)||(.self$bsetx && !.self$bsetx1)){ # could also check if mm1 is NULL # zeligARMAbreakforecaster() calls zeligARMAlongrun() internally # return(y.shock = yseries, y.innovation = y.innov, ev.shock = evseries, ev.innovation = ev.innov) yseries <- zeligARMAbreakforecaster(y.init=NULL, x=mm, x1=mm1, simparam=simparam, order=myorder, sd=sd, t1=t1, t2=t2) # maybe check nrow(yseries)=t1 + t2 ? pv <- yseries$y.innovation[t1,] # could use either $innovation or $shock here pv.shortrun <- yseries$y.innovation[t1+1,] # could use either $innovation or $shock here pv.longrun <- yseries$y.innovation[t1+t2,] # must use $innovation here # Remember, these are expectations using the same simparam in each expectation. ev <- yseries$ev.innovation[t1,] ev.shortrun <- yseries$ev.innovation[t1+1,] ev.longrun <- yseries$ev.innovation[t1+t2,] return(list(acf = acf, ev = ev, pv = pv, pv.shortrun=pv.shortrun, pv.longrun=pv.longrun, ev.shortrun=ev.shortrun, ev.longrun=ev.longrun, pvseries.shock=yseries$y.shock, pvseries.innovation=yseries$y.innovation, evseries.shock=yseries$ev.shock, evseries.innovation=yseries$ev.innovation)) }else{ # just call zeligARMAlongrun() yseries <- zeligARMAlongrun(y.init=NULL, x=mm, simparam=simparam, order=myorder, sd=sd) pv <- yseries$y[1,] # zeligARMAlongrun returns the series in reverse order to zeligARMAbreakforecaster # Remember, these are expectations using the same simparam in each expectation: ev <- yseries$ev[1,] return(list(acf = acf, ev = ev, pv = pv)) } } ) zarima$methods( mcfun = function(x, b0=0, b1=1, ..., sim=TRUE){ mu <- exp(b0 + b1 * x) if(sim){ y <- rnorm(n=length(x), mean=mu) return(y) }else{ return(mu) } } ) #' Estimation wrapper function for arima models, to easily fit with Zelig architecture #' @keywords internal zeligArimaWrapper <- function(formula, order = c(1, 0, 0), ... , include.mean = TRUE, data){ # Using with(): # myArimaCall <- quote( arima(x=, order =, xreg= ) ) # output <- with(data, myArimaCall ) # Using arima() directly: mf <- model.frame(formula, data) acf3 <- as.character(formula[[3]]) yflag <- names(mf) %in% all.vars(formula[-3]) xflag <- names(mf) %in% all.vars(formula[-2]) myx <- as.matrix(mf[,yflag, drop = FALSE]) # could use get_all_vars() is_varying(as.vector(myx), msg = 'Dependent variable does not vary for at least one of the cases.') myxreg <- as.matrix(mf[,xflag, drop = FALSE]) if (("1" %in% acf3 ) & ("-" %in% acf3 )){ include.mean <- FALSE } output <- stats::arima(x = myx, order = order, xreg = myxreg, include.mean = include.mean, ...) } #' Construct Autocorrelation Function from Zelig object and simulated parameters #' @keywords internal simacf <- function(coef, order, params, alpha = 0.5){ #order <- eval(.self$zelig.call$order) myar <- myma <- myar.seq <- myma.seq <- NULL if(order[1]>0){ arnames <- paste("ar", 1:order[1], sep="") myar <- coef[arnames] myar.seq <- params[, arnames, drop=FALSE] } if(order[3]>0){ manames <- paste("ma", 1:order[3], sep="") myma <- coef[manames] myma.seq <- params[, manames, drop=FALSE] } mylag.max<-10 # Need to set automatically. n.sims<-nrow(params) expected.acf <- ARMAacf(ar=myar, ma=myma, lag.max=mylag.max) acf.history<-matrix(NA, nrow=n.sims, ncol=length(expected.acf)) # length(expected.acf) = mylag.max +1 for(i in 1:n.sims){ acf.history[i,] <- ARMAacf(ar=myar.seq[i,], ma=myma.seq[i,], lag.max=mylag.max) } # Define functions to compute confidence intervals for each column in a matrix ci.matrix <- function(x, alpha) { pos.hi <- max(round((1-(alpha/2))*nrow(x)), 1) pos.low <-max(round((alpha/2)*nrow(x)), 1) ci.lower <- ci.upper <- rep(NA, ncol(x)) for(i in 1:ncol(x)){ temp<-sort(x[,i]) ci.lower[i]<-temp[pos.low] ci.upper[i]<-temp[pos.hi] } return(list(ci.lower=ci.lower, ci.upper=ci.upper)) } ci.acf <- ci.matrix(x=acf.history, alpha=0.05) return(list(expected.acf=expected.acf, ci.acf=ci.acf, sims.acf=acf.history)) } #' Construct Simulated Next Step in Dynamic Series #' @keywords internal zeligARMAnextstep <- function(yseries=NULL, xseries, wseries=NULL, beta, ar=NULL, i=NULL, ma=NULL, sd){ ## Check inputs # t is obs across time # s is sims # k is covariates # order is (p,q,r) # assume yseries (t x sims), xseries (t x k), wseries (t x s), beta (s x k), ar (s x p), ma (s x r) are matrix # assume sd is scalar ## Could construct these by using known order more deliberatively if(is.vector(yseries)){ #print("warning: yseries is vector") yseries <- matrix(yseries, nrow=1) # Assume if y is a vector, that we are only running one simulation chain of y, so y is (t x 1) } if(is.vector(xseries)){ #print("warning: xseries is vector") xseries <- matrix(xseries, nrow=1) # Assume if x is a vector, that there are no lagged terms, so x is (1 x k) } if(is.vector(wseries)){ #print("warning: wseries is vector") wseries <- matrix(wseries, nrow=1) # Assume if w is a vector, that we are only running one simulation chain of y, so w is (t x 1) } if(is.vector(beta)){ #print("warning: beta is vector") beta <- matrix(beta, ncol=1) } if(is.vector(ar)){ #print("warning: ar is vector") ar <- matrix(ar, ncol=1) } if(is.vector(ma)){ #print("warning: ma is vector") ma <- matrix(ma, ncol=1) } ar.term <- function(yseries, ar, n){ yshort <- yseries[1:ncol(ar), , drop=FALSE] # because we only need the diagonal of a square matrix, we can avoid full matrix multiplication return( rowSums( ar * t(yshort) ) ) # diag[(s x p) . (p x s)] = diag[(s x s)] = (s x 1) } xt.term <- function(xseries, beta){ return( as.vector(beta %*% t(xseries)) ) # (s x k) . t(1 x k) = (s x 1) } ma.term <- function(wseries, ma){ wshort <- wseries[1:ncol(ma), , drop=FALSE] return( rowSums( ma * t(wshort)) ) # diag[(s x r) . (r x s)] = diag[(s x s)] = (s x 1) } n.sims <- ncol(yseries) w <- rnorm(n=n.sims, mean=0, sd=sd) y <- xt.term(xseries,beta) + w # conformable if xt is vector and w vector if(!is.null(ar)){ y <- y + ar.term(yseries,ar) # conformable if y vector and ar vector } if(!is.null(ma)){ y <- y + ma.term(wseries,ma) # conformable if y vector and ma vector } exp.y <- y - w # one interpretation of an EV QI: E(y| l(w), l(y)) return(list(y=y, w=w, exp.y=exp.y)) } #' Calculate the Long Run Exquilibrium for Fixed X #' @keywords internal zeligARMAlongrun <- function(y.init=NULL, x, simparam, order, sd, tol=NULL, burnin=20){ if(is.null(tol)){ tol<-0.01 } ar <- i <- ma <- NULL ## Ensure parameter simulations in same order as model matrix xnames <- colnames(x) beta <- simparam[,xnames] ## Extract AR and MA terms if(order[1]>0){ arnames <- paste("ar", 1:order[1], sep="") ar <- simparam[,arnames] } if(order[3]>0){ manames <- paste("ma", 1:order[3], sep="") ma <- simparam[,manames] } timepast <- max(order[1],order[3]) n.sims <- nrow(simparam) if(is.vector(x)){ x<-matrix(x,nrow=1, ncol=length(x)) } if(is.null(y.init)){ if (!is.matrix(beta)) beta <- matrix(beta, ncol = 1) betabar <- t(apply(beta, 2, mean)) y.init <- x %*% t(beta) } yseries <- matrix(y.init, nrow=timepast, ncol=n.sims, byrow=TRUE) wseries <- matrix(rnorm(n=timepast*n.sims), nrow=timepast, ncol=n.sims) evseries <- matrix(NA, nrow=timepast, ncol=n.sims) finished <- FALSE count <- 0 while(!finished){ y <- zeligARMAnextstep(yseries=yseries[1:timepast, ], xseries=x, wseries=wseries[1:timepast, ], beta = beta, ar = ar, i = i, ma = ma, sd = sd) yseries <- rbind(y$y, yseries) wseries <- rbind(y$w, wseries) evseries<- rbind(y$exp.y, evseries) #diff <- mean(abs(y.1 - y.0)) # Eventually need to determine some automated stopping rule count <- count+1 finished <- count > burnin #| (diff < tol) } return(list(y.longrun=yseries, w.longrun=wseries, ev.longrun=evseries)) } #' Construct Simulated Series with Internal Discontinuity in X #' @keywords internal zeligARMAbreakforecaster <- function(y.init=NULL, x, x1, simparam, order, sd, t1=5, t2=10){ longrun.out <- zeligARMAlongrun(y.init=y.init, x=x, simparam=simparam, order=order, sd=sd) yseries <- longrun.out$y.longrun wseries <- longrun.out$w.longrun evseries <- longrun.out$ev.longrun ## Ensure parameter simulations in same order as model matrix xnames <- colnames(x) beta <- simparam[,xnames] ## Extract AR and MA terms ar <- i <- ma <- NULL if(order[1]>0){ arnames <- paste("ar", 1:order[1], sep="") ar <- simparam[,arnames] } if(order[3]>0){ manames <- paste("ma", 1:order[3], sep="") ma <- simparam[,manames] } timepast <- max(order[1],order[3]) # How many steps backward are needed in the series -- could we be more precise? # Take a step at covariates x for(i in 2:t1){ nextstep <- zeligARMAnextstep(yseries=yseries[1:timepast, ], xseries=x, wseries=wseries[1:timepast, ], beta=beta, ar=ar, i=i, ma=ma, sd=sd) yseries <- rbind(nextstep$y, yseries) # Could just change arguments so nextstep(nextstep) doesn't need to copy elsewhere. wseries <- rbind(nextstep$w, wseries) evseries <- rbind(nextstep$exp.y, evseries) } # Introduce shock nextstep <- zeligARMAnextstep(yseries=yseries[1:timepast, ], xseries=x1, wseries=wseries[1:timepast, ], beta=beta, ar=ar, i=i, ma=ma, sd=sd) yseries <- rbind(nextstep$y, yseries) # Could just change arguments so nextstep(nextstep) doesn't need to copy elsewhere. wseries <- rbind(nextstep$w, wseries) evseries <- rbind(nextstep$exp.y, evseries) y.innov <- yseries w.innov <- wseries # Note: sequence of stocastic terms are going to depart now ev.innov <- evseries for(i in 2:t2){ # Take further steps at covariates x1 (an introduction of an innovation) nextstep <- zeligARMAnextstep(yseries=y.innov[1:timepast, ], xseries=x1, wseries=w.innov[1:timepast, ], beta=beta, ar=ar, i=i, ma=ma, sd=sd) y.innov <- rbind(nextstep$y, y.innov) # Could just change arguments so nextstep(nextstep) doesn't need to copy elsewhere. w.innov <- rbind(nextstep$w, w.innov) ev.innov <- rbind(nextstep$exp.y, ev.innov) # And take steps returning to old covariates (an introduction of a shock) nextstep <- zeligARMAnextstep(yseries=yseries[1:timepast, ], xseries=x, wseries=wseries[1:timepast, ], beta=beta, ar=ar, i=i, ma=ma, sd=sd) yseries <- rbind(nextstep$y, yseries) # Could just change arguments so nextstep(nextstep) doesn't need to copy elsewhere. wseries <- rbind(nextstep$w, wseries) evseries <- rbind(nextstep$exp.y, evseries) } yseries <- yseries[1:(t1 + t2), ] # Truncate series to last periods, removing burn-in to equilibrium y.innov <- y.innov[1:(t1 + t2), ] evseries <- evseries[1:(t1 + t2), ] ev.innov <- ev.innov[1:(t1 + t2), ] yseries <- yseries[nrow(yseries):1,] # Change y to conventional row ordering by time before returning y.innov <- y.innov[nrow(y.innov):1,] evseries <- evseries[nrow(evseries):1, ] ev.innov <- ev.innov[nrow(ev.innov):1, ] return(list(y.shock = yseries, y.innovation = y.innov, ev.shock = evseries, ev.innovation = ev.innov)) } Zelig/R/model-poisson-gee.R0000755000176200001440000001101213754260262015203 0ustar liggesusers#' Generalized Estimating Equation for Poisson Regression #' @param formula a symbolic representation of the model to be #' estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the #' dependent variable and \code{x1} and \code{x2} are the explanatory #' variables, and \code{y}, \code{x1}, and \code{x2} are contained in the #' same dataset. (You may include more than two explanatory variables, #' of course.) The \code{+} symbol means ``inclusion'' not #' ``addition.'' You may also include interaction terms and main #' effects in the form \code{x1*x2} without computing them in prior #' steps; \code{I(x1*x2)} to include only the interaction term and #' exclude the main effects; and quadratic terms in the form #' \code{I(x1^2)}. #'@param model the name of a statistical model to estimate. #' For a list of other supported models and their documentation see: #' \url{http://docs.zeligproject.org/articles/}. #'@param data the name of a data frame containing the variables #' referenced in the formula or a list of multiply imputed data frames #' each having the same variable names and row numbers (created by #' \code{Amelia} or \code{\link{to_zelig_mi}}). #'@param ... additional arguments passed to \code{zelig}, #' relevant for the model to be estimated. #'@param by a factor variable contained in \code{data}. If supplied, #' \code{zelig} will subset #' the data frame based on the levels in the \code{by} variable, and #' estimate a model for each subset. This can save a considerable amount of #' effort. You may also use \code{by} to run models using MatchIt #' subclasses. #'@param cite If is set to 'TRUE' (default), the model citation will be printed #' to the console. #'@param id: where id is a variable which identifies the clusters. The data should #'be sorted by id and should be ordered within each cluster when appropriate #'@param corstr: character string specifying the correlation structure: "independence", #'"exchangeable", "ar1", "unstructured" and "userdefined" #'@param geeglm: See geeglm in package geepack for other function arguments #' #' @details #' Additional parameters avaialable to this model include: #' \itemize{ #' \item \code{weights}: vector of weight values or a name of a variable in the dataset #' by which to weight the model. For more information see: #' \url{http://docs.zeligproject.org/articles/weights.html}. #' \item \code{bootstrap}: logical or numeric. If \code{FALSE} don't use bootstraps to #' robustly estimate uncertainty around model parameters due to sampling error. #' If an integer is supplied, the number of boostraps to run. #' For more information see: #' \url{http://docs.zeligproject.org/articles/bootstraps.html}. #' } #' @return Depending on the class of model selected, \code{zelig} will return #' an object with elements including \code{coefficients}, \code{residuals}, #' and \code{formula} which may be summarized using #' \code{summary(z.out)} or individually extracted using, for example, #' \code{coef(z.out)}. See #' \url{http://docs.zeligproject.org/articles/getters.html} for a list of #' functions to extract model components. You can also extract whole fitted #' model objects using \code{\link{from_zelig_model}}. #' #' #'@examples #' library(Zelig) #' data(sanction) #' sanction$cluster <- c(rep(c(1:15), 5), rep(c(16), 3)) #' sorted.sanction <- sanction[order(sanction$cluster),] #' z.out <- zelig(num ~ target + coop, model = "poisson.gee",id = "cluster", data = sorted.sanction) #' summary(z.out) #' #'@seealso Vignette: \url{http://docs.zeligproject.org/articles/zelig_poissongee.html} #' @import methods #' @export Zelig-poisson-gee #' @exportClass Zelig-poisson-gee #' #' @include model-zelig.R #' @include model-gee.R #' @include model-poisson.R zpoissongee <- setRefClass("Zelig-poisson-gee", contains = c("Zelig-gee", "Zelig-poisson")) zpoissongee$methods( initialize = function() { callSuper() .self$name <- "poisson-gee" .self$family <- "poisson" .self$link <- "log" .self$linkinv <- eval(call(.self$family, .self$link))$linkinv .self$year <- 2011 .self$category <- "continuous" .self$authors <- "Patrick Lam" .self$description = "General Estimating Equation for Poisson Regression" .self$fn <- quote(geepack::geeglm) # JSON from parent .self$wrapper <- "poisson.gee" } ) zpoissongee$methods( param = function(z.out, method="mvn") { simparam.local <- callSuper(z.out, method=method) return(simparam.local$simparam) # no ancillary parameter } ) Zelig/R/model-relogit.R0000755000176200001440000003210613754260262014427 0ustar liggesusers#' Rare Events Logistic Regression for Dichotomous Dependent Variables #'@param formula a symbolic representation of the model to be #' estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the #' dependent variable and \code{x1} and \code{x2} are the explanatory #' variables, and \code{y}, \code{x1}, and \code{x2} are contained in the #' same dataset. (You may include more than two explanatory variables, #' of course.) The \code{+} symbol means ``inclusion'' not #' ``addition.'' You may also include interaction terms and main #' effects in the form \code{x1*x2} without computing them in prior #' steps; \code{I(x1*x2)} to include only the interaction term and #' exclude the main effects; and quadratic terms in the form #' \code{I(x1^2)}. #'@param model the name of a statistical model to estimate. #' For a list of other supported models and their documentation see: #' \url{http://docs.zeligproject.org/articles/}. #'@param data the name of a data frame containing the variables #' referenced in the formula or a list of multiply imputed data frames #' each having the same variable names and row numbers (created by #' \code{Amelia} or \code{\link{to_zelig_mi}}). #'@param ... additional arguments passed to \code{zelig}, #' relevant for the model to be estimated. #'@param by a factor variable contained in \code{data}. If supplied, #' \code{zelig} will subset #' the data frame based on the levels in the \code{by} variable, and #' estimate a model for each subset. This can save a considerable amount of #' effort. You may also use \code{by} to run models using MatchIt #' subclasses. #'@param cite If is set to 'TRUE' (default), the model citation will be printed #' to the console. #' #' @details #' The relogit procedure supports four optional arguments in addition to the #' standard arguments for zelig(). You may additionally use: #' \itemize{ #' \item \code{tau}: a vector containing either one or two values for \code{tau}, #' the true population fraction of ones. Use, for example, tau = c(0.05, 0.1) to specify #' that the lower bound on tau is 0.05 and the upper bound is 0.1. If left unspecified, only #' finite-sample bias correction is performed, not case-control correction. #' \item \code{case.control}: if tau is specified, choose a method to correct for case-control #' sampling design: "prior" (default) or "weighting". #' \item \code{bias.correct}: a logical value of \code{TRUE} (default) or \code{FALSE} #' indicating whether the intercept should be corrected for finite sample (rare events) bias. #' } #' #' Additional parameters avaialable to many models include: #' \itemize{ #' \item \code{weights}: vector of weight values or a name of a variable in the dataset #' by which to weight the model. For more information see: #' \url{http://docs.zeligproject.org/articles/weights.html}. #' \item \code{bootstrap}: logical or numeric. If \code{FALSE} don't use bootstraps to #' robustly estimate uncertainty around model parameters due to sampling error. #' If an integer is supplied, the number of boostraps to run. #' For more information see: #' \url{http://docs.zeligproject.org/articles/bootstraps.html}. #' } #' @return Depending on the class of model selected, \code{zelig} will return #' an object with elements including \code{coefficients}, \code{residuals}, #' and \code{formula} which may be summarized using #' \code{summary(z.out)} or individually extracted using, for example, #' \code{coef(z.out)}. See #' \url{http://docs.zeligproject.org/articles/getters.html} for a list of #' functions to extract model components. You can also extract whole fitted #' model objects using \code{\link{from_zelig_model}}. #' #' @examples #' library(Zelig) #' data(mid) #' z.out1 <- zelig(conflict ~ major + contig + power + maxdem + mindem + years, #' data = mid, model = "relogit", tau = 1042/303772) #' summary(z.out1) #' #' @seealso Vignette: \url{http://docs.zeligproject.org/articles/zelig_relogit.html} #' @import methods #' @export Zelig-relogit #' @exportClass Zelig-relogit #' #' @include model-zelig.R #' @include model-glm.R #' @include model-binchoice.R #' @include model-logit.R zrelogit <- setRefClass("Zelig-relogit", contains = "Zelig", fields = list(family = "character", link = "character", linkinv = "function")) zrelogit$methods( initialize = function() { callSuper() .self$name <- "relogit" .self$description <- "Rare Events Logistic Regression for Dichotomous Dependent Variables" .self$fn <- quote(relogit) .self$family <- "binomial" .self$link <- "logit" .self$wrapper <- "relogit" ref1 <- bibentry( bibtype="Article", title = "Logistic Regression in Rare Events Data", author = c( person("Gary", "King"), person("Langche", "Zeng") ), journal = "Political Analysis", volume = 9, number = 2, year = 2001, pages = "137--163") ref2 <- bibentry( bibtype="Article", title = "Explaining Rare Events in International Relations", author = c( person("Gary", "King"), person("Langche", "Zeng") ), journal = "International Organization", volume = 55, number = 3, year = 2001, pages = "693--715") .self$refs<-c(.self$refs,ref1,ref2) } ) zrelogit$methods( show = function(odds_ratios = FALSE, ...) { if (.self$robust.se) { if (!.self$mi & !.self$bootstrap) { # Replace standard errors with robust standard errors cat("Model: \n") f5 <- .self$copy() obj <- f5$from_zelig_model() summ <- summary(obj) robust_model <- lmtest::coeftest(obj, vcov = sandwich::vcovHC(obj, "HC1")) summ$coefficients[, c(2:4)] <- robust_model[, c(2:4)] if (odds_ratios) { summ <- or_summary(summ, label_mod_se = "(OR, robust)") } else colnames(summ$coefficients)[2] <- paste(colnames(summ$coefficients)[2], "(robust)") print(summ) } else if (.self$mi || .self$bootstrap) stop("Weighted case control correction results are not currently available for multiply imputed or bootstrapped data.", call. = FALSE) } else if (!.self$robust.se & odds_ratios & !.self$mi & !.self$bootstrap) { cat("Model: \n") f5 <- .self$copy() obj <- f5$from_zelig_model() summ <- summary(obj) summ <- or_summary(summ) print(summ) } else { callSuper(...) } #print(base::summary(.self$zelig.out)) } ) zrelogit$methods( zelig = function(formula, ..., tau = NULL, bias.correct = NULL, case.control = NULL, data, by = NULL, bootstrap = FALSE) { if (!is.null(tau)) { if (any(tau <= 0)) stop("tau is the population proportion of 1's for the response variable.\nIt must be > 0.", call. = FALSE) } .self$zelig.call <- match.call(expand.dots = TRUE) .self$model.call <- .self$zelig.call # Catch NULL case.control if (is.null(case.control)) case.control <- "prior" if (case.control == "weighting") # See GitHub issue #295 .self$robust.se <- TRUE else if (length(.self$robust.se) == 0) .self$robust.se <- FALSE # Catch NULL bias.correct if (is.null(bias.correct)) bias.correct = TRUE # Construct formula. Relogit models have the structure: # cbind(y, 1-y) ~ x1 + x2 + x3 + ... + xN # Where y is the response. # form <- update(formula, cbind(., 1 - .) ~ .) # .self$model.call$formula <- form .self$model.call$case.control <- case.control .self$model.call$bias.correct <- bias.correct .self$model.call$tau <- tau callSuper(formula = formula, data = data, ..., weights = NULL, by = by, bootstrap = bootstrap) } ) zrelogit$methods( modcall_formula_transformer = function() { "Transform model call formula." # Construct formula. Relogit models have the structure: # cbind(y, 1-y) ~ x1 + x2 + x3 + ... + xN # Where y is the response. relogit_form <- update(.self$formula, cbind(., 1 - .) ~ .) .self$model.call$formula <- relogit_form } ) zrelogit$methods( qi = function(simparam, mm) { .self$linkinv <- eval(call(.self$family, .self$link))$linkinv coeff <- simparam eta <- simparam %*% t(mm) eta <- Filter(function (y) !is.na(y), eta) theta <- matrix(.self$linkinv(eta), nrow = nrow(coeff)) ev <- matrix(.self$linkinv(eta), ncol = ncol(theta)) pv <- matrix(nrow = nrow(ev), ncol = ncol(ev)) for (j in 1:ncol(ev)) pv[, j] <- rbinom(length(ev[, j]), 1, prob = ev[, j]) levels(pv) <- c(0, 1) return(list(ev = ev, pv = pv)) } ) #' Estimation function for rare events logit models #' #' @details This is intended as an internal function. Regular users should #' use \code{zelig} with \code{model = "relogit"}. #' #' @keywords internal relogit <- function(formula, data = sys.parent(), tau = NULL, bias.correct = TRUE, case.control = "prior", ...){ mf <- match.call() mf$tau <- mf$bias.correct <- mf$case.control <- NULL if (!is.null(tau)) { tau <- unique(tau) if (length(case.control) > 1) stop("You can only choose one option for case control correction.") ck1 <- grep("p", case.control) ck2 <- grep("w", case.control) if (length(ck1) == 0 & length(ck2) == 0) stop("choose either case.control = \"prior\" ", "or case.control = \"weighting\"") if (length(ck2) == 0) weighting <- FALSE else weighting <- TRUE } else weighting <- FALSE if (length(tau) >= 2) { stop("tau must be a vector of length less than or equal to 1. For multiple taus, estimate models individually.") # else if (length(tau) == 2) { # The following is not currently supported due to issue with summary # mf[[1]] <- relogit # res <- list() # mf$tau <- min(tau) # res$lower.estimate <- eval(as.call(mf), parent.frame()) # mf$tau <- max(tau) # res$upper.estimate <- eval(as.call(mf), parent.frame()) # res$formula <- formula # class(res) <- c("Relogit2", "Relogit") # return(res) } else { mf[[1]] <- glm mf$family <- binomial(link = "logit") y2 <- model.response(model.frame(mf$formula, data)) if (is.matrix(y2)) y <- y2[,1] else y <- y2 ybar <- mean(y) if (weighting) { w1 <- tau / ybar w0 <- (1-tau) / (1-ybar) wi <- w1 * y + w0 * (1 - y) mf$weights <- wi } res <- eval(as.call(mf), parent.frame()) res$call <- match.call(expand.dots = TRUE) res$tau <- tau X <- model.matrix(res) ## bias correction if (bias.correct){ pihat <- fitted(res) if (is.null(tau)) # w_i = 1 wi <- rep(1, length(y)) else if (weighting) res$weighting <- TRUE else { w1 <- tau/ybar w0 <- (1 - tau) / (1 - ybar) wi <- w1 * y + w0 * (1 - y) res$weighting <- FALSE } W <- pihat * (1 - pihat) * wi ##Qdiag <- diag(X%*%solve(t(X)%*%diag(W)%*%X)%*%t(X)) Qdiag <- lm.influence(lm(y ~ X - 1, weights = W), do.coef = FALSE)$hat / W if (is.null(tau)) # w_1=1 since tau=ybar xi <- 0.5 * Qdiag * (2 * pihat - 1) else xi <- 0.5 * Qdiag * ((1 + w1) * pihat - w1) # returns ISQ (2001, eq. 11) ## xi <- 0.5 * Qdiag * ((1 + w0) * pihat - w0) res$coefficients <- res$coefficients - lm(xi ~ X - 1, weights = W)$coefficients res$bias.correct <- TRUE } else res$bias.correct <- FALSE ## prior correction if (!is.null(tau) & !weighting){ if (tau <= 0 || tau >= 1) stop("\ntau needs to be between 0 and 1.\n") res$coefficients["(Intercept)"] <- res$coefficients["(Intercept)"] - log(((1 - tau) / tau) * (ybar / (1 - ybar))) res$prior.correct <- TRUE res$weighting <- FALSE } else res$prior.correct <- FALSE if (is.null(res$weighting)) res$weighting <- FALSE res$linear.predictors <- t(res$coefficients) %*% t(X) res$fitted.values <- 1 / (1 + exp(-res$linear.predictors)) res$zelig <- "Relogit" class(res) <- c("Relogit", "glm", "lm") return(res) } } zrelogit$methods(mcfun = function(x, b0 = 0, b1 = 1, alpha, mc.seed=123, keepall=FALSE, ..., sim = TRUE) { set.seed(mc.seed) mu <- 1/(1 + exp(-b0 - b1 * x)) y <- rbinom(n = length(x), size = 1, prob = mu) if(keepall){ flag <- rep(TRUE, length(x)) }else{ select <- runif(length(x)) % do(qi = .self$qi(.$simparam, .$mm, .$mm1)) %>% do(acf = .$qi$acf, ev = .$qi$ev, pv = .$qi$pv, ev.shortrun = .$qi$ev.shortrun, pv.shortrun = .$qi$pv.shortrun, ev.longrun = .$qi$ev.longrun, pv.longrun = .$qi$pv.longrun, pvseries.shock = .$qi$pvseries.shock, evseries.shock = .$qi$evseries.shock, pvseries.innovation = .$qi$pvseries.innovation, evseries.innovation = .$qi$evseries.innovation) d <- zelig_mutate(.self$sim.out$x, ev0 = .self$sim.out$x$ev) # Eventually, when ev moves, then this path for ev0 changes. (Or make movement happen after fd calculation.) d <- d %>% do(fd = .$ev.longrun - .$ev0) .self$sim.out$x <- zelig_mutate(.self$sim.out$x, fd = d$fd) #JH } ) ztimeseries$methods( simx1 = function() { d <- zelig_mutate(.self$zelig.out, simparam = .self$simparam$simparam) d <- zelig_mutate(d, mm = .self$setx.out$x$mm) d <- zelig_mutate(d, mm1 = .self$setx.out$x1$mm) # return(list(acf = acf, ev = ev, pv = pv, pv.shortrun=pv.shortrun, pv.longrun=pv.longrun, ev.shortrun=ev.shortrun, ev.longrun=ev.longrun, # pvseries.shock=yseries$y.shock, pvseries.innovation=yseries$y.innovation, # evseries.shock=yseries$ev.shock, evseries.innovation=yseries$ev.innovation)) .self$sim.out$x1 <- d %>% do(qi = .self$qi(.$simparam, .$mm, .$mm1)) %>% do(acf = .$qi$acf, ev = .$qi$ev, pv = .$qi$pv, ev.shortrun = .$qi$ev.shortrun, pv.shortrun = .$qi$pv.shortrun, ev.longrun = .$qi$ev.longrun, pv.longrun = .$qi$pv.longrun, pvseries.shock = .$qi$pvseries.shock, evseries.shock = .$qi$evseries.shock, pvseries.innovation = .$qi$pvseries.innovation, evseries.innovation = .$qi$evseries.innovation) # Will eventually have to then move acf, ev, and pv from .self$setx.out$x1 to .self$setx.out$x # This will also effect next line: d <- zelig_mutate(.self$sim.out$x1, ev0 = .self$sim.out$x1$ev) # Eventually, when ev moves, then this path for ev0 changes. (Or make movement happen after fd calculation.) d <- d %>% do(fd = .$ev.longrun - .$ev0) .self$sim.out$x1 <- zelig_mutate(.self$sim.out$x1, fd = d$fd) #JH } ) # replace sim method to skip {simx, simx1, simrange, simrange1} methods as they are not separable # instead go directly to qi method ztimeseries$methods( sim = function(num = 1000) { "Timeseries Method for Computing and Organizing Simulated Quantities of Interest" if (length(.self$num) == 0) .self$num <- num .self$simparam <- .self$zelig.out %>% do(simparam = .self$param(.$z.out)) # NOTE difference here from standard Zelig approach. # Normally these are done in sequence, but now we do one or the other. if (.self$bsetx1) { .self$simx1() } else { .self$simx() } } ) # There is no fitting summary function for objects of class Arima. # So this passes the object through to print, and z$summary() is essentially print(summary(x)). #' Summary of an object of class Arima #' @method summary Arima #' @param object An object of class Arima #' @param ... Additional parameters #' @return The original object #' @export summary.Arima = function(object, ...) object Zelig/R/model-ls.R0000755000176200001440000002053713754260262013405 0ustar liggesusers#' Least Squares Regression for Continuous Dependent Variables #'@param formula a symbolic representation of the model to be #' estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the #' dependent variable and \code{x1} and \code{x2} are the explanatory #' variables, and \code{y}, \code{x1}, and \code{x2} are contained in the #' same dataset. (You may include more than two explanatory variables, #' of course.) The \code{+} symbol means ``inclusion'' not #' ``addition.'' You may also include interaction terms and main #' effects in the form \code{x1*x2} without computing them in prior #' steps; \code{I(x1*x2)} to include only the interaction term and #' exclude the main effects; and quadratic terms in the form #' \code{I(x1^2)}. #'@param model the name of a statistical model to estimate. #' For a list of other supported models and their documentation see: #' \url{http://docs.zeligproject.org/articles/}. #'@param data the name of a data frame containing the variables #' referenced in the formula or a list of multiply imputed data frames #' each having the same variable names and row numbers (created by #' \code{Amelia} or \code{\link{to_zelig_mi}}). #'@param ... additional arguments passed to \code{zelig}, #' relevant for the model to be estimated. #'@param by a factor variable contained in \code{data}. If supplied, #' \code{zelig} will subset #' the data frame based on the levels in the \code{by} variable, and #' estimate a model for each subset. This can save a considerable amount of #' effort. You may also use \code{by} to run models using MatchIt #' subclasses. #'@param cite If is set to 'TRUE' (default), the model citation will be printed #' to the console. #' #'@details #' Additional parameters avaialable to this model include: #' \itemize{ #' \item \code{weights}: vector of weight values or a name of a variable in the dataset #' by which to weight the model. For more information see: #' \url{http://docs.zeligproject.org/articles/weights.html}. #' \item \code{bootstrap}: logical or numeric. If \code{FALSE} don't use bootstraps to #' robustly estimate uncertainty around model parameters due to sampling error. #' If an integer is supplied, the number of boostraps to run. #' For more information see: #' \url{http://docs.zeligproject.org/articles/bootstraps.html}. #' } #' @return Depending on the class of model selected, \code{zelig} will return #' an object with elements including \code{coefficients}, \code{residuals}, #' and \code{formula} which may be summarized using #' \code{summary(z.out)} or individually extracted using, for example, #' \code{coef(z.out)}. See #' \url{http://docs.zeligproject.org/articles/getters.html} for a list of #' functions to extract model components. You can also extract whole fitted #' model objects using \code{\link{from_zelig_model}}. #'@examples #' library(Zelig) #' data(macro) #' z.out1 <- zelig(unem ~ gdp + capmob + trade, model = "ls", data = macro, #' cite = FALSE) #' summary(z.out1) #' #' @seealso Vignette: \url{http://docs.zeligproject.org/articles/zelig_ls.html} #' @import methods #' @export Zelig-ls #' @exportClass Zelig-ls #' #' @include model-zelig.R zls <- setRefClass("Zelig-ls", contains = "Zelig") zls$methods( initialize = function() { callSuper() .self$name <- "ls" .self$year <- 2007 .self$category <- "continuous" .self$description <- "Least Squares Regression for Continuous Dependent Variables" .self$packageauthors <- "R Core Team" .self$fn <- quote(stats::lm) # JSON .self$outcome <- "continous" .self$wrapper <- "ls" .self$acceptweights <- TRUE } ) zls$methods( zelig = function(formula, data, ..., weights = NULL, by = NULL, bootstrap = FALSE) { .self$zelig.call <- match.call(expand.dots = TRUE) .self$model.call <- .self$zelig.call callSuper(formula = formula, data = data, ..., weights = weights, by = by, bootstrap = bootstrap) # Automated Background Test Statistics and Criteria rse <- lapply(.self$zelig.out$z.out, (function(x) vcovHC(x, type = "HC0"))) rse.se <- sqrt(diag(rse[[1]])) # Needs to work with "by" argument est.se <- sqrt(diag(.self$get_vcov()[[1]])) quickGim <- any( est.se > 1.5*rse.se | rse.se > 1.5*est.se ) .self$test.statistics<- list(robust.se = rse, gim.criteria = quickGim) } ) zls$methods( param = function(z.out, method="mvn") { if(identical(method,"mvn")){ return(list(simparam = mvrnorm(.self$num, coef(z.out), vcov(z.out)), simalpha = rep( summary(z.out)$sigma, .self$num) ) ) } else if(identical(method,"point")){ return(list(simparam = t(as.matrix(coef(z.out))), simalpha=summary(z.out)$sigma)) } else { stop("param called with method argument of undefined type.") } } ) zls$methods( qi = function(simparam, mm) { ev <- simparam$simparam %*% t(mm) pv <- as.matrix(rnorm(n=length(ev), mean=ev, sd=simparam$simalpha), nrow=length(ev), ncol=1) return(list(ev = ev, pv = pv)) } ) zls$methods( gim = function(B=50, B2=50) { ll.normal.bsIM <- function(par,y,X,sigma){ beta <- par[1:length(X)] sigma2 <- sigma -1/2 * (sum(log(sigma2) + (y -(X%*%beta))^2/sigma2)) } getVb<-function(Dboot){ Dbar <- matrix(apply(Dboot,2,mean),nrow=B, ncol=length(Dhat), byrow=TRUE) Diff <- Dboot - Dbar Vb <- (t(Diff) %*% Diff) / (nrow(Dboot)-1) return(Vb) } getSigma<-function(lm.obj){ return(sum(lm.obj$residuals^2)/(nrow(model.matrix(lm.obj))-ncol(model.matrix(lm.obj)))) } D.est<-function(formula,data){ lm1 <- lm(formula,data, y=TRUE) mm <- model.matrix(lm1) y <- lm1$y sigma <- getSigma(lm1) grad <- apply(cbind(y,mm),1,function(x) numericGradient(ll.normal.bsIM, lm1$coefficients, y=x[1], X=x[2:length(x)], sigma=sigma)) meat <- grad%*%t(grad) bread <- -solve(vcov(lm1)) Dhat <- nrow(mm)^(-1/2)* as.vector(diag(meat + bread)) return(Dhat) } D.est.vb<-function(formula,data){ lm1 <- lm(formula,data, y=TRUE) mm <- model.matrix(lm1) y <- lm1$y sigma <- getSigma(lm1) grad <- apply(cbind(y,mm),1,function(x) numericGradient(ll.normal.bsIM, lm1$coefficients, y=x[1], X=x[2:length(x)], sigma=sigma)) meat <- grad%*%t(grad) bread <- -solve(vcov(lm1)) Dhat <- nrow(mm)^(-1/2)* as.vector(diag(meat + bread)) muB<-lm1$fitted.values DB <- matrix(NA, nrow=B2, ncol=length(Dhat)) for(j in 1:B2){ yB2 <- rnorm(nrow(data), muB, sqrt(sigma)) lm1B2 <- lm(yB2 ~ mm-1) sigmaB2 <- getSigma(lm1B2) grad <- apply(cbind(yB2,model.matrix(lm1B2)),1,function(x) numericGradient(ll.normal.bsIM, lm1B2$coefficients, y=x[1], X=x[2:length(x)], sigma=sigmaB2)) meat <- grad%*%t(grad) bread <- -solve(vcov(lm1B2)) DB[j,] <- nrow(mm)^(-1/2)*diag((meat + bread)) } Vb <- getVb(DB) T<- t(Dhat)%*%solve(Vb)%*%Dhat return(list(Dhat=Dhat,T=T)) } Dhat <- D.est(formula=.self$formula, data=.self$data) lm1 <- lm(formula=.self$formula, data=.self$data) mu <- lm1$fitted.values sigma <- getSigma(lm1) n <- length(mu) yname <- all.vars(.self$formula[[2]]) Dboot <- matrix(NA, nrow=B, ncol=length(Dhat)) bootdata<-data for(i in 1:B){ yB <- rnorm(n, mu, sqrt(sigma)) bootdata[yname] <- yB result <- D.est.vb(formula=.self$formula, data=bootdata) Dboot[i,] <- result$Dhat T[i] <- result$T } Vb <- getVb(Dboot) omega <- t(Dhat) %*% solve(Vb) %*% Dhat pb = (B+1-sum(T< as.numeric(omega)))/(B+1) .self$test.statistics$gim <- list(stat=omega, pval=pb) # When method used, add to references gimreference <- bibentry( bibtype="Article", title = "How Robust Standard Errors Expose Methodological Problems They Do Not Fix, and What to Do About It", author = c( person("Gary", "King"), person("Margret E.", "Roberts") ), journal = "Political Analysis", year = 2014, pages = "1-21", url = "http://j.mp/InK5jU") .self$refs <- c(.self$refs, gimreference) } ) zls$methods( mcfun = function(x, b0=0, b1=1, alpha=1, sim=TRUE){ y <- b0 + b1*x + sim * rnorm(n=length(x), sd=alpha) return(y) } ) Zelig/R/plots.R0000755000176200001440000011441613754260262013032 0ustar liggesusers#' Plot Quantities of Interest in a Zelig-fashion #' #' Various graph generation for different common types of simulated results from #' Zelig #' @usage simulations.plot(y, y1=NULL, xlab="", ylab="", main="", col=NULL, line.col=NULL, #' axisnames=TRUE) #' @param y A matrix or vector of simulated results generated by Zelig, to be #' graphed. #' @param y1 For comparison of two sets of simulated results at different #' choices of covariates, this should be an object of the same type and #' dimension as y. If no comparison is to be made, this should be NULL. #' @param xlab Label for the x-axis. #' @param ylab Label for the y-axis. #' @param main Main plot title. #' @param col A vector of colors. Colors will be used in turn as the graph is #' built for main plot objects. For nominal/categorical data, this colors #' renders as the bar color, while for numeric data it renders as the background #' color. #' @param line.col A vector of colors. Colors will be used in turn as the graph is #' built for line color shading of plot objects. #' @param axisnames a character-vector, specifying the names of the axes #' @return nothing #' @author James Honaker simulations.plot <-function(y, y1=NULL, xlab="", ylab="", main="", col=NULL, line.col=NULL, axisnames=TRUE) { binarytest <- function(j){ if(!is.null(attr(j,"levels"))) return(identical( sort(levels(j)),c(0,1))) return(FALSE) } ## Univariate Plots ## if(is.null(y1)){ if (is.null(col)) col <- rgb(100,149,237,maxColorValue=255) if (is.null(line.col)) line.col <- "black" # Integer Values if ((length(unique(y))<11 & all(as.integer(y) == y)) | is.factor(y) | is.character(y)) { if(is.factor(y) | is.character(y)){ y <- as.numeric(y) } # Create a sequence of names nameseq <- paste("Y=", min(y):max(y), sep="") # Set the heights of the barplots. # Note that tablar requires that all out values are greater than zero. # So, we subtract the min value (ensuring everything is at least zero) # then add 1 bar.heights <- tabulate(y - min(y) + 1) / length(y) # Barplot with (potentially) some zero columns output <- barplot(bar.heights, xlab=xlab, ylab=ylab, main=main, col=col[1], axisnames=axisnames, names.arg=nameseq) # Vector of 1's and 0's } else if(ncol(as.matrix(y))>1 & binarytest(y) ){ n.y <- nrow(y) # Precedence is names > colnames > 1:n if(is.null(names(y))){ if(is.null(colnames(y) )){ all.names <- 1:n.y }else{ all.names <- colnames(y) } }else{ all.names <- names(y) } # Barplot with (potentially) some zero columns output <- barplot( apply(y,2,sum)/n.y, xlab=xlab, ylab=ylab, main=main, col=col[1], axisnames=axisnames, names.arg=all.names) # Continuous Values } else if(is.numeric(y)){ if(ncol(as.matrix(y))>1){ ncoly <- ncol(y) hold.dens <- list() ymax <- xmax <- xmin <- rep(0,ncol(y)) for(i in 1:ncoly){ hold.dens[[i]] <- density(y[,i]) ymax[i] <- max(hold.dens[[i]]$y) xmax[i] <- max(hold.dens[[i]]$x) xmin[i] <- min(hold.dens[[i]]$x) } shift <- 0:ncoly all.xlim <- c(min(xmin), max(xmax)) all.ylim <- c(0,ncoly) # Precedence is names > colnames > 1:n if(is.null(names(y))){ if(is.null(colnames(y) )){ all.names <- 1:ncoly }else{ all.names <- colnames(y) } }else{ all.names <- names(y) } shrink <- 0.9 for(i in 1:ncoly ){ if(i ((max(comp)-min(comp))/2) )+1]) } } axis(side=1,labels=nameseq, at=seq(0,1,length=n.y), cex.axis=1, las=1) axis(side=2,labels=nameseq, at=seq(0,1,length=n.y), cex.axis=1, las=3) box() par(pty=old.pty,mai=old.mai) ## Two Vectors of 1's and 0's }else if( ncol(as.matrix(y))>1 & binarytest(y) & ncol(as.matrix(y1))>1 & binarytest(y1) ) { # Everything in this section assumes ncol(y)==ncol(y1) # Precedence is names > colnames > 1:n if(is.null(names(y))){ if(is.null(colnames(y) )){ nameseq <- 1:n.y }else{ nameseq <- colnames(y) } }else{ nameseq <- names(y) } n.y <- ncol(y) yseq <- 1:n.y y <- y %*% yseq y1 <- y1 %*% yseq ## FROM HERE ON -- Replicates above. Should address more generically colors<-rev(heat.colors(n.y^2)) lab.colors<-c("black","white") comp<-matrix(NA,nrow=n.y,ncol=n.y) for(i in 1:n.y){ for(j in 1:n.y){ flag<- y==yseq[i] & y1==yseq[j] comp[i,j]<-mean(flag) } } old.pty<-par()$pty old.mai<-par()$mai par(pty="s") par(mai=c(0.3,0.3,0.3,0.1)) image(z=comp, axes=FALSE, col=colors, zlim=c(min(comp),max(comp)),main=main ) locations.x<-seq(from=0,to=1,length=nrow(comp)) locations.y<-locations.x for(m in 1:n.y){ for(n in 1:n.y){ text(x=locations.x[m],y=locations.y[n],labels=paste(round(100*comp[m,n])), col=lab.colors[(comp[m,n]> ((max(comp)-min(comp))/2) )+1]) } } axis(side=1,labels=nameseq, at=seq(0,1,length=n.y), cex.axis=1, las=1) axis(side=2,labels=nameseq, at=seq(0,1,length=n.y), cex.axis=1, las=3) box() par(pty=old.pty,mai=old.mai) ## Numeric - Plot two densities on top of each other }else if(is.numeric(y) & is.numeric(y1)){ if(is.null(col)){ semi.col.x <-rgb(142,229,238,150,maxColorValue=255) semi.col.x1<-rgb(255,114,86,150,maxColorValue=255) col<-c(semi.col.x,semi.col.x1) }else if(length(col)<2){ col<-c(col,col) } if(ncol(as.matrix(y))>1){ shrink <- 0.9 ncoly <- ncol(y) # Assumes columns of y match cols y1. Should check or enforce. # Precedence is names > colnames > 1:n if(is.null(names(y))){ if(is.null(colnames(y) )){ all.names <- 1:ncoly }else{ all.names <- colnames(y) } }else{ all.names <- names(y) } hold.dens.y <- hold.dens.y1 <- list() ymax <- xmax <- xmin <- rep(0,ncoly) for(i in 1:ncoly){ hold.dens.y[[i]] <- density(y[,i]) hold.dens.y1[[i]] <- density(y1[,i], bw=hold.dens.y[[i]]$bw) ymax[i] <- max(hold.dens.y[[i]]$y, hold.dens.y1[[i]]$y) xmax[i] <- max(hold.dens.y[[i]]$x, hold.dens.y1[[i]]$x) xmin[i] <- min(hold.dens.y[[i]]$x, hold.dens.y1[[i]]$x) } all.xlim <- c(min(xmin), max(xmax)) all.ylim <- c(0,ncoly) shift <- 0:ncoly for(i in 1:ncoly ){ if(i0) & (length(obj$sim.out$x1$ev)>0) # Determine whether two "Predicted Values" qi's exist both.pv.exist <- (length(obj$sim.out$x$pv)>0) & (length(obj$sim.out$x1$pv)>0) color.x <- rgb(242, 122, 94, maxColorValue=255) color.x1 <- rgb(100, 149, 237, maxColorValue=255) # Interpolation of the above colors in rgb color space: color.mixed <- rgb(t(round((col2rgb(color.x) + col2rgb(color.x1))/2)), maxColorValue=255) if (! ("x" %in% names(obj$sim.out))) { return(par(old.par)) } else if (! ("x1" %in% names(obj$sim.out))) { panels <- matrix(1:2, 2, 1) # The plotting device: # # +-----------+ # | 1 | # +-----------+ # | 2 | # +-----------+ } else { panels <- matrix(c(1:5, 5), ncol=2, nrow=3, byrow = TRUE) # the plotting device: # # +-----+-----+ # | 1 | 2 | # +-----+-----+ # | 3 | 4 | # +-----+-----+ # | 5 | # +-----------+ panels <- if (xor(both.ev.exist, both.pv.exist)) rbind(panels, c(6, 6)) # the plotting device: # # +-----+-----+ # | 1 | 2 | # +-----+-----+ # | 3 | 4 | # +-----+-----+ # | 5 | # +-----------+ # | 6 | # +-----------+ else if (both.ev.exist && both.pv.exist) rbind(panels, c(6, 7)) else panels # the plotting device: # # +-----+-----+ # | 1 | 2 | # +-----+-----+ # | 3 | 4 | # +-----+-----+ # | 5 | # +-----+-----+ # | 6 | 7 | # +-----+-----+ } layout(panels) titles <- obj$setx.labels # Plot each simulation if(length(obj$sim.out$x$pv)>0) simulations.plot(obj$get_qi(qi="pv", xvalue="x"), main = titles$pv, col = color.x, line.col = "black") if(length(obj$sim.out$x1$pv)>0) simulations.plot(obj$get_qi(qi="pv", xvalue="x1"), main = titles$pv1, col = color.x1, line.col = "black") if(length(obj$sim.out$x$ev)>0) simulations.plot(obj$get_qi(qi="ev", xvalue="x"), main = titles$ev, col = color.x, line.col = "black") if(length(obj$sim.out$x1$ev)>0) simulations.plot(obj$get_qi(qi="ev", xvalue="x1"), main = titles$ev1, col = color.x1, line.col = "black") if(length(obj$sim.out$x1$fd)>0) simulations.plot(obj$get_qi(qi="fd", xvalue="x1"), main = titles$fd, col = color.mixed, line.col = "black") if(both.pv.exist) simulations.plot(y=obj$get_qi(qi="pv", xvalue="x"), y1=obj$get_qi(qi="pv", xvalue="x1"), main = "Comparison of Y|X and Y|X1", col = paste(c(color.x, color.x1), "80", sep=""), line.col = "black") if(both.ev.exist) simulations.plot(y=obj$get_qi(qi="ev", xvalue="x"), y1=obj$get_qi(qi="ev", xvalue="x1"), main = "Comparison of E(Y|X) and E(Y|X1)", col = paste(c(color.x, color.x1), "80", sep=""), line.col = "black") # Restore old state par(old.par) # Return old parameter invisibly invisible(old.par) } #' Method for plotting qi simulations across a range within a variable, with confidence intervals #' #' @param obj A reference class zelig5 object #' @param qi a character-string specifying the quantity of interest to plot #' @param var The variable to be used on the x-axis. Default is the variable #' across all the chosen values with smallest nonzero variance #' @param ... Parameters to be passed to the `truehist' function which is #' implicitly called for numeric simulations #' @param main a character-string specifying the main heading of the plot #' @param sub a character-string specifying the sub heading of the plot #' @param xlab a character-string specifying the label for the x-axis #' @param ylab a character-string specifying the label for the y-axis #' @param xlim Limits to the x-axis #' @param ylim Limits to the y-axis #' @param legcol ``legend color'', an valid color used for plotting the line #' colors in the legend #' @param col a valid vector of colors of at least length 3 to use to color the #' confidence intervals #' @param leg ``legend position'', an integer from 1 to 4, specifying the #' position of the legend. 1 to 4 correspond to ``SE'', ``SW'', ``NW'', and #' ``NE'' respectively. Setting to 0 or ``n'' turns off the legend. #' @param legpos ``legend type'', exact coordinates and sizes for legend. #' Overrides argment ``leg.type'' #' @param ci vector of length three of confidence interval levels to draw. #' @param discont optional point of discontinuity along the x-axis at which #' to interupt the graph #' @return the current graphical parameters. This is subject to change in future #' implementations of Zelig #' @author James Honaker #' @usage ci.plot(obj, qi="ev", var=NULL, ..., main = NULL, sub = #' NULL, xlab = NULL, ylab = NULL, xlim = NULL, ylim = #' NULL, legcol="gray20", col=NULL, leg=1, legpos= #' NULL, ci = c(80, 95, 99.9), discont=NULL) #' @export ci.plot <- function(obj, qi = "ev", var = NULL, ..., main = NULL, sub = NULL, xlab = NULL, ylab = NULL, xlim = NULL, ylim = NULL, legcol = "gray20", col = NULL, leg = 1, legpos = NULL, ci = c(80, 95, 99.9), discont = NULL) { is_zelig(obj) if(!is_timeseries(obj)) is_simsrange(obj$sim.out) msg <- 'Simulations for more than one fitted observation are required.' is_length_not_1(obj$sim.out$range, msg = msg) if (!is.null(obj$sim.out$range1)) { is_length_not_1(obj$sim.out$range1, msg) if (length(obj$sim.out$range) != length(obj$sim.out$range1)) stop('The two fitted data ranges are not the same length.', call. = FALSE) } ########################### #### Utility Functions #### # Define function to cycle over range list and extract correct qi's ## CAN THESE NOW BE REPLACED WITH THE GETTER METHODS? extract.sims <- function(obj, qi) { d <- length(obj$sim.out$range) k <- length(obj$sim.out$range[[1]][qi][[1]][[1]]) # THAT IS A LONG PATH THAT MAYBE SHOULD BE CHANGED hold <- matrix(NA, nrow = k, ncol = d) for (i in 1:d) { hold[, i] <- obj$sim.out$range[[i]][qi][[1]][[1]] # THAT IS A LONG PATH THAT MAYBE SHOULD BE CHANGED } return(hold) } extract.sims1 <- function(obj, qi) { # Should find better architecture for alternate range sims d <- length(obj$sim.out$range1) k <- length(obj$sim.out$range1[[1]][qi][[1]][[1]]) # THAT IS A LONG PATH THAT MAYBE SHOULD BE CHANGED hold <- matrix(NA, nrow = k, ncol = d) for (i in 1:d) { hold[, i] <- obj$sim.out$range1[[i]][qi][[1]][[1]] # THAT IS A LONG PATH THAT MAYBE SHOULD BE CHANGED } return(hold) } # Define functions to compute confidence intervals CAN WE MERGE THESE TOGETHER SO AS NOT TO # HAVE TO SORT TWICE? ci.upper <- function(x, alpha) { pos <- max(round((1 - (alpha/100)) * length(x)), 1) return(sort(x)[pos]) } ci.lower <- function(x, alpha) { pos <- max(round((alpha/100) * length(x)), 1) return(sort(x)[pos]) } ########################### if(length(ci)<3){ ci<-rep(ci,3) } if(length(ci)>3){ ci<-ci[1:3] } ci<-sort(ci) ## Timeseries: if(is_timeseries(obj)){ #xmatrix<- ## Do we need to know the x in which the shock/innovation occcured? For secondary graphs, titles, legends? xname <- "Time" qiseries <- c("pvseries.shock","pvseries.innovation","evseries.shock","evseries.innovation") if (!qi %in% qiseries){ cat(paste("Error: For Timeseries models, argument qi must be one of ", paste(qiseries, collapse=" or ") ,".\n", sep="") ) return() } if (obj$bsetx & !obj$bsetx1) { ## If setx has been called and setx1 has not been called ev<-t( obj$get_qi(qi=qi, xvalue="x") ) # NOTE THE NECESSARY TRANSPOSE. Should we more clearly standardize this? } else { ev<-t( obj$get_qi(qi=qi, xvalue="x1") ) # NOTE THE NECESSARY TRANSPOSE. Should we more clearly standardize this? } d<-ncol(ev) xseq<-1:d ev1 <- NULL # Maybe want to add ability to overlay another graph? # Define xlabel if (is.null(xlab)) xlab <- xname if (is.null(ylab)){ if(qi %in% c("pvseries.shock", "pvseries.innovation")) ylab<- as.character(obj$setx.labels["pv"]) if(qi %in% c("evseries.shock", "evseries.innovation")) ylab<- as.character(obj$setx.labels["ev"]) } if (is.null(main)) main <- as.character(obj$setx.labels[qi]) if (is.null(discont)) discont <- 22.5 # NEED TO SET AUTOMATICALLY ## Everything Else: }else{ d <- length(obj$sim.out$range) if (d < 1) { return() # Should add warning } num_cols <- length(obj$setx.out$range[[1]]$mm[[1]] ) xmatrix <- matrix(NA,nrow = d, ncol = num_cols) # THAT IS A LONG PATH THAT MAYBE SHOULD BE CHANGED for (i in 1:d){ xmatrix[i,] <- matrix(obj$setx.out$range[[i]]$mm[[1]], ncol = num_cols) # THAT IS A LONG PATH THAT MAYBE SHOULD BE CHANGED } if (d == 1 && is.null(var)) { warning("Must specify the `var` parameter when plotting the confidence interval of an unvarying model. Plotting nothing.") return(invisible(FALSE)) } xvarnames <- names(as.data.frame( obj$setx.out$range[[1]]$mm[[1]])) # MUST BE A BETTER WAY/PATH TO GET NAMES if(is.character(var)){ if( !(var %in% xvarnames ) ){ warning("Specified variable for confidence interval plot is not in estimated model. Plotting nothing.") return(invisible(FALSE)) } } if (is.null(var)) { # Determine x-axis variable based on variable with unique fitted values equal to the number of scenarios length_unique <- function(x) length(unique(x)) var.unique <- apply(xmatrix, 2, length_unique) var.seq <- 1:ncol(xmatrix) position <- var.seq[var.unique == d] if (length(position) > 1) { position <- position[1] # arbitrarily pick the first variable if more than one message(sprintf('%s chosen as the x-axis variable. Use the var argument to specify a different variable.', xvarnames[position])) } } else { if(is.numeric(var)){ position <- var }else if(is.character(var)){ position <- grep(var,xvarnames) } } position <- min(position) xseq <- xmatrix[,position] xname <- xvarnames[position] # Define xlabel if (is.null(xlab)) xlab <- paste("Range of",xname) # Use "qi" argument to select quantities of interest and set labels ev1<-NULL if(!is.null(obj$sim.out$range1)){ ev1<-extract.sims1(obj,qi=qi) } ev<-extract.sims(obj,qi=qi) if (is.null(ylab)){ ylab <- as.character(obj$setx.labels[qi]) } } # k<-ncol(ev) n<-nrow(ev) # if(is.null(col)){ myblue1<-rgb( 100, 149, 237, alpha=50, maxColorValue=255) myblue2<-rgb( 152, 245, 255, alpha=50, maxColorValue=255) myblue3<-rgb( 191, 239, 255, alpha=70, maxColorValue=255) myred1 <-rgb( 237, 149, 100, alpha=50, maxColorValue=255) myred2 <-rgb( 255, 245, 152, alpha=50, maxColorValue=255) myred3 <-rgb( 255, 239, 191, alpha=70, maxColorValue=255) col<-c(myblue1,myblue2,myblue3,myred1,myred2,myred3) }else{ if(length(col)<6){ col<-rep(col,6)[1:6] } } # Define function to numerically extract summaries of distributions from set of all simulated qi's form.history <- function (k,xseq,results,ci=c(80,95,99.9)){ history<-matrix(NA, nrow=k,ncol=8) for (i in 1:k) { v <- c( xseq[i], median(results[,i]), ci.upper(results[,i],ci[1]), ci.lower(results[,i],ci[1]), ci.upper(results[,i],ci[2]), ci.lower(results[,i],ci[2]), ci.upper(results[,i],ci[3]), ci.lower(results[,i],ci[3]) ) history[i, ] <- v } if (k == 1) { left <- c( xseq[1]-.5, median(results[,1]), ci.upper(results[,1],ci[1]), ci.lower(results[,1],ci[1]), ci.upper(results[,1],ci[2]), ci.lower(results[,1],ci[2]), ci.upper(results[,1],ci[3]), ci.lower(results[,1],ci[3]) ) right <- c( xseq[1]+.5, median(results[,1]), ci.upper(results[,1],ci[1]), ci.lower(results[,1],ci[1]), ci.upper(results[,1],ci[2]), ci.lower(results[,1],ci[2]), ci.upper(results[,1],ci[3]), ci.lower(results[,1],ci[3]) ) v <- c( xseq[1], median(results[,1]), ci.upper(results[,1],ci[1]), ci.lower(results[,1],ci[1]), ci.upper(results[,1],ci[2]), ci.lower(results[,1],ci[2]), ci.upper(results[,1],ci[3]), ci.lower(results[,1],ci[3]) ) history <- rbind(left, v, right) } return(history) } history<- form.history(k,xseq,ev,ci) if(!is.null(ev1)){ history1<- form.history(k,xseq,ev1,ci) }else{ history1<-NULL } # This is for small sets that have been duplicated so as to have observable volume if(k==1){ k<-3 } # Specify x-axis length all.xlim <- if (is.null(xlim)) c(min(c(history[, 1],history1[, 1])),max(c(history[, 1],history1[, 1]))) else xlim # Specify y-axis length all.ylim <-if (is.null(ylim)) c(min(c(history[, -1],history1[, -1])),max(c(history[, -1],history1[, -1]))) else ylim # Define y label if (is.null(ylab)) ylab <- "Expected Values: E(Y|X)" ## This is the plot par(bty="n") centralx<-history[,1] centraly<-history[,2] if(is.null(discont)){ gotok <- k }else{ gotok <- sum(xseq < discont) if((gotok<2) | (gotok>(k-2))){ cat("Warning: Discontinuity is located at edge or outside the range of x-axis.\n") gotok<-k discont<-NULL } if(gotok= cutoff[i]) roc2[i,1] <- mean(fitted2[y2==1] >= cutoff[i]) roc1[i,2] <- mean(fitted1[y1==0] < cutoff[i]) roc2[i,2] <- mean(fitted2[y2==0] < cutoff[i]) } if (plot) { plot(0:1, 0:1, type = "n", xaxs = "i", yaxs = "i", main=main, xlab=xlab, ylab=ylab, ...) lines(roc1, lty = lty1, lwd = lwd1, col=col1) lines(roc2, lty = lty2, lwd = lwd2, col=col2) abline(1, -1, lty = "dotted") } else { area1 <- area2 <- array() for (i in 2:length(cutoff)) { area1[i-1] <- (roc1[i,2] - roc1[(i-1),2]) * roc1[i,1] area2[i-1] <- (roc2[i,2] - roc2[(i-1),2]) * roc2[i,1] } return(list(roc1 = roc1, roc2 = roc2, area1 = sum(na.omit(area1)), area2 = sum(na.omit(area2)))) } } #' Plot Autocorrelation Function from Zelig QI object #' @keywords internal zeligACFplot <- function(z, omitzero=FALSE, barcol="black", epsilon=0.1, col=NULL, main="Autocorrelation Function", xlab="Period", ylab="Correlation of Present Shock with Future Outcomes", ylim=NULL, ...){ x <- z$expected.acf ci.x <- z$ci.acf if(omitzero){ x<-x[2:length(x)] ci.x$ci.upper <- ci.x$ci.upper[2:length(ci.x$ci.upper)] ci.x$ci.lower <- ci.x$ci.lower[2:length(ci.x$ci.lower)] } if(is.null(ylim)){ ylim<-c(min( c(ci.x$ci.lower, 0, x) ), max( c(ci.x$ci.upper, 0 , x) )) } if(is.null(col)){ col <- rgb(100,149,237,maxColorValue=255) } bout <- barplot(x, col=col, main=main, xlab=xlab, ylab=ylab, ylim=ylim, ...) n <- length(x) xseq <- as.vector(bout) NAseq <- rep(NA, n) xtemp <- cbind( xseq-epsilon, xseq+epsilon, NAseq) xtemp <- as.vector(t(xtemp)) ytemp <- cbind(ci.x$ci.upper, ci.x$ci.upper, NAseq) ytemp <- as.vector(t(ytemp)) lines(x=xtemp ,y=ytemp, col=barcol) ytemp <- cbind(ci.x$ci.lower, ci.x$ci.lower, NAseq) ytemp <- as.vector(t(ytemp)) lines(x=xtemp ,y=ytemp, col=barcol) xtemp <- cbind( xseq, xseq, NAseq) xtemp <- as.vector(t(xtemp)) ytemp <- cbind(ci.x$ci.upper, ci.x$ci.lower, NAseq) ytemp <- as.vector(t(ytemp)) lines(x=xtemp ,y=ytemp, col=barcol) } Zelig/R/model-poisson.R0000755000176200001440000001141513754260262014454 0ustar liggesusers#' Poisson Regression for Event Count Dependent Variables #'@param formula a symbolic representation of the model to be #' estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the #' dependent variable and \code{x1} and \code{x2} are the explanatory #' variables, and \code{y}, \code{x1}, and \code{x2} are contained in the #' same dataset. (You may include more than two explanatory variables, #' of course.) The \code{+} symbol means ``inclusion'' not #' ``addition.'' You may also include interaction terms and main #' effects in the form \code{x1*x2} without computing them in prior #' steps; \code{I(x1*x2)} to include only the interaction term and #' exclude the main effects; and quadratic terms in the form #' \code{I(x1^2)}. #'@param model the name of a statistical model to estimate. #' For a list of other supported models and their documentation see: #' \url{http://docs.zeligproject.org/articles/}. #'@param data the name of a data frame containing the variables #' referenced in the formula or a list of multiply imputed data frames #' each having the same variable names and row numbers (created by #' \code{Amelia} or \code{\link{to_zelig_mi}}). #'@param ... additional arguments passed to \code{zelig}, #' relevant for the model to be estimated. #'@param by a factor variable contained in \code{data}. If supplied, #' \code{zelig} will subset #' the data frame based on the levels in the \code{by} variable, and #' estimate a model for each subset. This can save a considerable amount of #' effort. You may also use \code{by} to run models using MatchIt #' subclasses. #'@param cite If is set to 'TRUE' (default), the model citation will be printed #' to the console. #'@param id: where id is a variable which identifies the clusters. The data should be sorted by id and should be ordered within each cluster when appropriate #'@param corstr: character string specifying the correlation structure: "independence", "exchangeable", "ar1", "unstructured" and "userdefined" #'@param geeglm: See geeglm in package geepack for other function arguments #' #' @details #' Additional parameters avaialable to this model include: #' \itemize{ #' \item \code{weights}: vector of weight values or a name of a variable in the dataset #' by which to weight the model. For more information see: #' \url{http://docs.zeligproject.org/articles/weights.html}. #' \item \code{bootstrap}: logical or numeric. If \code{FALSE} don't use bootstraps to #' robustly estimate uncertainty around model parameters due to sampling error. #' If an integer is supplied, the number of boostraps to run. #' For more information see: #' \url{http://docs.zeligproject.org/articles/bootstraps.html}. #' } #' @return Depending on the class of model selected, \code{zelig} will return #' an object with elements including \code{coefficients}, \code{residuals}, #' and \code{formula} which may be summarized using #' \code{summary(z.out)} or individually extracted using, for example, #' \code{coef(z.out)}. See #' \url{http://docs.zeligproject.org/articles/getters.html} for a list of #' functions to extract model components. You can also extract whole fitted #' model objects using \code{\link{from_zelig_model}}. #' #' @examples #' library(Zelig) #' data(sanction) #' z.out <- zelig(num ~ target + coop, model = "poisson", data = sanction) #' summary(z.out) #' #' @seealso Vignette: \url{http://docs.zeligproject.org/articles/zelig_poisson.html} #' @import methods #' @export Zelig-poisson #' @exportClass Zelig-poisson #' #' @include model-zelig.R #' @include model-glm.R zpoisson <- setRefClass("Zelig-poisson", contains = "Zelig-glm", fields = list(theta = "ANY")) zpoisson$methods( initialize = function() { callSuper() .self$name <- "poisson" .self$family <- "poisson" .self$link <- "log" .self$linkinv <- eval(call(.self$family, .self$link))$linkinv .self$authors <- "Kosuke Imai, Gary King, Olivia Lau" .self$year <- 2007 .self$category <- "count" .self$description <- "Poisson Regression for Event Count Dependent Variables" # JSON .self$outcome <- "discrete" .self$wrapper <- "poisson" } ) zpoisson$methods( qi = function(simparam, mm) { eta <- simparam %*% t(mm) theta.local <- matrix(.self$linkinv(eta), nrow = nrow(simparam)) ev <- theta.local pv <- matrix(NA, nrow = nrow(theta.local), ncol = ncol(theta.local)) for (i in 1:ncol(theta.local)) pv[, i] <- rpois(nrow(theta.local), lambda = theta.local[, i]) return(list(ev = ev, pv = pv)) } ) zpoisson$methods( mcfun = function(x, b0=0, b1=1, ..., sim=TRUE){ lambda <- exp(b0 + b1 * x) if(sim){ y <- rpois(n=length(x), lambda=lambda) return(y) }else{ return(lambda) } } ) Zelig/R/assertions.R0000644000176200001440000001270513754260262014056 0ustar liggesusers#' Check if is a zelig object #' @param x an object #' @param fail logical whether to return an error if x is not a Zelig object. is_zelig <- function(x, fail = TRUE) { is_it <- inherits(x, "Zelig") if (isTRUE(fail)) { if(!isTRUE(is_it)) stop('Not a Zelig object.', call. = FALSE) } else return(is_it) } #' Check if uninitializedField #' @param x a zelig.out method #' @param msg character string with the error message to return if #' \code{fail = TRUE}. #' @param fail logical whether to return an error if x uninitialzed. is_uninitializedField <- function(x, msg = 'Zelig model has not been estimated.', fail = TRUE) { passes <- FALSE if (length(x) == 1) passes <- inherits(x, "uninitializedField") if (isTRUE(fail)) { if (isTRUE(passes)) stop(msg, call. = FALSE) } else return(passes) } #' Check if any simulations are present in sim.out #' @param x a sim.out method #' @param fail logical whether to return an error if no simulations are present. is_sims_present <- function(x, fail = TRUE) { passes <- TRUE if (is.null(x$x) & is.null(x$range)) passes <- FALSE if (length(x) > 0) passes <- TRUE if (isTRUE(fail)) { if (!isTRUE(passes)) stop('No simulated quantities of interest found.', call. = FALSE) } else return(passes) } #' Check if simulations for individual values are present in sim.out #' @param x a sim.out method #' @param fail logical whether to return an error if simulation range is not #' present. is_simsx <- function(x, fail = TRUE) { passes <- TRUE if (is.null(x$x)) passes <- FALSE if (isTRUE(fail)) { if (!isTRUE(passes)) stop('Simulations for individual fitted values are not present.', call. = FALSE) } else return(passes) } #' Check if simulations for individual values for x1 are present #' in sim.out #' @param x a sim.out method #' @param fail logical whether to return an error if simulation range is not #' present. is_simsx1 <- function(x, fail = TRUE) { passes <- TRUE if (is.null(x$x1)) passes <- FALSE if (isTRUE(fail)) { if (!isTRUE(passes)) stop('Simulations for individual fitted values are not present.', call. = FALSE) } else return(passes) } #' Check if simulations for a range of fitted values are present in sim.out #' @param x a sim.out method #' @param fail logical whether to return an error if simulation range is not #' present. is_simsrange <- function(x, fail = TRUE) { passes <- TRUE if (is.null(x$range)) passes <- FALSE if (isTRUE(fail)) { if (!isTRUE(passes)) stop('Simulations for a range of fitted values are not present.', call. = FALSE) } else return(passes) } #' Check if simulations for a range1 of fitted values are present in sim.out #' @param x a sim.out method #' @param fail logical whether to return an error if simulation range is not #' present. is_simsrange1 <- function(x, fail = TRUE) { passes <- TRUE if (is.null(x$range1)) passes <- FALSE if (isTRUE(fail)) { if (!isTRUE(passes)) stop('Simulations for a range of fitted values are not present.', call. = FALSE) } else return(passes) } #' Check if an object has a length greater than 1 #' @param x an object #' @param msg character string with the error message to return if #' \code{fail = TRUE}. #' @param fail logical whether to return an error if length is not greater than #' 1. is_length_not_1 <- function(x, msg = 'Length is 1.', fail = TRUE) { passes <- TRUE if (length(x) == 1) passes <- FALSE if (isTRUE(fail)) { if (!isTRUE(passes)) stop(msg, call. = FALSE) } else return(passes) } #' Check if the values in a vector vary #' @param x a vector #' @param msg character string with the error message to return if #' \code{fail = TRUE}. #' @param fail logical whether to return an error if \code{x} does not vary. is_varying <- function(x, msg = 'Vector does not vary.', fail = TRUE) { if (!is.vector(x)) stop('x must be a vector.', call. = FALSE) passes <- TRUE if (length(unique(x)) == 1) passes <- FALSE if (isTRUE(fail)) { if (!isTRUE(passes)) stop(msg, call. = FALSE) } else return(passes) } #' Check if a zelig object contains a time series model #' #' @param x a zelig object #' @param msg character string with the error message to return if #' \code{fail = TRUE}. #' @param fail logical whether to return an error if \code{x} is not a timeseries. is_timeseries <- function(x, msg = 'Not a timeseries object.', fail = FALSE) { is_zelig(x) passes <- TRUE if (!"timeseries" %in% x$category) passes <- FALSE if (isTRUE(fail)) { if (!isTRUE(passes)) stop(msg, call. = FALSE) } else return(passes) } #' Check if an object was created with ZeligEI #' #' @param x a zelig object #' @param msg character string with the error message to return if #' \code{fail = TRUE}. #' @param fail logical whether to return an error if \code{x} is not a timeseries. is_zeligei <- function(x, msg = "Function is not relevant for ZeligEI objects.", fail = TRUE) { is_zelig(x) passes <- FALSE pkgs <- attr(class(x), "package") if ("ZeligEI" %in% pkgs) passes <- TRUE if (isTRUE(fail)) { if (isTRUE(passes)) stop(msg, call. = FALSE) } else return(passes) } Zelig/R/model-quantile.R0000755000176200001440000002164213754260262014607 0ustar liggesusers#' Quantile Regression for Continuous Dependent Variables #'@param formula a symbolic representation of the model to be #' estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the #' dependent variable and \code{x1} and \code{x2} are the explanatory #' variables, and \code{y}, \code{x1}, and \code{x2} are contained in the #' same dataset. (You may include more than two explanatory variables, #' of course.) The \code{+} symbol means ``inclusion'' not #' ``addition.'' You may also include interaction terms and main #' effects in the form \code{x1*x2} without computing them in prior #' steps; \code{I(x1*x2)} to include only the interaction term and #' exclude the main effects; and quadratic terms in the form #' \code{I(x1^2)}. #'@param model the name of a statistical model to estimate. #' For a list of other supported models and their documentation see: #' \url{http://docs.zeligproject.org/articles/}. #'@param data the name of a data frame containing the variables #' referenced in the formula or a list of multiply imputed data frames #' each having the same variable names and row numbers (created by #' \code{Amelia} or \code{\link{to_zelig_mi}}). #'@param ... additional arguments passed to \code{zelig}, #' relevant for the model to be estimated. #'@param by a factor variable contained in \code{data}. If supplied, #' \code{zelig} will subset #' the data frame based on the levels in the \code{by} variable, and #' estimate a model for each subset. This can save a considerable amount of #' effort. You may also use \code{by} to run models using MatchIt #' subclasses. #'@param cite If is set to 'TRUE' (default), the model citation will be printed #' to the console. #' #' @details #' In addition to the standard inputs, \code{zelig} takes the following additional options #' for quantile regression: #' \itemize{ #' \item \code{tau}: defaults to 0.5. Specifies the conditional quantile(s) that will be #' estimated. 0.5 corresponds to estimating the conditional median, 0.25 and 0.75 correspond #' to the conditional quartiles, etc. tau vectors with length greater than 1 are not currently #' supported. If tau is set outside of the interval [0,1], zelig returns the solution for all #' possible conditional quantiles given the data, but does not support inference on this fit #' (setx and sim will fail). #' \item \code{se}: a string value that defaults to "nid". Specifies the method by which #' the covariance matrix of coefficients is estimated during the sim stage of analysis. \code{se} #' can take the following values, which are passed to the \code{summary.rq} function from the #' \code{quantreg} package. These descriptions are copied from the \code{summary.rq} documentation. #' \itemize{ #' \item \code{"iid"} which presumes that the errors are iid and computes an estimate of #' the asymptotic covariance matrix as in KB(1978). #' \item \code{"nid"} which presumes local (in tau) linearity (in x) of the the #' conditional quantile functions and computes a Huber sandwich estimate using a local #' estimate of the sparsity. #' \item \code{"ker"} which uses a kernel estimate of the sandwich as proposed by Powell(1990). #' } #' \item \code{...}: additional options passed to rq when fitting the model. See documentation for rq in the quantreg package for more information. #' } #' Additional parameters avaialable to this model include: #' \itemize{ #' \item \code{weights}: vector of weight values or a name of a variable in the dataset #' by which to weight the model. For more information see: #' \url{http://docs.zeligproject.org/articles/weights.html}. #' \item \code{bootstrap}: logical or numeric. If \code{FALSE} don't use bootstraps to #' robustly estimate uncertainty around model parameters due to sampling error. #' If an integer is supplied, the number of boostraps to run. #' For more information see: #' \url{http://docs.zeligproject.org/articles/bootstraps.html}. #' } #' #' @return Depending on the class of model selected, \code{zelig} will return #' an object with elements including \code{coefficients}, \code{residuals}, #' and \code{formula} which may be summarized using #' \code{summary(z.out)} or individually extracted using, for example, #' \code{coef(z.out)}. See #' \url{http://docs.zeligproject.org/articles/getters.html} for a list of #' functions to extract model components. You can also extract whole fitted #' model objects using \code{\link{from_zelig_model}}. #' #' @examples #' library(Zelig) #' data(stackloss) #' z.out1 <- zelig(stack.loss ~ Air.Flow + Water.Temp + Acid.Conc., #' model = "rq", data = stackloss,tau = 0.5) #' summary(z.out1) #' #' @seealso Vignette: \url{http://docs.zeligproject.org/articles/zelig_quantile.html} #' @import methods #' @export Zelig-quantile #' @exportClass Zelig-quantile #' #' @include model-zelig.R zquantile <- setRefClass("Zelig-quantile", contains = "Zelig", field = list(tau = "ANY" )) zquantile$methods( initialize = function() { callSuper() .self$fn <- quote(quantreg::rq) .self$name <- "quantile" .self$authors <- "Alexander D'Amour" .self$packageauthors <- "Roger Koenker" .self$modelauthors <- "Alexander D'Amour" .self$year <- 2008 .self$category <- "continuous" .self$description <- "Quantile Regression for Continuous Dependent Variables" # JSON .self$outcome <- "continuous" .self$wrapper <- "rq" .self$acceptweights <- TRUE } ) zquantile$methods( zelig = function(formula, data, ..., weights = NULL, by = NULL, bootstrap = FALSE) { # avoids CRAN warning about deep assignment from formula existing separately as argument and field localBy <- by # avoids CRAN warning about deep assignment from formula existing separately as argument and field localData <- data .self$zelig.call <- match.call(expand.dots = TRUE) .self$model.call <- match.call(expand.dots = TRUE) if (!is.null(.self$model.call$tau)) { if (length(eval(.self$model.call$tau)) > 1) { stop('tau argument only accepts 1 value.\nZelig is using only the first value.', call. = FALSE) } else .self$tau <- eval(.self$model.call$tau) # if (length(.self$tau) > 1) { # localData <- bind_rows(lapply(eval(.self$tau), # function(tau) cbind(tau, localData))) # # localBy <- cbind("tau", localBy) # } } else .self$tau <- 0.5 callSuper(formula = formula, data = localData, ..., weights = weights, by = localBy, bootstrap = bootstrap) rq_summaries <- lapply(.self$zelig.out$z.out, (function(x) summary(x, se = "nid", cov = TRUE))) if (length(rq_summaries) > 1) { rse <- lapply(rq_summaries, function(y) y$cov) } else rse <- rq_summaries$cov # rse <- lapply(.self$zelig.out$z.out, (function(x) # quantreg::summary.rq(x, se = "nid", cov = TRUE)$cov)) # rse <- lapply(.self$zelig.out$z.out, # (function(x) { # full <- quantreg::summary.rq(x, se = "nid", cov = TRUE)$cov # }) # ) .self$test.statistics<- list(robust.se = rse) }) zquantile$methods( param = function(z.out, method = "mvn") { object <- z.out if(identical(method,"mvn")){ rq.sum <- summary(object, cov = TRUE, se = object$se) return(mvrnorm(n = .self$num, mu = object$coef, Sigma = rq.sum$cov)) } else if(identical(method,"point")){ return(t(as.matrix(object$coef))) } }) zquantile$methods( qi = function(simparam, mm) { object <- mm coeff <- simparam eps <- .Machine$double.eps^(2/3) ev <- coeff %*% t(object) pv <- ev n <- nrow(.self$data) h <- bandwidth.rq(.self$tau, n) # estimate optimal bandwidth for sparsity if (.self$tau + h > 1) stop("tau + h > 1. Sparsity estimate failed. Please specify a tau closer to 0.5") if (.self$tau - h < 0) stop("tau - h < 0. Sparsity estimate failed. Please specify a tau closer to 0.5") beta_high <- rq(.self$formula, data = .self$data, tau = .self$tau + h )$coef beta_low <- rq(.self$formula, data = .self$data, tau = .self$tau - h)$coef F_diff <- mm %*% (beta_high - beta_low) if (any(F_diff <= 0)) warning(paste(sum(F_diff <= 0), "density estimates were non-positive. Predicted values will likely be non-sensical.")) # Includes machine error correction as per summary.rq for nid case f <- pmax(0, (2 * h) / (F_diff - eps)) # Use asymptotic approximation of Q(tau|X,beta) distribution for(ii in 1:nrow(ev)) # Asymptotic distribution as per Koenker 2005 _Quantile Regression_ p. 72 pv[ii, ] <- rnorm(length(ev[ii, ]), mean = ev[ii, ], sqrt((.self$tau * (1 - .self$tau))) / (f * sqrt(n))) return(list(ev = ev, pv = pv)) } ) Zelig/R/model-logit.R0000755000176200001440000001323513754260262014102 0ustar liggesusers#' Logistic Regression for Dichotomous Dependent Variables #'@param formula a symbolic representation of the model to be #' estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the #' dependent variable and \code{x1} and \code{x2} are the explanatory #' variables, and \code{y}, \code{x1}, and \code{x2} are contained in the #' same dataset. (You may include more than two explanatory variables, #' of course.) The \code{+} symbol means ``inclusion'' not #' ``addition.'' You may also include interaction terms and main #' effects in the form \code{x1*x2} without computing them in prior #' steps; \code{I(x1*x2)} to include only the interaction term and #' exclude the main effects; and quadratic terms in the form #' \code{I(x1^2)}. #'@param model the name of a statistical model to estimate. #' For a list of other supported models and their documentation see: #' \url{http://docs.zeligproject.org/articles/}. #'@param data the name of a data frame containing the variables #' referenced in the formula or a list of multiply imputed data frames #' each having the same variable names and row numbers (created by #' \code{Amelia} or \code{\link{to_zelig_mi}}). #'@param ... additional arguments passed to \code{zelig}, #' relevant for the model to be estimated. #'@param by a factor variable contained in \code{data}. If supplied, #' \code{zelig} will subset #' the data frame based on the levels in the \code{by} variable, and #' estimate a model for each subset. This can save a considerable amount of #' effort. You may also use \code{by} to run models using MatchIt #' subclasses. #'@param cite If is set to 'TRUE' (default), the model citation will be printed #' to the console. #' #' @details #' Additional parameters avaialable to this model include: #' \itemize{ #' \item weights: vector of weight values or a name of a variable in the dataset #' by which to weight the model. For more information see: #' \url{http://docs.zeligproject.org/articles/weights.html}. #' \item bootstrap: logical or numeric. If \code{FALSE} don't use bootstraps to #' robustly estimate uncertainty around model parameters due to sampling error. #' If an integer is supplied, the number of boostraps to run. #' For more information see: #' \url{http://docs.zeligproject.org/articles/bootstraps.html}. #' } #' #' @return Depending on the class of model selected, \code{zelig} will return #' an object with elements including \code{coefficients}, \code{residuals}, #' and \code{formula} which may be summarized using #' \code{summary(z.out)} or individually extracted using, for example, #' \code{coef(z.out)}. See #' \url{http://docs.zeligproject.org/articles/getters.html} for a list of #' functions to extract model components. You can also extract whole fitted #' model objects using \code{\link{from_zelig_model}}. #' #'@param below (defaults to 0) The point at which the dependent variable is censored from below. If any values in the dependent variable are observed to be less than the censoring point, it is assumed that that particular observation is censored from below at the observed value. (See for a Bayesian implementation that supports both left and right censoring.) #'@param robust defaults to FALSE. If TRUE, zelig() computes robust standard errors based on sandwich estimators (see and ) and the options selected in cluster. #'@param if robust = TRUE, you may select a variable to define groups of correlated observations. Let x3 be a variable that consists of either discrete numeric values, character strings, or factors that define strata. Then #'z.out <- zelig(y ~ x1 + x2, robust = TRUE, cluster = "x3", model = "tobit", data = mydata) #'means that the observations can be correlated within the strata defined by the variable x3, and that robust standard errors should be calculated according to those clusters. If robust = TRUE but cluster is not specified, zelig() assumes that each observation falls into its own cluster. #' #'@examples #' library(Zelig) #' data(turnout) #' z.out1 <- zelig(vote ~ age + race, model = "logit", data = turnout, #' cite = FALSE) #' summary(z.out1) #' summary(z.out1, odds_ratios = TRUE) #' x.out1 <- setx(z.out1, age = 36, race = "white") #' s.out1 <- sim(z.out1, x = x.out1) #' summary(s.out1) #' plot(s.out1) #' #' @seealso Vignette: \url{http://docs.zeligproject.org/articles/zelig_logit.html} #' @import methods #' @export Zelig-logit #' @exportClass Zelig-logit #' #' @include model-zelig.R #' @include model-gee.R #' @include model-gamma.R #' @include model-zelig.R #' @include model-glm.R #' @include model-binchoice.R zlogit <- setRefClass("Zelig-logit", contains = "Zelig-binchoice") zlogit$methods(initialize = function() { callSuper() .self$name <- "logit" .self$link <- "logit" .self$description = "Logistic Regression for Dichotomous Dependent Variables" .self$packageauthors <- "R Core Team" .self$wrapper <- "logit" }) zlogit$methods(mcfun = function(x, b0 = 0, b1 = 1, ..., sim = TRUE) { mu <- 1/(1 + exp(-b0 - b1 * x)) if (sim) { y <- rbinom(n = length(x), size = 1, prob = mu) return(y) } else { return(mu) } } ) zlogit$methods( show = function(odds_ratios = FALSE, ...) { if (odds_ratios & !.self$mi & !.self$bootstrap) { summ <- .self$zelig.out %>% do(summ = {cat("Model: \n") ## Replace coefficients with odds-ratios .z.out.summary <- base::summary(.$z.out) .z.out.summary <- or_summary(.z.out.summary) print(.z.out.summary) }) } else { callSuper(...) } #print(base::summary(.self$zelig.out)) } ) Zelig/R/model-normal-bayes.R0000644000176200001440000001447213754260262015356 0ustar liggesusers#' Bayesian Normal Linear Regression #' #' @param formula a symbolic representation of the model to be #' estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the #' dependent variable and \code{x1} and \code{x2} are the explanatory #' variables, and \code{y}, \code{x1}, and \code{x2} are contained in the #' same dataset. (You may include more than two explanatory variables, #' of course.) The \code{+} symbol means ``inclusion'' not #' ``addition.'' You may also include interaction terms and main #' effects in the form \code{x1*x2} without computing them in prior #' steps; \code{I(x1*x2)} to include only the interaction term and #' exclude the main effects; and quadratic terms in the form #' \code{I(x1^2)}. #' @param model the name of a statistical model to estimate. #' For a list of other supported models and their documentation see: #' \url{http://docs.zeligproject.org/articles/}. #' @param data the name of a data frame containing the variables #' referenced in the formula or a list of multiply imputed data frames #' each having the same variable names and row numbers (created by #' \code{Amelia} or \code{\link{to_zelig_mi}}). #' @param ... additional arguments passed to \code{zelig}, #' relevant for the model to be estimated. #' @param by a factor variable contained in \code{data}. If supplied, #' \code{zelig} will subset #' the data frame based on the levels in the \code{by} variable, and #' estimate a model for each subset. This can save a considerable amount of #' effort. You may also use \code{by} to run models using MatchIt #' subclasses. #' @param cite If is set to 'TRUE' (default), the model citation will be printed #' to the console. #' #' @examples #' data(macro) #' z.out <- zelig(unem ~ gdp + capmob + trade, model = "normal.bayes", data = macro, verbose = FALSE) #' #' @details #' Additional parameters avaialable to many models include: #' \itemize{ #' \item \code{weights}: vector of weight values or a name of a variable in the dataset #' by which to weight the model. For more information see: #' \url{http://docs.zeligproject.org/articles/weights.html}. #' \item \code{burnin}: number of the initial MCMC iterations to be discarded (defaults to 1,000). #' \item \code{mcmc}: number of the MCMC iterations after burnin (defaults to 10,000). #' \item \code{thin}: thinning interval for the Markov chain. Only every thin-th draw from the Markov chain is kept. The value of mcmc must be divisible by this value. The default value is 1. #' \item \code{verbose}: defaults to FALSE. If TRUE, the progress of the sampler (every 10\%) is printed to the screen. #' \item \code{seed}: seed for the random number generator. The default is \code{NA} which corresponds to a random seed of 12345. #' \item \code{beta.start}: starting values for the Markov chain, either a scalar or vector with length equal to the number of estimated coefficients. The default is \code{NA}, such that the maximum likelihood estimates are used as the starting values. #' } #' Use the following parameters to specify the model's priors: #' \itemize{ #' \item \code{b0}: prior mean for the coefficients, either a numeric vector or a scalar. If a scalar value, that value will be the prior mean for all the coefficients. The default is 0. #' \item \code{B0}: prior precision parameter for the coefficients, either a square matrix (with the dimensions equal to the number of the coefficients) or a scalar. If a scalar value, that value times an identity matrix will be the prior precision parameter. The default is 0, which leads to an improper prior. #' \item \code{c0}: c0/2 is the shape parameter for the Inverse Gamma prior on the variance of the disturbance terms. #' \item \code{d0}: d0/2 is the scale parameter for the Inverse Gamma prior on the variance of the disturbance terms. #' } #' @return Depending on the class of model selected, \code{zelig} will return #' an object with elements including \code{coefficients}, \code{residuals}, #' and \code{formula} which may be summarized using #' \code{summary(z.out)} or individually extracted using, for example, #' \code{coef(z.out)}. See #' \url{http://docs.zeligproject.org/articles/getters.html} for a list of #' functions to extract model components. You can also extract whole fitted #' model objects using \code{\link{from_zelig_model}}. #' @examples #' #' data(macro) #' z.out <- zelig(unem ~ gdp + capmob + trade, model = "normal.bayes", #' data = macro, verbose = FALSE) #' #' z.out$geweke.diag() #' z.out$heidel.diag() #' z.out$raftery.diag() #' summary(z.out) #' #' x.out <- setx(z.out) #' s.out1 <- sim(z.out, x = x.out) #' summary(s.out1) #' #' x.high <- setx(z.out, trade = quantile(macro$trade, prob = 0.8)) #' x.low <- setx(z.out, trade = quantile(macro$trade, prob = 0.2)) #' #' s.out2 <- sim(z.out, x = x.high, x1 = x.low) #' summary(s.out2) #' #' @seealso Vignette: \url{http://docs.zeligproject.org/articles/zelig_normalbayes.html} #' @import methods #' @export Zelig-normal-bayes #' @exportClass Zelig-normal-bayes #' #' @include model-zelig.R #' @include model-bayes.R #' @include model-normal.R znormalbayes <- setRefClass("Zelig-normal-bayes", contains = c("Zelig-bayes", "Zelig-normal")) znormalbayes$methods( initialize = function() { callSuper() .self$name <- "normal-bayes" # CC: should't it be lsbayes? .self$year <- 2013 .self$category <- "continuous" .self$authors <- "Ben Goodrich, Ying Lu" .self$description = "Bayesian Normal Linear Regression" .self$fn <- quote(MCMCpack::MCMCregress) # JSON from parent .self$wrapper <- "normal.bayes" } ) znormalbayes$methods( qi = function(simparam, mm) { # Extract simulated parameters and get column names coef <- simparam cols <- colnames(coef) # Place the simulated variances in their own vector sigma2 <- coef[, ncol(coef)] # Remove the "sigma2" (variance) parameter # which should already be placed # in the simulated parameters cols <- cols[ ! "sigma2" == cols ] coef <- coef[, cols] ev <- coef %*% t(mm) pv <- matrix(rnorm(nrow(ev), ev, sqrt(sigma2))) return(list(ev = ev, pv = pv)) } ) znormalbayes$methods( mcfun = function(x, b0=0, b1=1, alpha=1, sim=TRUE){ y <- b0 + b1*x + sim * rnorm(n=length(x), sd=alpha) return(y) } ) Zelig/R/model-logit-gee.R0000755000176200001440000001020413754260262014631 0ustar liggesusers#' Generalized Estimating Equation for Logit Regression #' @param formula a symbolic representation of the model to be #' estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the #' dependent variable and \code{x1} and \code{x2} are the explanatory #' variables, and \code{y}, \code{x1}, and \code{x2} are contained in the #' same dataset. (You may include more than two explanatory variables, #' of course.) The \code{+} symbol means ``inclusion'' not #' ``addition.'' You may also include interaction terms and main #' effects in the form \code{x1*x2} without computing them in prior #' steps; \code{I(x1*x2)} to include only the interaction term and #' exclude the main effects; and quadratic terms in the form #' \code{I(x1^2)}. #' @param model the name of a statistical model to estimate. #' For a list of other supported models and their documentation see: #' \url{http://docs.zeligproject.org/articles/}. #' @param data the name of a data frame containing the variables #' referenced in the formula or a list of multiply imputed data frames #' each having the same variable names and row numbers (created by #' \code{Amelia} or \code{\link{to_zelig_mi}}). #' @param ... additional arguments passed to \code{zelig}, #' relevant for the model to be estimated. #' @param by a factor variable contained in \code{data}. If supplied, #' \code{zelig} will subset #' the data frame based on the levels in the \code{by} variable, and #' estimate a model for each subset. This can save a considerable amount of #' effort. You may also use \code{by} to run models using MatchIt #' subclasses. #' @param cite If is set to 'TRUE' (default), the model citation will be printed #' to the console. #' @param id: where id is a variable which identifies the clusters. The data should be sorted #' by \code{id} and should be ordered within each cluster when appropriate #' @param corstr: character string specifying the correlation structure: #' "independence", "exchangeable", "ar1", "unstructured" and "userdefined" #' @param geeglm: See geeglm in package geepack for other function arguments #' @details #' Additional parameters avaialable to this model include: #' \itemize{ #' \item \code{weights}: vector of weight values or a name of a variable in the dataset #' by which to weight the model. For more information see: #' \url{http://docs.zeligproject.org/articles/weights.html}. #' \item \code{bootstrap}: logical or numeric. If \code{FALSE} don't use bootstraps to #' robustly estimate uncertainty around model parameters due to sampling error. #' If an integer is supplied, the number of boostraps to run. #' For more information see: #' \url{http://docs.zeligproject.org/articles/bootstraps.html}. #' } #' @return Depending on the class of model selected, \code{zelig} will return #' an object with elements including \code{coefficients}, \code{residuals}, #' and \code{formula} which may be summarized using #' \code{summary(z.out)} or individually extracted using, for example, #' \code{coef(z.out)}. See #' \url{http://docs.zeligproject.org/articles/getters.html} for a list of #' functions to extract model components. You can also extract whole fitted #' model objects using \code{\link{from_zelig_model}}. #' #'@examples #' #' data(turnout) #' turnout$cluster <- rep(c(1:200), 10) #' sorted.turnout <- turnout[order(turnout$cluster),] #' #' z.out1 <- zelig(vote ~ race + educate, model = "logit.gee", #' id = "cluster", data = sorted.turnout) #' #' summary(z.out1) #' x.out1 <- setx(z.out1) #' s.out1 <- sim(z.out1, x = x.out1) #' summary(s.out1) #' plot(s.out1) #' #' @seealso Vignette: \url{http://docs.zeligproject.org/articles/zelig_logitgee.html} #' @import methods #' @export Zelig-logit-gee #' @exportClass Zelig-logit-gee #' #' @include model-zelig.R #' @include model-binchoice-gee.R zlogitgee <- setRefClass("Zelig-logit-gee", contains = c("Zelig-binchoice-gee")) zlogitgee$methods( initialize = function() { callSuper() .self$name <- "logit-gee" .self$link <- "logit" .self$description <- "General Estimating Equation for Logistic Regression" .self$wrapper <- "logit.gee" } ) Zelig/R/model-gamma-gee.R0000755000176200001440000001110013754260262014571 0ustar liggesusers#' Generalized Estimating Equation for Gamma Regression #' @param formula a symbolic representation of the model to be #' estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the #' dependent variable and \code{x1} and \code{x2} are the explanatory #' variables, and \code{y}, \code{x1}, and \code{x2} are contained in the #' same dataset. (You may include more than two explanatory variables, #' of course.) The \code{+} symbol means ``inclusion'' not #' ``addition.'' You may also include interaction terms and main #' effects in the form \code{x1*x2} without computing them in prior #' steps; \code{I(x1*x2)} to include only the interaction term and #' exclude the main effects; and quadratic terms in the form #' \code{I(x1^2)}. #'@param model the name of a statistical model to estimate. #' For a list of other supported models and their documentation see: #' \url{http://docs.zeligproject.org/articles/}. #'@param data the name of a data frame containing the variables #' referenced in the formula or a list of multiply imputed data frames #' each having the same variable names and row numbers (created by #' \code{Amelia} or \code{\link{to_zelig_mi}}). #'@param ... additional arguments passed to \code{zelig}, #' relevant for the model to be estimated. #'@param by a factor variable contained in \code{data}. If supplied, #' \code{zelig} will subset #' the data frame based on the levels in the \code{by} variable, and #' estimate a model for each subset. This can save a considerable amount of #' effort. You may also use \code{by} to run models using MatchIt #' subclasses. #'@param cite If is set to 'TRUE' (default), the model citation will be printed #' to the console. #'@param corstr:character string specifying the correlation structure: "independence", #' "exchangeable", "ar1", "unstructured" and "userdefined" #'@param See geeglm in package geepack for other function arguments. #'@param id: where id is a variable which identifies the clusters. The data should be sorted #'by id and should be ordered within each cluster when appropriate #'@param corstr: character string specifying the correlation structure: "independence", #' "exchangeable", "ar1", "unstructured" and "userdefined" #'@param geeglm: See geeglm in package geepack for other function arguments #' #' @details #' Additional parameters avaialable to this model include: #' \itemize{ #' \item \code{weights}: vector of weight values or a name of a variable in the dataset #' by which to weight the model. For more information see: #' \url{http://docs.zeligproject.org/articles/weights.html}. #' \item \code{bootstrap}: logical or numeric. If \code{FALSE} don't use bootstraps to #' robustly estimate uncertainty around model parameters due to sampling error. #' If an integer is supplied, the number of boostraps to run. #' For more information see: #' \url{http://docs.zeligproject.org/articles/bootstraps.html}. #' } #' @return Depending on the class of model selected, \code{zelig} will return #' an object with elements including \code{coefficients}, \code{residuals}, #' and \code{formula} which may be summarized using #' \code{summary(z.out)} or individually extracted using, for example, #' \code{coef(z.out)}. See #' \url{http://docs.zeligproject.org/articles/getters.html} for a list of #' functions to extract model components. You can also extract whole fitted #' model objects using \code{\link{from_zelig_model}}. #' #'@examples #' library(Zelig) #' data(coalition) #' coalition$cluster <- c(rep(c(1:62), 5),rep(c(63), 4)) #' sorted.coalition <- coalition[order(coalition$cluster),] #' z.out <- zelig(duration ~ fract + numst2, model = "gamma.gee",id = "cluster", #' data = sorted.coalition,corstr = "exchangeable") #' summary(z.out) #' #' @seealso Vignette: \url{http://docs.zeligproject.org/articles/zelig_gammagee.html} #' @import methods #' @export Zelig-gamma #' @exportClass Zelig-gamma #' #' @include model-zelig.R #' @include model-gee.R #' @include model-gamma.R zgammagee <- setRefClass("Zelig-gamma-gee", contains = c("Zelig-gee", "Zelig-gamma")) zgammagee$methods( initialize = function() { callSuper() .self$name <- "gamma-gee" .self$family <- "Gamma" .self$link <- "inverse" .self$linkinv <- eval(call(.self$family, .self$link))$linkinv .self$year <- 2011 .self$category <- "continuous" .self$authors <- "Patrick Lam" .self$description = "General Estimating Equation for Gamma Regression" .self$fn <- quote(geepack::geeglm) # JSON from parent .self$wrapper <- "gamma.gee" } ) Zelig/R/interface.R0000644000176200001440000005234313754260262013626 0ustar liggesusers#' Instructions for how to convert non-Zelig fitted model objects to Zelig. #' Used in to_zelig model_lookup_df <- data.frame( rbind( c(class = "lm", family = "gaussian", link = "identity", zclass = "zls"), c(class = "glm", family = "gaussian", link = "identity", zlcass = "zls"), c(class = "glm", family = "binomial", link = "logit", zclass = "zlogit"), c(class = "glm", family = "binomial", link = "probit", zclass = "zprobit"), c(class = "glm", family = "poisson", link = "log", zclass = "zpoisson"), c(class = "glm", family = "Gamma", link = "inverse", zclass = "zgamma"), c(class = "svyglm", family = "gaussian", link = "identity", zclass = "znormalsurvey"), c(class = "svyglm", family = "binomial", link = "logit", zclass = "zlogitsurvey"), c(class = "svyglm", family = "quasibinomial", link = "logit", zclass = "zlogitsurvey")), stringsAsFactors = FALSE) #' Coerce a non-Zelig fitted model object to a Zelig class object #' #' @param obj a fitted model object fitted using \code{lm} and many using #' \code{glm}. Note: more intended in future Zelig releases. #' #' @examples #' library(dplyr) #' lm.out <- lm(Fertility ~ Education, data = swiss) #' #' z.out <- to_zelig(lm.out) #' #' # to_zelig called from within setx #' setx(z.out) %>% sim() %>% plot() #' #' @author Christopher Gandrud and Ista Zhan #' @importFrom dplyr group_by_ %>% do #' @export to_zelig <- function(obj) { message('to_zelig is an experimental function.\n Please report issues to: https://github.com/IQSS/Zelig/issues\n') not_found_msg <- "Not a Zelig object and not convertible to one." # attempt to determine model type and initialize model try_na <- function(x) tryCatch(x, error = function(c) stop(not_found_msg, call. = FALSE)) model_info <- data.frame( class = try_na(class(obj)[1]), family = try_na(family(obj)$family), link = try_na(family(obj)$link), stringsAsFactors = FALSE ) zmodel <- merge(model_info, model_lookup_df)$zclass if(length(zmodel) != 1) stop(not_found_msg, call. = FALSE) message(sprintf("Assuming %s to convert to Zelig.", zmodel)) new_obj <- eval(parse(text = sprintf("%s$new()", zmodel))) new_obj$mi <- FALSE new_obj$bootstrap <- FALSE new_obj$matched <- FALSE new_obj$mi <- FALSE new_obj$data <- cbind(1, obj$model) names(new_obj$data)[1] <- "by" new_obj$by <- "by" new_obj$data <- tbl_df(new_obj$data) new_obj$formula <- as.Formula(obj$call$formula) new_obj$weights <- NULL new_obj$zelig.call <- obj$call new_obj$model.call <- obj$call new_obj$model.call$weights <- NULL new_obj$zelig.out <- new_obj$data %>% group_by_(new_obj$by) %>% do(z.out = obj) #new_obj$zelig.out <- tibble::as_tibble(list(by = 1, z.out = obj)) return(new_obj) } #' Extract the original fitted model object from a \code{zelig} estimation #' #' @param obj a zelig object with an estimated model #' #' @details Extracts the original fitted model object from a \code{zelig} #' estimation. This can be useful for passing output to non-Zelig #' post-estimation functions and packages such as texreg and stargazer #' for creating well-formatted presentation document tables. #' #' @examples #' z5 <- zls$new() #' z5$zelig(Fertility ~ Education, data = swiss) #' from_zelig_model(z5) #' #' @author Christopher Gandrud #' @export from_zelig_model <- function(obj) { is_zelig(obj) f5 <- obj$copy() return(f5$from_zelig_model()) } #' Extract simulated quantities of interest from a zelig object #' #' @param obj a zelig object with simulated quantities of interest #' #' @details A simulated quantities of interest in a tidy data formatted #' `data.frame`. This can be useful for creating custom plots. #' #' Each row contains a simulated value and each column contains: #' #' - `setx_value` whether the simulations are from the base `x` `setx` or the #' contrasting `x1` for finding first differences. #' - The fitted values specified in `setx` including a `by` column if #' `by` was used in the \code{\link{zelig}} call. #' - `expected_value` #' - `predicted_value` #' #' For multinomial reponse models, a separate column is given for the expected #' probability of each outcome in the form `expected_*`. Additionally, there #' a is column of the predicted outcomes (`predicted_value`). #' #' @examples #' #### QIs without first difference or range, from covariates fitted at #' ## central tendencies #' z.1 <- zelig(Petal.Width ~ Petal.Length + Species, data = iris, #' model = "ls") #' z.1 <- setx(z.1) #' z.1 <- sim(z.1) #' head(zelig_qi_to_df(z.1)) #' #' #### QIs for first differences #' z.2 <- zelig(Petal.Width ~ Petal.Length + Species, data = iris, #' model = "ls") #' z.2a <- setx(z.2, Petal.Length = 2) #' z.2b <- setx(z.2, Petal.Length = 4.4) #' z.2 <- sim(z.2, x = z.2a, x1 = z.2a) #' head(zelig_qi_to_df(z.2)) #' #' #### QIs for first differences, estimated by Species #' z.3 <- zelig(Petal.Width ~ Petal.Length, by = "Species", data = iris, #' model = "ls") #' z.3a <- setx(z.3, Petal.Length = 2) #' z.3b <- setx(z.3, Petal.Length = 4.4) #' z.3 <- sim(z.3, x = z.3a, x1 = z.3a) #' head(zelig_qi_to_df(z.3)) #' #' #### QIs for a range of fitted values #' z.4 <- zelig(Petal.Width ~ Petal.Length + Species, data = iris, #' model = "ls") #' z.4 <- setx(z.4, Petal.Length = 2:4) #' z.4 <- sim(z.4) #' head(zelig_qi_to_df(z.4)) #' #' #### QIs for a range of fitted values, estimated by Species #' z.5 <- zelig(Petal.Width ~ Petal.Length, by = "Species", data = iris, #' model = "ls") #' z.5 <- setx(z.5, Petal.Length = 2:4) #' z.5 <- sim(z.5) #' head(zelig_qi_to_df(z.5)) #' #' #### QIs for two ranges of fitted values #' z.6 <- zelig(Petal.Width ~ Petal.Length + Species, data = iris, #' model = "ls") #' z.6a <- setx(z.6, Petal.Length = 2:4, Species = "setosa") #' z.6b <- setx(z.6, Petal.Length = 2:4, Species = "virginica") #' z.6 <- sim(z.6, x = z.6a, x1 = z.6b) #' #' head(zelig_qi_to_df(z.6)) #' #' @source For a discussion of tidy data see #' . #' #' @seealso \code{\link{qi_slimmer}} #' @md #' @author Christopher Gandrud #' @export zelig_qi_to_df <- function(obj) { is_zelig(obj) is_sims_present(obj$sim.out) comb <- data.frame() if (is_simsx(obj$sim.out, fail = FALSE)) { comb_temp <- extract_setx(obj) comb <- rbind(comb, comb_temp) } if (is_simsx1(obj$sim.out, fail = FALSE)) { comb_temp <- extract_setx(obj, which_x = 'x1') comb <- rbind(comb, comb_temp) } if (is_simsrange(obj$sim.out, fail = FALSE)) { comb_temp <- extract_setrange(obj) comb <- rbind(comb, comb_temp) } if (is_simsrange1(obj$sim.out, fail = FALSE)) { comb_temp <- extract_setrange(obj, which_range = 'range1') comb <- rbind(comb, comb_temp) } # Need range1 if (nrow(comb) == 0) stop('Unable to find simulated quantities of interest.', call. = FALSE) return(comb) } #' Extracted fitted values from a Zelig object with `setx` values #' #' @param obj a zelig object with simulated quantities of interest #' #' @details Fitted (`setx`) values in a tidy data formatted #' `data.frame`. This was designed to enable the WhatIf package's #' `whatif` function to extract "counterfactuals". #' #' @examples #' #### QIs without first difference or range, from covariates fitted at #' ## central tendencies #' z.1 <- zelig(Petal.Width ~ Petal.Length + Species, data = iris, #' model = "ls") #' z.1 <- setx(z.1) #' zelig_setx_to_df(z.1) #' #' #### QIs for first differences #' z.2 <- zelig(Petal.Width ~ Petal.Length + Species, data = iris, #' model = "ls") #' z.2 <- setx(z.2, Petal.Length = 2) #' z.2 <- setx1(z.2, Petal.Length = 4.4) #' zelig_setx_to_df(z.2) #' #' #### QIs for first differences, estimated by Species #' z.3 <- zelig(Petal.Width ~ Petal.Length, by = "Species", data = iris, #' model = "ls") #' z.3 <- setx(z.3, Petal.Length = 2) #' z.3 <- setx1(z.3, Petal.Length = 4.4) #' zelig_setx_to_df(z.3) #' #' #### QIs for a range of fitted values #' z.4 <- zelig(Petal.Width ~ Petal.Length + Species, data = iris, #' model = "ls") #' z.4 <- setx(z.4, Petal.Length = 2:4) #' zelig_setx_to_df(z.4) #' #' #### QIs for a range of fitted values, estimated by Species #' z.5 <- zelig(Petal.Width ~ Petal.Length, by = "Species", data = iris, #' model = "ls") #' z.5 <- setx(z.5, Petal.Length = 2:4) #' zelig_setx_to_df(z.5) #' #' #### QIs for two ranges of fitted values #' z.6 <- zelig(Petal.Width ~ Petal.Length + Species, data = iris, #' model = "ls") #' z.6 <- setx(z.6, Petal.Length = 2:4, Species = "setosa") #' z.6 <- setx1(z.6, Petal.Length = 2:4, Species = "virginica") #' zelig_setx_to_df(z.6) #' #' @md #' @author Christopher Gandrud #' @export zelig_setx_to_df <- function(obj) { is_zelig(obj) comb <- data.frame() if (!is.null(obj$setx.out$x)) { comb_temp <- extract_setx(obj, only_setx = TRUE) comb <- rbind(comb, comb_temp) } if (!is.null(obj$setx.out$x1)) { comb_temp <- extract_setx(obj, which_x = 'x1', only_setx = TRUE) comb <- rbind(comb, comb_temp) } if (!is.null(obj$setx.out$range)) { comb_temp <- extract_setrange(obj, only_setx = TRUE) comb <- rbind(comb, comb_temp) } if (!is.null(obj$setx.out$range1)) { comb_temp <- extract_setrange(obj, which_range = 'range1', only_setx = TRUE) comb <- rbind(comb, comb_temp) } # Need range1 if (nrow(comb) == 0) stop('Unable to find fitted (setx) values.', call. = FALSE) return(comb) } #' Extract setx for non-range and return tidy formatted data frame #' #' @param obj a zelig object containing simulated quantities of interest #' @param which_x character string either `'x'` or `'x1'` indicating whether #' to extract the first or second set of fitted values #' @param only_setx logical whether or not to only extract `setx`` values. #' #' @seealso \code{\link{zelig_qi_to_df}} #' @author Christopher Gandrud #' #' @md #' @keywords internal extract_setx <- function(obj, which_x = 'x', only_setx = FALSE) { temp_comb <- data.frame() all_fitted <- obj$setx.out[[which_x]] if (!only_setx) all_sims <- obj$sim.out[[which_x]] temp_fitted <- as.data.frame(all_fitted$mm[[1]], row.names = NULL) by_length <- nrow(all_fitted) if (by_length > 1) { temp_fitted <- temp_fitted[rep(seq_len(nrow(temp_fitted)), by_length), ] temp_fitted <- data.frame(by = all_fitted[[1]], temp_fitted, row.names = NULL) } temp_fitted <- rm_intercept(temp_fitted) temp_fitted <- factor_coef_combine(obj, temp_fitted) if (!only_setx) { temp_ev <- lapply(all_sims$ev, unlist) temp_pv <- lapply(all_sims$pv, unlist) for (i in 1:nrow(temp_fitted)) { temp_qi <- data.frame(temp_ev[[i]], temp_pv[[i]]) if (ncol(temp_qi) == 2) names(temp_qi) <- c('expected_value', 'predicted_value') else if (ncol(temp_qi) > 2 & is.factor(temp_pv[[i]])) names(temp_qi) <- c(sprintf('expected_%s', colnames(temp_ev[[i]])), 'predicted_value') temp_df <- cbind(temp_fitted[i, ], temp_qi, row.names = NULL) temp_comb <- rbind(temp_comb, temp_df) } temp_comb$setx_value <- which_x temp_comb <- temp_comb[, c(ncol(temp_comb), 1:(ncol(temp_comb)-1))] return(temp_comb) } else if (only_setx) return(temp_fitted) } #' Extract setrange to return as tidy formatted data frame #' #' @param obj a zelig object containing a range of simulated quantities of #' interest #' @param which_range character string either `'range'` or `'range1'` #' indicating whether to extract the first or second set of fitted values #' @param only_setx logical whether or not to only extract `setx`` values. #' #' @seealso \code{\link{zelig_qi_to_df}} #' @author Christopher Gandrud #' #' @md #' @keywords internal extract_setrange <- function(obj, which_range = 'range', only_setx = FALSE) { temp_comb <- data.frame() all_fitted <- obj$setx.out[[which_range]] if (!only_setx) all_sims <- obj$sim.out[[which_range]] for (i in 1:length(all_fitted)) { temp_fitted <- as.data.frame(all_fitted[[i]]$mm[[1]], row.names = NULL) by_length <- nrow(all_fitted[[i]]) if (by_length > 1) { temp_fitted <- temp_fitted[rep(seq_len(nrow(temp_fitted)), by_length), ] temp_fitted <- data.frame(by = all_fitted[[i]][[1]], temp_fitted, row.names = NULL) } temp_fitted <- rm_intercept(temp_fitted) temp_fitted <- factor_coef_combine(obj, temp_fitted) if (!only_setx) { temp_ev <- lapply(all_sims[[i]]$ev, unlist) temp_pv <- lapply(all_sims[[i]]$pv, unlist) temp_comb_1_range <- data.frame() for (u in 1:nrow(temp_fitted)) { temp_qi <- data.frame(temp_ev[[u]], temp_pv[[u]]) if (ncol(temp_qi) == 2) names(temp_qi) <- c('expected_value', 'predicted_value') else if (ncol(temp_qi) > 2 & is.factor(temp_pv[[u]])) names(temp_qi) <- c(sprintf('expected_%s', colnames(temp_ev[[u]])), 'predicted_value') temp_df <- cbind(temp_fitted[u, ], temp_qi, row.names = NULL) temp_comb_1_range <- rbind(temp_comb_1_range, temp_df) } temp_comb <- rbind(temp_comb, temp_comb_1_range) } else if (only_setx) { temp_comb <- rbind(temp_comb, temp_fitted) } } if (!only_setx) { if (which_range == 'range') temp_comb$setx_value <- 'x' else temp_comb$setx_value <- 'x1' temp_comb <- temp_comb[, c(ncol(temp_comb), 1:(ncol(temp_comb)-1))] } return(temp_comb) } #' Return individual factor coefficient fitted values to single factor variable #' #' @param obj a zelig object with an estimated model #' @param fitted a data frame with values fitted by \code{setx}. Note #' created internally by \code{\link{extract_setx}} and #' \code{\link{extract_setrange}} #' #' @author Christopher Gandrud #' @keywords internal factor_coef_combine <- function(obj, fitted) { is_zelig(obj) if (!('mcmc' %in% class(obj$zelig.out$z.out[[1]]))) { # find a more general solution original_data <- obj$zelig.out$z.out[[1]]$model factor_vars <- sapply(original_data, is.factor) if (any(factor_vars)) { for (i in names(original_data)[factor_vars]) { if (!(i %in% names(fitted))) { matches_name <- names(fitted)[grepl(sprintf('^%s*', i), names(fitted))] var_levels <- levels(original_data[, i]) fitted[, i] <- NA for (u in matches_name) { label_value <- gsub(sprintf('^%s', i), '', u) fitted[, i][fitted[, u] == 1] <- label_value } ref_level <- var_levels[!(var_levels %in% gsub(sprintf('^%s', i), '', matches_name))] fitted[, i][is.na(fitted[, i])] <- ref_level fitted[, i] <- factor(fitted[, i], levels = var_levels) fitted <- fitted[, !(names(fitted) %in% matches_name)] } } } } return(fitted) } #' Find the median and a central interval of simulated quantity of interest #' distributions #' #' @param df a tidy-formatted data frame of simulated quantities of interest #' created by \code{\link{zelig_qi_to_df}}. #' @param qi_type character string either `ev` or `pv` for returning the #' central intervals for the expected value or predicted value, respectively. #' @param ci numeric. The central interval to return, expressed on the #' `(0, 100]` or the equivalent `(0, 1]` interval. #' #' @details A tidy-formatted data frame with the following columns: #' #' - The values fitted with \code{\link{setx}} #' - `qi_ci_min`: the minimum value of the central interval specified with #' `ci` #' - `qi_ci_median`: the median of the simulated quantity of interest #' distribution #' - `qi_ci_max`: the maximum value of the central interval specified with #' `ci` #' #' @examples #' library(dplyr) #' qi.central.interval <- zelig(Petal.Width ~ Petal.Length + Species, #' data = iris, model = "ls") %>% #' setx(Petal.Length = 2:4, Species = "setosa") %>% #' sim() %>% #' zelig_qi_to_df() %>% #' qi_slimmer() #' #' @importFrom dplyr bind_rows %>% #' @seealso \code{\link{zelig_qi_to_df}} #' @author Christopher Gandrud #' @md qi_slimmer <- function(df, qi_type = 'ev', ci = 0.95) { qi__ <- scenario__ <- NULL if (qi_type == 'ev') qi_type <- 'expected_value' if (qi_type == 'pv') qi_type <- 'predicted_value' if (!is.data.frame(df)) stop('df must be a data frame created by zelig_qi_to_df.', call. = FALSE) names_df <- names(df) if (!any(c('expected_value', 'predicted_value') %in% names_df)) stop('The data frame does not appear to have been created by zelig_qi_to_df.', call. = FALSE) ci <- ci_check(ci) lower <- (1 - ci)/2 upper <- 1 - lower if (length(qi_type) != 1) stop('Only one qi_type allowed per function call.', call. = FALSE) qi_stripped <- gsub('_.*', '', qi_type) if (!(qi_stripped %in% c('expected', 'predicted'))) stop('qi_type must be one of "ev", "pv", "expected_*" or "predicted_*". ', call. = FALSE) qi_df_location <- grep(qi_stripped, names_df) qi_length <- length(qi_df_location) if (qi_length > 1 & qi_type %in% c('ev', 'expected_value')) { message(sprintf('\nMore than one %s values found. Returning slimmed expected values for the first outcome.\nIf another is desired please enter its name in qi_type.\n', qi_stripped)) qi_var <- names_df[qi_df_location[1]] } else qi_var <- qi_type if (qi_stripped %in% 'expected'& length(qi_df_location) == 1) qi_drop <- 'predicted' else if ((qi_stripped %in% 'expected') & length(qi_df_location) > 1) { other_expected <- names_df[qi_df_location] other_expected <- other_expected[!(other_expected %in% qi_var)] qi_drop <- c(other_expected, 'predicted_value') } else qi_drop <- 'expected' if (qi_stripped %in% 'expected') qi_msg <- 'Expected Values' else qi_msg <- 'Predicted Values' message(sprintf('Slimming %s . . .', qi_msg)) # drop non-requested qi_type if (length(qi_drop) == 1) df <- df[, !(gsub('_.*', '', names_df) %in% qi_drop)] else if (length(qi_drop) > 1) df <- df[!(names_df %in% qi_drop)] names(df)[names(df) == qi_var] <- 'qi__' df$scenario__ <- interaction(df[, !(names(df) %in% 'qi__')], drop = TRUE) qi_list <- split(df, df[['scenario__']]) qi_list <- lapply(seq_along(qi_list), function(x) { if (!is.factor(qi_list[[x]][, 'qi__'])) { lower_bound <- quantile(qi_list[[x]][, 'qi__'], prob = lower) upper_bound <- quantile(qi_list[[x]][, 'qi__'], prob = upper) subset(qi_list[[x]], qi__ >= lower_bound & qi__ <= upper_bound) } else if (is.factor(qi_list[[x]][, 'qi__'])) { # Categorical outcomes prop_outcome <- as.data.frame.matrix( t(table(qi_list[[x]][, 'qi__']) / nrow(qi_list[[x]]))) names(prop_outcome) <- sprintf('predicted_proportion_(Y=%s)', 1:ncol(prop_outcome)) cbind(qi_list[[x]][1, ], prop_outcome) } }) df_slimmed <- data.frame(bind_rows(qi_list)) names(df_slimmed) <- names(qi_list[[1]]) if (!is.factor(df_slimmed$qi__)) { df_out <- df_slimmed %>% group_by(scenario__) %>% summarise(qi_ci_min = min(qi__), qi_ci_median = median(qi__), qi_ci_max = max(qi__) ) %>% data.frame scenarios_df <- df[!duplicated(df$scenario__), !(names(df) %in% 'qi__')] %>% data.frame(row.names = NULL) df_out <- merge(scenarios_df, df_out, by = 'scenario__', sort = FALSE) } else df_out <- df_slimmed df_out$scenario__ <- NULL df_out$qi__ <- NULL return(df_out) } #' Convert \code{ci} interval from percent to proportion and check if valid #' @param x numeric. The central interval to return, expressed on the `(0, 100]` #' or the equivalent `(0, 1]` interval. #' #' @md #' @keywords internal ci_check <- function(x) { if (x > 1 & x <= 100) x <- x / 100 if (x <= 0 | x > 1) { stop(sprintf("%s will not produce a valid central interval.", x), call. = FALSE) } return(x) } Zelig/R/model-exp.R0000755000176200001440000001467113754260262013565 0ustar liggesusers#' Exponential Regression for Duration Dependent Variables #'@param formula a symbolic representation of the model to be #' estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the #' dependent variable and \code{x1} and \code{x2} are the explanatory #' variables, and \code{y}, \code{x1}, and \code{x2} are contained in the #' same dataset. (You may include more than two explanatory variables, #' of course.) The \code{+} symbol means ``inclusion'' not #' ``addition.'' You may also include interaction terms and main #' effects in the form \code{x1*x2} without computing them in prior #' steps; \code{I(x1*x2)} to include only the interaction term and #' exclude the main effects; and quadratic terms in the form #' \code{I(x1^2)}. #' @param model the name of a statistical model to estimate. #' For a list of supported models and their documentation see: #' \url{http://docs.zeligproject.org/articles/}. #' @param data the name of a data frame containing the variables #' referenced in the formula or a list of multiply imputed data frames #' each having the same variable names and row numbers (created by #' \code{Amelia} or \code{\link{to_zelig_mi}}). #' @param ... additional arguments passed to \code{zelig}, #' relevant for the model to be estimated. #' @param by a factor variable contained in \code{data}. If supplied, #' \code{zelig} will subset #' the data frame based on the levels in the \code{by} variable, and #' estimate a model for each subset. This can save a considerable amount of #' effort. For example, to run the same model on all fifty states, you could #' use: \code{z.out <- zelig(y ~ x1 + x2, data = mydata, model = 'ls', #' by = 'state')} You may also use \code{by} to run models using MatchIt #' subclasses. #' @param cite If is set to 'TRUE' (default), the model citation will be printed #' to the console. #' #' @details #' Additional parameters avaialable to this model include: #' \itemize{ #' \item \code{weights}: vector of weight values or a name of a variable in the dataset #' by which to weight the model. For more information see: #' \url{http://docs.zeligproject.org/articles/weights.html}. #' \item \code{bootstrap}: logical or numeric. If \code{FALSE} don't use bootstraps to #' robustly estimate uncertainty around model parameters due to sampling error. #' If an integer is supplied, the number of boostraps to run. #' For more information see: #' \url{http://docs.zeligproject.org/articles/bootstraps.html}. #' } #' @return Depending on the class of model selected, \code{zelig} will return #' an object with elements including \code{coefficients}, \code{residuals}, #' and \code{formula} which may be summarized using #' \code{summary(z.out)} or individually extracted using, for example, #' \code{coef(z.out)}. See #' \url{http://docs.zeligproject.org/articles/getters.html} for a list of #' functions to extract model components. You can also extract whole fitted #' model objects using \code{\link{from_zelig_model}}. #' @param robust defaults to FALSE. If TRUE, zelig() computes robust standard errors based on sandwich estimators and the options selected in cluster. #' @param if robust = TRUE, you may select a variable to define groups of correlated observations. Let x3 be a variable that consists of either discrete numeric values, character strings, or factors that define strata. Then #' z.out <- zelig(y ~ x1 + x2, robust = TRUE, cluster = "x3",model = "exp", data = mydata) #' means that the observations can be correlated within the strata defined by the variable x3, and that robust standard errors should be calculated according to those clusters. If robust = TRUE but cluster is not specified, zelig() assumes that each observation falls into its own cluster. #' #' @examples #' library(Zelig) #' data(coalition) #' library(survival) #' z.out <- zelig(Surv(duration, ciep12) ~ fract + numst2, model = "exp", #' data = coalition) #' summary(z.out) #' #' @seealso Vignette: \url{http://docs.zeligproject.org/articles/zelig_exp.html} #' @import methods #' @export Zelig-exp #' @exportClass Zelig-exp #' #' @include model-zelig.R zexp <- setRefClass("Zelig-exp", contains = "Zelig", fields = list(simalpha = "list", linkinv = "function")) zexp$methods( initialize = function() { callSuper() .self$name <- "exp" .self$authors <- "Olivia Lau, Kosuke Imai, Gary King" .self$packageauthors <- "Terry M. Therneau, and Thomas Lumley" .self$year <- 2011 .self$description <- "Exponential Regression for Duration Dependent Variables" .self$fn <- quote(survival::survreg) .self$linkinv <- survreg.distributions[["exponential"]]$itrans # JSON .self$outcome <- "continous" .self$wrapper <- "exp" .self$acceptweights <- TRUE } ) zexp$methods( zelig = function(formula, ..., robust = FALSE, cluster = NULL, data, weights = NULL, by = NULL, bootstrap = FALSE) { localFormula <- formula # avoids CRAN warning about deep assignment from formula existing separately as argument and field .self$zelig.call <- match.call(expand.dots = TRUE) .self$model.call <- .self$zelig.call if (!(is.null(cluster) || robust)) stop("If cluster is specified, then `robust` must be TRUE") # Add cluster term if (robust || !is.null(cluster)) localFormula <- cluster.formula(localFormula, cluster) .self$model.call$dist <- "exponential" .self$model.call$model <- FALSE callSuper(formula = localFormula, data = data, ..., robust = robust, cluster = cluster, weights = weights, by = by, bootstrap = bootstrap) rse <- lapply(.self$zelig.out$z.out, (function(x) vcovHC(x, type = "HC0"))) .self$test.statistics <- list(robust.se = rse) } ) zexp$methods( qi = function(simparam, mm) { eta <- simparam %*% t(mm) ev <- as.matrix(apply(eta, 2, linkinv)) pv <- as.matrix(rexp(length(ev), rate = 1 / ev)) return(list(ev = ev, pv = pv)) } ) zexp$methods( mcfun = function(x, b0=0, b1=1, alpha=1, sim=TRUE){ .self$mcformula <- as.Formula("Surv(y.sim, event) ~ x.sim") lambda <-exp(b0 + b1 * x) event <- rep(1, length(x)) y.sim <- rexp(n=length(x), rate=lambda) y.hat <- 1/lambda if(sim){ mydata <- data.frame(y.sim=y.sim, event=event, x.sim=x) return(mydata) }else{ mydata <- data.frame(y.hat=y.hat, event=event, x.seq=x) return(mydata) } } ) Zelig/R/wrappers.R0000755000176200001440000004711113754260262013531 0ustar liggesusers#' Estimating a Statistical Model #' #' The zelig function estimates a variety of statistical #' models. Use \code{zelig} output with \code{setx} and \code{sim} to compute #' quantities of interest, such as predicted probabilities, expected values, and #' first differences, along with the associated measures of uncertainty #' (standard errors and confidence intervals). #' #' This documentation describes the \code{zelig} Zelig 4 compatibility wrapper #' function. #' #' @param formula a symbolic representation of the model to be #' estimated, in the form \code{y \~\, x1 + x2}, where \code{y} is the #' dependent variable and \code{x1} and \code{x2} are the explanatory #' variables, and \code{y}, \code{x1}, and \code{x2} are contained in the #' same dataset. (You may include more than two explanatory variables, #' of course.) The \code{+} symbol means ``inclusion'' not #' ``addition.'' You may also include interaction terms and main #' effects in the form \code{x1*x2} without computing them in prior #' steps; \code{I(x1*x2)} to include only the interaction term and #' exclude the main effects; and quadratic terms in the form #' \code{I(x1^2)}. #' @param model the name of a statistical model to estimate. #' For a list of other supported models and their documentation see: #' \url{http://docs.zeligproject.org/articles/}. #' @param data the name of a data frame containing the variables #' referenced in the formula or a list of multiply imputed data frames #' each having the same variable names and row numbers (created by #' \code{Amelia} or \code{\link{to_zelig_mi}}). #' @param ... additional arguments passed to \code{zelig}, #' relevant for the model to be estimated. #' @param by a factor variable contained in \code{data}. If supplied, #' \code{zelig} will subset #' the data frame based on the levels in the \code{by} variable, and #' estimate a model for each subset. This can save a considerable amount of #' effort. For example, to run the same model on all fifty states, you could #' use: \code{z.out <- zelig(y ~ x1 + x2, data = mydata, model = 'ls', #' by = 'state')} You may also use \code{by} to run models using MatchIt #' subclasses. #' @param cite If is set to 'TRUE' (default), the model citation will be printed #' to the console. #' #' @details #' Additional parameters avaialable to many models include: #' \itemize{ #' \item weights: vector of weight values or a name of a variable in the dataset #' by which to weight the model. For more information see: #' \url{http://docs.zeligproject.org/articles/weights.html}. #' \item bootstrap: logical or numeric. If \code{FALSE} don't use bootstraps to #' robustly estimate uncertainty around model parameters due to sampling error. #' If an integer is supplied, the number of boostraps to run. #' For more information see: #' \url{http://docs.zeligproject.org/articles/bootstraps.html}. #' } #' #' @return Depending on the class of model selected, \code{zelig} will return #' an object with elements including \code{coefficients}, \code{residuals}, #' and \code{formula} which may be summarized using #' \code{summary(z.out)} or individually extracted using, for example, #' \code{coef(z.out)}. See #' \url{http://docs.zeligproject.org/articles/getters.html} for a list of #' functions to extract model components. You can also extract whole fitted #' model objects using \code{\link{from_zelig_model}}. #' #' @seealso \url{http://docs.zeligproject.org/articles/} #' @name zelig #' @author Matt Owen, Kosuke Imai, Olivia Lau, and Gary King #' @export zelig <- function(formula, model, data, ..., by = NULL, cite = TRUE) { # .Deprecated('\nz$new() \nz$zelig(...)') Check if required model argument is # specified if (missing(model)) stop("Estimation model type not specified.\nSelect estimation model type with the model argument.", call. = FALSE) # Zelig Core zeligmodels <- system.file(file.path("JSON", "zelig5models.json"), package = "Zelig") models <- jsonlite::fromJSON(txt = readLines(zeligmodels))$zelig5models # Zelig Choice zeligchoicemodels <- system.file(file.path("JSON", "zelig5choicemodels.json"), package = "ZeligChoice") if (zeligchoicemodels != "") models <- c(models, jsonlite::fromJSON(txt = readLines(zeligchoicemodels))$zelig5choicemodels) # Zelig Panel zeligpanelmodels <- system.file(file.path("JSON", "zelig5panelmodels.json"), package = "ZeligPanel") if (zeligpanelmodels != "") models <- c(models, jsonlite::fromJSON(txt = readLines(zeligpanelmodels))$zelig5panelmodels) # Zelig GAM zeligammodels <- system.file(file.path("JSON", "zelig5gammodels.json"), package = "ZeligGAM") if (zeligammodels != "") models <- c(models, jsonlite::fromJSON(txt = readLines(zeligammodels))$zelig5gammodels) # Zelig Multilevel zeligmixedmodels <- system.file(file.path("JSON", "zelig5mixedmodels.json"), package = "ZeligMultilevel") if (zeligmixedmodels != "") models <- c(models, jsonlite::fromJSON(txt = readLines(zeligmixedmodels))$zelig5mixedmodels) # Aggregating all available models models4 <- list() for (i in seq(models)) { models4[[models[[i]]$wrapper]] <- names(models)[i] } model.init <- sprintf("z%s$new()", models4[[model]]) if (length(model.init) == 0) stop(sprintf("%s is not a supported model type.", model), call. = FALSE) z5 <- try(eval(parse(text = model.init)), silent = TRUE) if ("try-error" %in% class(z5)) stop("Model '", model, "' not found") ## End: Zelig 5 models mf <- match.call() mf$model <- NULL mf$cite <- NULL mf[[1]] <- quote(z5$zelig) mf <- try(eval(mf, environment()), silent = TRUE) if ("try-error" %in% class(mf)) z5$zelig(formula = formula, data = data, ..., by = by) if (cite) z5$cite() return(z5) } #' Setting Explanatory Variable Values #' #' The \code{setx} function uses the variables identified in #' the \code{formula} generated by \code{zelig} and sets the values of #' the explanatory variables to the selected values. Use \code{setx} #' after \code{zelig} and before \code{sim} to simulate quantities of #' interest. #' #' This documentation describes the \code{setx} Zelig 4 compatibility wrapper #' function. #' #' @param obj output object from \code{\link{zelig}} #' @param fn a list of functions to apply to the data frame #' @param data a new data frame used to set the values of #' explanatory variables. If \code{data = NULL} (the default), the #' data frame called in \code{\link{zelig}} is used #' @param cond a logical value indicating whether unconditional #' (default) or conditional (choose \code{cond = TRUE}) prediction #' should be performed. If you choose \code{cond = TRUE}, \code{setx} #' will coerce \code{fn = NULL} and ignore the additional arguments in #' \code{\dots}. If \code{cond = TRUE} and \code{data = NULL}, #' \code{setx} will prompt you for a data frame. #' @param ... user-defined values of specific variables for overwriting the #' default values set by the function \code{fn}. For example, adding #' \code{var1 = mean(data\$var1)} or \code{x1 = 12} explicitly sets the value #' of \code{x1} to 12. In addition, you may specify one explanatory variable #' as a range of values, creating one observation for every unique value in #' the range of values #' @return The output is returned in a field to the Zelig object. For #' unconditional prediction, \code{x.out} is a model matrix based #' on the specified values for the explanatory variables. For multiple #' analyses (i.e., when choosing the \code{by} option in \code{\link{zelig}}, #' \code{setx} returns the selected values calculated over the entire #' data frame. If you wish to calculate values over just one subset of #' the data frame, the 5th subset for example, you may use: #' \code{x.out <- setx(z.out[[5]])} #' #' @examples #' # Unconditional prediction: #' data(turnout) #' z.out <- zelig(vote ~ race + educate, model = 'logit', data = turnout) #' x.out <- setx(z.out) #' s.out <- sim(z.out, x = x.out) #' #' @author Matt Owen, Olivia Lau and Kosuke Imai #' @seealso The full Zelig manual may be accessed online at #' \url{http://docs.zeligproject.org/articles/} #' @keywords file #' @export setx <- function(obj, fn = NULL, data = NULL, cond = FALSE, ...) { # .Deprecated('\nz$new() \nz$zelig(...) \nz$setx() or z$setx1 or z$setrange') if(!is_zelig(obj, fail = FALSE)) obj <- to_zelig(obj) x5 <- obj$copy() # This is the length of each argument in '...'s s <- list(...) if (length(s) > 0) { hold <- rep(1, length(s)) for (i in 1:length(s)) { hold[i] <- length(s[i][[1]]) } } else { hold <- 1 } if (max(hold) > 1) { x5$setrange(...) } else { x5$setx(...) } return(x5) } #' Setting Explanatory Variable Values for First Differences #' #' This documentation describes the \code{setx1} Zelig 4 compatibility wrapper #' function. The wrapper is primarily useful for setting fitted values #' for creating first differences in piped workflows. #' #' @param obj output object from \code{\link{zelig}} #' @param fn a list of functions to apply to the data frame #' @param data a new data frame used to set the values of #' explanatory variables. If \code{data = NULL} (the default), the #' data frame called in \code{\link{zelig}} is used #' @param cond a logical value indicating whether unconditional #' (default) or conditional (choose \code{cond = TRUE}) prediction #' should be performed. If you choose \code{cond = TRUE}, \code{setx1} #' will coerce \code{fn = NULL} and ignore the additional arguments in #' \code{\dots}. If \code{cond = TRUE} and \code{data = NULL}, #' \code{setx1} will prompt you for a data frame. #' @param ... user-defined values of specific variables for overwriting the #' default values set by the function \code{fn}. For example, adding #' \code{var1 = mean(data\$var1)} or \code{x1 = 12} explicitly sets the value #' of \code{x1} to 12. In addition, you may specify one explanatory variable #' as a range of values, creating one observation for every unique value in #' the range of values #' @return The output is returned in a field to the Zelig object. For #' unconditional prediction, \code{x.out} is a model matrix based #' on the specified values for the explanatory variables. For multiple #' analyses (i.e., when choosing the \code{by} option in \code{\link{zelig}}, #' \code{setx1} returns the selected values calculated over the entire #' data frame. If you wish to calculate values over just one subset of #' the data frame, the 5th subset for example, you may use: #' \code{x.out <- setx(z.out[[5]])} #' #' @examples #' library(dplyr) # contains pipe operator %>% #' data(turnout) #' #' # plot first differences #' zelig(Fertility ~ Education, data = swiss, model = 'ls') %>% #' setx(z4, Education = 10) %>% #' setx1(z4, Education = 30) %>% #' sim() %>% #' plot() #' #' @author Christopher Gandrud, Matt Owen, Olivia Lau, Kosuke Imai #' @seealso The full Zelig manual may be accessed online at #' \url{http://docs.zeligproject.org/articles/} #' @keywords file #' @export setx1 <- function(obj, fn = NULL, data = NULL, cond = FALSE, ...) { is_zelig(obj) x5 <- obj$copy() # This is the length of each argument in '...'s s <- list(...) if (length(s) > 0) { hold <- rep(1, length(s)) for (i in 1:length(s)) { hold[i] <- length(s[i][[1]]) } } else { hold <- 1 } if (max(hold) > 1) { x5$setrange1(...) } else { x5$setx1(...) } return(x5) } #' Generic Method for Computing and Organizing Simulated Quantities of Interest #' #' Simulate quantities of interest from the estimated model #' output from \code{zelig()} given specified values of explanatory #' variables established in \code{setx()}. For classical \emph{maximum #' likelihood} models, \code{sim()} uses asymptotic normal #' approximation to the log-likelihood. For \emph{Bayesian models}, #' Zelig simulates quantities of interest from the posterior density, #' whenever possible. For \emph{robust Bayesian models}, simulations #' are drawn from the identified class of Bayesian posteriors. #' Alternatively, you may generate quantities of interest using #' bootstrapped parameters. #' #' This documentation describes the \code{sim} Zelig 4 compatibility wrapper #' function. #' #' @param obj output object from \code{zelig} #' @param x values of explanatory variables used for simulation, #' generated by \code{setx}. Not if ommitted, then \code{sim} will look for #' values in the reference class object #' @param x1 optional values of explanatory variables (generated by a #' second call of \code{setx}) #' particular computations of quantities of interest #' @param y a parameter reserved for the computation of particular #' quantities of interest (average treatment effects). Few #' models currently support this parameter #' @param num an integer specifying the number of simulations to compute #' @param bootstrap currently unsupported #' @param bootfn currently unsupported #' @param cond.data currently unsupported #' @param ... arguments reserved future versions of Zelig #' @return The output stored in \code{s.out} varies by model. Use the #' \code{names} function to view the output stored in \code{s.out}. #' Common elements include: #' \item{x}{the \code{\link{setx}} values for the explanatory variables, #' used to calculate the quantities of interest (expected values, #' predicted values, etc.). } #' \item{x1}{the optional \code{\link{setx}} object used to simulate #' first differences, and other model-specific quantities of #' interest, such as risk-ratios.} #' \item{call}{the options selected for \code{\link{sim}}, used to #' replicate quantities of interest. } #' \item{zelig.call}{the original function and options for #' \code{\link{zelig}}, used to replicate analyses. } #' \item{num}{the number of simulations requested. } #' \item{par}{the parameters (coefficients, and additional #' model-specific parameters). You may wish to use the same set of #' simulated parameters to calculate quantities of interest rather #' than simulating another set.} #' \item{qi\$ev}{simulations of the expected values given the #' model and \code{x}. } #' \item{qi\$pr}{simulations of the predicted values given by the #' fitted values. } #' \item{qi\$fd}{simulations of the first differences (or risk #' difference for binary models) for the given \code{x} and \code{x1}. #' The difference is calculated by subtracting the expected values #' given \code{x} from the expected values given \code{x1}. (If do not #' specify \code{x1}, you will not get first differences or risk #' ratios.) } #' \item{qi\$rr}{simulations of the risk ratios for binary and #' multinomial models. See specific models for details.} #' \item{qi\$ate.ev}{simulations of the average expected #' treatment effect for the treatment group, using conditional #' prediction. Let \eqn{t_i} be a binary explanatory variable defining #' the treatment (\eqn{t_i=1}) and control (\eqn{t_i=0}) groups. Then the #' average expected treatment effect for the treatment group is #' \deqn{ \frac{1}{n}\sum_{i=1}^n [ \, Y_i(t_i=1) - #' E[Y_i(t_i=0)] \mid t_i=1 \,],} #' where \eqn{Y_i(t_i=1)} is the value of the dependent variable for #' observation \eqn{i} in the treatment group. Variation in the #' simulations are due to uncertainty in simulating \eqn{E[Y_i(t_i=0)]}, #' the counterfactual expected value of \eqn{Y_i} for observations in the #' treatment group, under the assumption that everything stays the #' same except that the treatment indicator is switched to \eqn{t_i=0}. } #' \item{qi\$ate.pr}{simulations of the average predicted #' treatment effect for the treatment group, using conditional #' prediction. Let \eqn{t_i} be a binary explanatory variable defining #' the treatment (\eqn{t_i=1}) and control (\eqn{t_i=0}) groups. Then the #' average predicted treatment effect for the treatment group is #' \deqn{ \frac{1}{n}\sum_{i=1}^n [ \, Y_i(t_i=1) - #' \widehat{Y_i(t_i=0)} \mid t_i=1 \,],} #' where \eqn{Y_i(t_i=1)} is the value of the dependent variable for #' observation \eqn{i} in the treatment group. Variation in the #' simulations are due to uncertainty in simulating #' \eqn{\widehat{Y_i(t_i=0)}}, the counterfactual predicted value of #' \eqn{Y_i} for observations in the treatment group, under the #' assumption that everything stays the same except that the #' treatment indicator is switched to \eqn{t_i=0}.} #' #' @author Christopher Gandrud, Matt Owen, Olivia Lau and Kosuke Imai #' @export sim <- function(obj, x, x1, y = NULL, num = 1000, bootstrap = F, bootfn = NULL, cond.data = NULL, ...) { # .Deprecated('\nz$new() \n[...] \nz$sim(...)') is_zelig(obj) if (!missing(x)) s5 <- x$copy() if (!missing(x1)) { s15 <- x1$copy() if (!is.null(s15$setx.out$x)) { s5$setx.out$x1 <- s15$setx.out$x s5$bsetx1 <- TRUE } if (!is.null(s15$setx.out$range)) { s5$range1 <- s15$range s5$setx.out$range1 <- s15$setx.out$range s5$bsetrange1 <- TRUE } } if (missing(x)) s5 <- obj$copy() s5$sim(num = num) return(s5) } #' Extract standard errors from a Zelig estimated model #' #' @param object an object of class Zelig #' @author Christopher Gandrud #' @export get_se <- function(object) { is_zelig(object) out <- object$get_se() return(out) } #' Extract p-values from a Zelig estimated model #' #' @param object an object of class Zelig #' @author Christopher Gandrud #' @export get_pvalue <- function(object) { is_zelig(object) out <- object$get_pvalue() return(out) } #' Extract quantities of interest from a Zelig simulation #' #' @param object an object of class Zelig #' @param qi character string with the name of quantity of interest desired: #' `"ev"` for expected values, `"pv"` for predicted values or #' `"fd"` for first differences. #' @param xvalue chracter string stating which of the set of values of `x` #' should be used for getting the quantity of interest. #' @param subset subset for multiply imputed data (only relevant if multiply #' imputed data is supplied in the original call.) #' @author Christopher Gandrud #' @md #' @export get_qi <- function(object, qi = "ev", xvalue = "x", subset = NULL) { is_zelig(object) out <- object$get_qi(qi = qi, xvalue = xvalue, subset = subset) return(out) } #' Compute simulated (sample) average treatment effects on the treated from #' a Zelig model estimation #' #' @param object an object of class Zelig #' @param treatment character string naming the variable that denotes the #' treatment and non-treated groups. #' @param treated value of `treatment` variable indicating treatment #' @param num number of simulations to run. Default is 1000. #' @examples #' library(dplyr) #' data(sanction) #' z.att <- zelig(num ~ target + coop + mil, model = "poisson", #' data = sanction) %>% #' ATT(treatment = "mil") %>% #' get_qi(qi = "ATT", xvalue = "TE") #' #' @author Christopher Gandrud #' @md #' @export ATT <- function(object, treatment, treated = 1, num = NULL) { is_zelig(object) object$ATT(treatment = treatment, treated = treated, quietly = TRUE, num = num) return(object) } Zelig/R/model-normal-survey.R0000755000176200001440000001245213754260262015607 0ustar liggesusers#' Normal Regression for Continuous Dependent Variables with Survey Weights #'@param formula a symbolic representation of the model to be #' estimated, in the form \code{y \~\, x1 + x2}, where \code{y} is the #' dependent variable and \code{x1} and \code{x2} are the explanatory #' variables, and \code{y}, \code{x1}, and \code{x2} are contained in the #' same dataset. (You may include more than two explanatory variables, #' of course.) The \code{+} symbol means ``inclusion'' not #' ``addition.'' You may also include interaction terms and main #' effects in the form \code{x1*x2} without computing them in prior #' steps; \code{I(x1*x2)} to include only the interaction term and #' exclude the main effects; and quadratic terms in the form #' \code{I(x1^2)}. #'@param model the name of a statistical model to estimate. #' For a list of other supported models and their documentation see: #' \url{http://docs.zeligproject.org/articles/}. #'@param data the name of a data frame containing the variables #' referenced in the formula or a list of multiply imputed data frames #' each having the same variable names and row numbers (created by #' \code{Amelia} or \code{\link{to_zelig_mi}}). #'@param ... additional arguments passed to \code{zelig}, #' relevant for the model to be estimated. #'@param by a factor variable contained in \code{data}. If supplied, #' \code{zelig} will subset #' the data frame based on the levels in the \code{by} variable, and #' estimate a model for each subset. This can save a considerable amount of #' effort. You may also use \code{by} to run models using MatchIt #' subclasses. #'@param cite If is set to 'TRUE' (default), the model citation will be printed #' to the console. #' #' @details #' Additional parameters avaialable to this model include: #' \itemize{ #' \item \code{weights}: vector of weight values or a name of a variable in the dataset #' by which to weight the model. For more information see: #' \url{http://docs.zeligproject.org/articles/weights.html}. #' \item \code{bootstrap}: logical or numeric. If \code{FALSE} don't use bootstraps to #' robustly estimate uncertainty around model parameters due to sampling error. #' If an integer is supplied, the number of boostraps to run. #' For more information see: #' \url{http://docs.zeligproject.org/articles/bootstraps.html}. #' } #' @return Depending on the class of model selected, \code{zelig} will return #' an object with elements including \code{coefficients}, \code{residuals}, #' and \code{formula} which may be summarized using #' \code{summary(z.out)} or individually extracted using, for example, #' \code{coef(z.out)}. See #' \url{http://docs.zeligproject.org/articles/getters.html} for a list of #' functions to extract model components. You can also extract whole fitted #' model objects using \code{\link{from_zelig_model}}. #' #' @examples #' library(Zelig) #' data(api, package = "survey") #' z.out1 <- zelig(api00 ~ meals + yr.rnd, model = "normal.survey",eights = ~pw, data = apistrat) #' summary(z.out1) #' #' @seealso Vignette: \url{http://docs.zeligproject.org/articles/zelig_normalsurvey.html} #' @import methods #' @export Zelig-normal #' @exportClass Zelig-normal #' #' @include model-zelig.R #' @include model-survey.R #' @include model-normal.R znormalsurvey <- setRefClass("Zelig-normal-survey", contains = c("Zelig-survey"), fields = list(family = "character", link = "character", linkinv = "function")) #, "Zelig-normal")) znormalsurvey$methods( initialize = function() { callSuper() .self$name <- "normal-survey" .self$family <- "gaussian" .self$link <- "identity" .self$linkinv <- eval(call(.self$family, .self$link))$linkinv .self$category <- "continuous" .self$description <- "Normal Regression for Continuous Dependent Variables with Survey Weights" .self$outcome <- "continuous" # JSON .self$wrapper <- "normal.survey" } ) znormalsurvey$methods( param = function(z.out, method="mvn") { degrees.freedom <- z.out$df.residual sig2 <- base::summary(z.out)$dispersion # not to call class summary method simalpha <- sqrt(degrees.freedom * sig2 / rchisq(.self$num, degrees.freedom)) if(identical(method,"mvn")){ simparam.local <- mvrnorm(n = .self$num, mu = coef(z.out), Sigma = vcov(z.out)) simparam.local <- list(simparam = simparam.local, simalpha = simalpha) return(simparam.local) } else if(identical(method,"point")){ return(list(simparam = t(as.matrix(coef(z.out))), simalpha = simalpha)) } } ) znormalsurvey$methods( qi = function(simparam, mm) { theta <- matrix(simparam$simparam %*% t(mm), nrow = nrow(simparam$simparam)) ev <- theta pv <- matrix(NA, nrow = nrow(theta), ncol = ncol(theta)) for (j in 1:nrow(ev)) pv[j, ] <- rnorm(ncol(ev), mean = ev[j, ], sd = simparam$simalpha[j]) return(list(ev = ev, pv = pv)) } ) znormalsurvey$methods( mcfun = function(x, b0=0, b1=1, alpha=1, sim=TRUE){ y <- b0 + b1*x + sim * rnorm(n=length(x), sd=alpha) return(y) } ) Zelig/R/model-weibull.R0000644000176200001440000001717313754260262014431 0ustar liggesusers#' Weibull Regression for Duration Dependent Variables #' #' #' @param formula a symbolic representation of the model to be #' estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the #' dependent variable and \code{x1} and \code{x2} are the explanatory #' variables, and \code{y}, \code{x1}, and \code{x2} are contained in the #' same dataset. (You may include more than two explanatory variables, #' of course.) The \code{+} symbol means ``inclusion'' not #' ``addition.'' You may also include interaction terms and main #' effects in the form \code{x1*x2} without computing them in prior #' steps; \code{I(x1*x2)} to include only the interaction term and #' exclude the main effects; and quadratic terms in the form #' \code{I(x1^2)}. #' @param model the name of a statistical model to estimate. #' For a list of other supported models and their documentation see: #' \url{http://docs.zeligproject.org/articles/}. #' @param data the name of a data frame containing the variables #' referenced in the formula or a list of multiply imputed data frames #' each having the same variable names and row numbers (created by #' \code{Amelia} or \code{\link{to_zelig_mi}}). #' @param ... additional arguments passed to \code{zelig}, #' relevant for the model to be estimated. #' @param by a factor variable contained in \code{data}. If supplied, #' \code{zelig} will subset #' the data frame based on the levels in the \code{by} variable, and #' estimate a model for each subset. This can save a considerable amount of #' effort. You may also use \code{by} to run models using MatchIt #' subclasses. #' @param cite If is set to 'TRUE' (default), the model citation will be printed #' to the console. #' #' @details #' In addition to the standard inputs, zelig() takes the following #' additional options for weibull regression: #' \itemize{ #' \item \code{robust}: defaults to FALSE. If TRUE, zelig() computes #' robust standard errors based on sandwich estimators based on the options in cluster. #' \item \code{cluste}r: if \code{robust = TRUE}, you may select a variable #' to define groups of correlated observations. Let x3 be a variable #' that consists of either discrete numeric values, character strings, #' or factors that define strata. Then #' \code{z.out <- zelig(y ~ x1 + x2, robust = TRUE, cluster = "x3", #' model = "exp", data = mydata)} #' means that the observations can be correlated within the strata defined #' by the variable x3, and that robust standard errors should be calculated according to #' those clusters. If robust=TRUErobust=TRUE but cluster is not specified, zelig() assumes #' that each observation falls into its own cluster. #' } #' #' Additional parameters avaialable to this model include: #' \itemize{ #' \item weights: vector of weight values or a name of a variable in the dataset #' by which to weight the model. For more information see: #' \url{http://docs.zeligproject.org/articles/weights.html}. #' \item bootstrap: logical or numeric. If \code{FALSE} don't use bootstraps to #' robustly estimate uncertainty around model parameters due to sampling error. #' If an integer is supplied, the number of boostraps to run. #' For more information see: #' \url{http://docs.zeligproject.org/articles/bootstraps.html}. #' } #' #' @return Depending on the class of model selected, \code{zelig} will return #' an object with elements including \code{coefficients}, \code{residuals}, #' and \code{formula} which may be summarized using #' \code{summary(z.out)} or individually extracted using, for example, #' \code{coef(z.out)}. See #' \url{http://docs.zeligproject.org/articles/getters.html} for a list of #' functions to extract model components. You can also extract whole fitted #' model objects using \code{\link{from_zelig_model}}. #' #' @examples #' data(coalition) #' z.out <- zelig(Surv(duration, ciep12) ~ fract + numst2,model = "weibull", data = coalition) #' #' @seealso Vignette: \url{http://docs.zeligproject.org/articles/zelig_weibull.html} #' @import methods #' @export Zelig-tobit-bayes #' @exportClass Zelig-tobit-bayes #' #' @include model-zelig.R zweibull <- setRefClass("Zelig-weibull", contains = "Zelig", fields = list(simalpha = "list", linkinv = "function", lambda = "ANY")) zweibull$methods( initialize = function() { callSuper() .self$name <- "weibull" .self$authors <- "Olivia Lau, Kosuke Imai, Gary King" .self$packageauthors <- "Terry M Therneau, and Thomas Lumley" .self$year <- 2007 .self$description <- "Weibull Regression for Duration Dependent Variables" .self$fn <- quote(survival::survreg) .self$linkinv <- survreg.distributions[["weibull"]]$itrans # JSON .self$outcome <- "bounded" .self$wrapper <- "weibull" .self$acceptweights <- TRUE } ) zweibull$methods( zelig = function(formula, ..., robust = FALSE, cluster = NULL, data, weights = NULL, by = NULL, bootstrap = FALSE) { localFormula <- formula # avoids CRAN warning about deep assignment from formula existing separately as argument and field .self$zelig.call <- match.call(expand.dots = TRUE) .self$model.call <- .self$zelig.call if (!(is.null(cluster) || robust)) stop("If cluster is specified, then `robust` must be TRUE") # Add cluster term if (robust || !is.null(cluster)) localFormula <- cluster.formula(localFormula, cluster) .self$model.call$dist <- "weibull" .self$model.call$model <- FALSE callSuper(formula = localFormula, data = data, ..., robust = robust, cluster = cluster, weights = weights, by = by, bootstrap = bootstrap) if(!robust){ fn2 <- function(fc, data) { fc$data <- data return(fc) } robust.model.call <- .self$model.call robust.model.call$robust <- TRUE robust.zelig.out <- .self$data %>% group_by_(.self$by) %>% do(z.out = eval(fn2(robust.model.call, quote(as.data.frame(.))))$var ) .self$test.statistics<- list(robust.se = robust.zelig.out$z.out) } } ) zweibull$methods( param = function(z.out, method="mvn") { if(identical(method,"mvn")){ coeff <- coef(z.out) mu <- c(coeff, log(z.out$scale) ) # JH this is the scale of the vcov used below cov <- vcov(z.out) simulations <- mvrnorm(.self$num, mu = mu, Sigma = cov) simparam.local <- as.matrix(simulations[, 1:length(coeff)]) simalpha.local <- as.matrix(simulations[, (length(coeff)+1)]) simparam.local <- list(simparam = simparam.local, simalpha = simalpha.local) return(simparam.local) } else if(identical(method,"point")){ return(list(simparam = t(as.matrix(coef(z.out))), simalpha = log(z.out$scale))) } } ) zweibull$methods( qi = function(simparam, mm) { eta <- simparam$simparam %*% t(mm) theta <- as.matrix(apply(eta, 2, linkinv)) ev <- theta * gamma(1 + exp(simparam$simalpha)) pv <- as.matrix(rweibull(length(ev), shape = 1/exp(simparam$simalpha), scale = theta)) return(list(ev = ev, pv = pv)) } ) zweibull$methods( mcfun = function(x, b0=0, b1=1, alpha=1, sim=TRUE){ .self$mcformula <- as.Formula("Surv(y.sim, event) ~ x.sim") mylambda <-exp(b0 + b1 * x) event <- rep(1, length(x)) y.sim <- rweibull(n=length(x), shape=alpha, scale=mylambda) y.hat <- mylambda * gamma(1 + (1/alpha)) if(sim){ mydata <- data.frame(y.sim=y.sim, event=event, x.sim=x) return(mydata) }else{ mydata <- data.frame(y.hat=y.hat, event=event, x.seq=x) return(mydata) } } ) Zelig/R/model-binchoice.R0000755000176200001440000000210513754260262014701 0ustar liggesusers#' Binary Choice object for inheritance across models in Zelig #' #' @import methods #' @export Zelig-binchoice #' @exportClass Zelig-binchoice #' #' @include model-zelig.R #' @include model-glm.R zbinchoice <- setRefClass("Zelig-binchoice", contains = "Zelig-glm") zbinchoice$methods( initialize = function() { callSuper() .self$authors <- "Kosuke Imai, Gary King, Olivia Lau" .self$year <- 2007 .self$category <- "dichotomous" .self$family <- "binomial" # JSON .self$outcome <- "binary" } ) zbinchoice$methods( qi = function(simparam, mm) { .self$linkinv <- eval(call(.self$family, .self$link))$linkinv coeff <- simparam eta <- simparam %*% t(mm) eta <- Filter(function (y) !is.na(y), eta) theta <- matrix(.self$linkinv(eta), nrow = nrow(coeff)) ev <- matrix(.self$linkinv(eta), ncol = ncol(theta)) pv <- matrix(nrow = nrow(ev), ncol = ncol(ev)) for (j in 1:ncol(ev)) pv[, j] <- rbinom(length(ev[, j]), 1, prob = ev[, j]) levels(pv) <- c(0, 1) return(list(ev = ev, pv = pv)) } ) Zelig/R/model-poisson-survey.R0000755000176200001440000001055513754260262016013 0ustar liggesusers#' Poisson Regression with Survey Weights #' @param formula a symbolic representation of the model to be #' estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the #' dependent variable and \code{x1} and \code{x2} are the explanatory #' variables, and \code{y}, \code{x1}, and \code{x2} are contained in the #' same dataset. (You may include more than two explanatory variables, #' of course.) The \code{+} symbol means ``inclusion'' not #' ``addition.'' You may also include interaction terms and main #' effects in the form \code{x1*x2} without computing them in prior #' steps; \code{I(x1*x2)} to include only the interaction term and #' exclude the main effects; and quadratic terms in the form #' \code{I(x1^2)}. #'@param model the name of a statistical model to estimate. #' For a list of other supported models and their documentation see: #' \url{http://docs.zeligproject.org/articles/}. #'@param data the name of a data frame containing the variables #' referenced in the formula or a list of multiply imputed data frames #' each having the same variable names and row numbers (created by #' \code{Amelia} or \code{\link{to_zelig_mi}}). #'@param ... additional arguments passed to \code{zelig}, #' relevant for the model to be estimated. #'@param by a factor variable contained in \code{data}. If supplied, #' \code{zelig} will subset #' the data frame based on the levels in the \code{by} variable, and #' estimate a model for each subset. This can save a considerable amount of #' effort. You may also use \code{by} to run models using MatchIt #' subclasses. #'@param cite If is set to 'TRUE' (default), the model citation will be printed #' to the console. #' #' @details #' Additional parameters avaialable to this model include: #' \itemize{ #' \item \code{weights}: vector of weight values or a name of a variable in the dataset #' by which to weight the model. For more information see: #' \url{http://docs.zeligproject.org/articles/weights.html}. #' \item \code{bootstrap}: logical or numeric. If \code{FALSE} don't use bootstraps to #' robustly estimate uncertainty around model parameters due to sampling error. #' If an integer is supplied, the number of boostraps to run. #' For more information see: #' \url{http://docs.zeligproject.org/articles/bootstraps.html}. #' } #' @return Depending on the class of model selected, \code{zelig} will return #' an object with elements including \code{coefficients}, \code{residuals}, #' and \code{formula} which may be summarized using #' \code{summary(z.out)} or individually extracted using, for example, #' \code{coef(z.out)}. See #' \url{http://docs.zeligproject.org/articles/getters.html} for a list of #' functions to extract model components. You can also extract whole fitted #' model objects using \code{\link{from_zelig_model}}. #' #' @examples #' library(Zelig) #' data(api, package="survey") #' z.out1 <- zelig(enroll ~ api99 + yr.rnd , model = "poisson.survey", data = apistrat) #' summary(z.out1) #' #' @seealso Vignette: \url{http://docs.zeligproject.org/articles/zelig_poissonsurvey.html} #' @import methods #' @export Zelig-poisson-gee #' @exportClass Zelig-poisson-gee #' #' @include model-zelig.R #' @include model-survey.R #' @include model-poisson.R zpoissonsurvey <- setRefClass("Zelig-poisson-survey", contains = c("Zelig-survey", "Zelig-poisson")) zpoissonsurvey$methods( initialize = function() { callSuper() .self$name <- "poisson-survey" .self$family <- "poisson" .self$link <- "log" .self$linkinv <- eval(call(.self$family, .self$link))$linkinv .self$category <- "continuous" .self$description = "Poisson Regression with Survey Weights" # JSON from parent .self$wrapper <- "poisson.survey" } ) zpoissonsurvey$methods( qi = function(simparam, mm) { eta <- simparam %*% t(mm) theta.local <- matrix(.self$linkinv(eta), nrow = nrow(simparam)) ev <- theta.local pv <- matrix(NA, nrow = nrow(theta.local), ncol = ncol(theta.local)) for (i in 1:ncol(theta.local)) pv[, i] <- rpois(nrow(theta.local), lambda = theta.local[, i]) return(list(ev = ev, pv = pv)) } ) zpoissonsurvey$methods( mcfun = function(x, b0=0, b1=1, ..., sim=TRUE){ lambda <- exp(b0 + b1 * x) if(sim){ y <- rpois(n=length(x), lambda=lambda) return(y) }else{ return(lambda) } } ) Zelig/R/model-normal.R0000755000176200001440000001450213754260262014252 0ustar liggesusers#' Normal Regression for Continuous Dependent Variables #'@param formula a symbolic representation of the model to be #' estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the #' dependent variable and \code{x1} and \code{x2} are the explanatory #' variables, and \code{y}, \code{x1}, and \code{x2} are contained in the #' same dataset. (You may include more than two explanatory variables, #' of course.) The \code{+} symbol means ``inclusion'' not #' ``addition.'' You may also include interaction terms and main #' effects in the form \code{x1*x2} without computing them in prior #' steps; \code{I(x1*x2)} to include only the interaction term and #' exclude the main effects; and quadratic terms in the form #' \code{I(x1^2)}. #'@param model the name of a statistical model to estimate. #' For a list of other supported models and their documentation see: #' \url{http://docs.zeligproject.org/articles/}. #'@param data the name of a data frame containing the variables #' referenced in the formula or a list of multiply imputed data frames #' each having the same variable names and row numbers (created by #' \code{Amelia} or \code{\link{to_zelig_mi}}). #'@param ... additional arguments passed to \code{zelig}, #' relevant for the model to be estimated. #'@param by a factor variable contained in \code{data}. If supplied, #' \code{zelig} will subset #' the data frame based on the levels in the \code{by} variable, and #' estimate a model for each subset. This can save a considerable amount of #' effort. You may also use \code{by} to run models using MatchIt #' subclasses. #'@param cite If is set to 'TRUE' (default), the model citation will be printed #' to the console. #' #' @details #' Additional parameters avaialable to this model include: #' \itemize{ #' \item \code{weights}: vector of weight values or a name of a variable in the dataset #' by which to weight the model. For more information see: #' \url{http://docs.zeligproject.org/articles/weights.html}. #' \item \code{bootstrap}: logical or numeric. If \code{FALSE} don't use bootstraps to #' robustly estimate uncertainty around model parameters due to sampling error. #' If an integer is supplied, the number of boostraps to run. #' For more information see: #' \url{http://docs.zeligproject.org/articles/bootstraps.html}. #' } #' #' @return Depending on the class of model selected, \code{zelig} will return #' an object with elements including \code{coefficients}, \code{residuals}, #' and \code{formula} which may be summarized using #' \code{summary(z.out)} or individually extracted using, for example, #' \code{coef(z.out)}. See #' \url{http://docs.zeligproject.org/articles/getters.html} for a list of #' functions to extract model components. You can also extract whole fitted #' model objects using \code{\link{from_zelig_model}}. #'@param below (defaults to 0) The point at which the dependent variable is censored from below. If any values in the dependent variable are observed to be less than the censoring point, it is assumed that that particular observation is censored from below at the observed value. (See for a Bayesian implementation that supports both left and right censoring.) #'@param robust defaults to FALSE. If TRUE, zelig() computes robust standard errors based on sandwich estimators (see and ) and the options selected in cluster. #'@param if robust = TRUE, you may select a variable to define groups of correlated observations. Let x3 be a variable that consists of either discrete numeric values, character strings, or factors that define strata. Then #'z.out <- zelig(y ~ x1 + x2, robust = TRUE, cluster = "x3", model = "tobit", data = mydata) #'means that the observations can be correlated within the strata defined by the variable x3, and that robust standard errors should be calculated according to those clusters. If robust = TRUE but cluster is not specified, zelig() assumes that each observation falls into its own cluster. #'@param formula a model fitting formula #' #'@examples #' data(macro) #' z.out1 <- zelig(unem ~ gdp + capmob + trade, model = "normal", #' data = macro) #' summary(z.out1) #' x.high <- setx(z.out1, trade = quantile(macro$trade, 0.8)) #' x.low <- setx(z.out1, trade = quantile(macro$trade, 0.2)) #' s.out1 <- sim(z.out1, x = x.high, x1 = x.low) #' summary(s.out1) #' plot(s.out1) #' #' #'@seealso Vignette: \url{http://docs.zeligproject.org/articles/zelig_normal.html} #' @import methods #' @export Zelig-normal #' @exportClass Zelig-normal #' #' @include model-zelig.R #' @include model-glm.R znormal <- setRefClass("Zelig-normal", contains = "Zelig-glm") znormal$methods( initialize = function() { callSuper() .self$name <- "normal" .self$family <- "gaussian" .self$link <- "identity" .self$linkinv <- eval(call(.self$family, .self$link))$linkinv .self$authors <- "Kosuke Imai, Gary King, Olivia Lau" .self$year <- 2008 .self$category <- "continuous" .self$description <- "Normal Regression for Continuous Dependent Variables" # JSON .self$outcome <- "continuous" .self$wrapper <- "normal" } ) znormal$methods( param = function(z.out, method="mvn") { degrees.freedom <- z.out$df.residual sig2 <- base::summary(z.out)$dispersion # not to call class summary method simalpha <- sqrt(degrees.freedom * sig2 / rchisq(.self$num, degrees.freedom)) if(identical(method,"mvn")){ simparam.local <- mvrnorm(n = .self$num, mu = coef(z.out), Sigma = vcov(z.out)) simparam.local <- list(simparam = simparam.local, simalpha = simalpha) return(simparam.local) } else if(identical(method,"point")){ return(list(simparam = t(as.matrix(coef(z.out))), simalpha = simalpha)) } } ) znormal$methods( qi = function(simparam, mm) { theta <- matrix(simparam$simparam %*% t(mm), nrow = nrow(simparam$simparam)) ev <- theta pv <- matrix(NA, nrow = nrow(theta), ncol = ncol(theta)) for (j in 1:nrow(ev)) pv[j, ] <- rnorm(ncol(ev), mean = ev[j, ], sd = simparam$simalpha[j]) return(list(ev = ev, pv = pv)) } ) znormal$methods( mcfun = function(x, b0=0, b1=1, alpha=1, sim=TRUE){ y <- b0 + b1*x + sim * rnorm(n=length(x), sd=alpha) return(y) } ) Zelig/R/model-logit-bayes.R0000644000176200001440000001316413754260262015201 0ustar liggesusers#' Bayesian Logit Regression #' #' @param formula a symbolic representation of the model to be #' estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the #' dependent variable and \code{x1} and \code{x2} are the explanatory #' variables, and \code{y}, \code{x1}, and \code{x2} are contained in the #' same dataset. (You may include more than two explanatory variables, #' of course.) The \code{+} symbol means ``inclusion'' not #' ``addition.'' You may also include interaction terms and main #' effects in the form \code{x1*x2} without computing them in prior #' steps; \code{I(x1*x2)} to include only the interaction term and #' exclude the main effects; and quadratic terms in the form #' \code{I(x1^2)}. #' @param model the name of a statistical model to estimate. #' For a list of other supported models and their documentation see: #' \url{http://docs.zeligproject.org/articles/}. #' @param data the name of a data frame containing the variables #' referenced in the formula or a list of multiply imputed data frames #' each having the same variable names and row numbers (created by #' \code{Amelia} or \code{\link{to_zelig_mi}}). #' @param ... additional arguments passed to \code{zelig}, #' relevant for the model to be estimated. #' @param by a factor variable contained in \code{data}. If supplied, #' \code{zelig} will subset #' the data frame based on the levels in the \code{by} variable, and #' estimate a model for each subset. This can save a considerable amount of #' effort. You may also use \code{by} to run models using MatchIt #' subclasses. #' @param cite If is set to 'TRUE' (default), the model citation will be printed #' to the console. #' #' @examples #' data(turnout) #' z.out <- zelig(vote ~ race + educate, model = "logit.bayes",data = turnout, verbose = FALSE) #' #' @details #' Additional parameters avaialable to this model include: #' \itemize{ #' \item \code{weights}: vector of weight values or a name of a variable in the dataset #' by which to weight the model. For more information see: #' \url{http://docs.zeligproject.org/articles/weights.html}. #' \item \code{burnin}: number of the initial MCMC iterations to be discarded (defaults to 1,000). #' \item \code{mcmc}: number of the MCMC iterations after burnin (defaults to 10,000). #' \item \code{thin}: thinning interval for the Markov chain. Only every thin-th draw from #' the Markov chain is kept. The value of mcmc must be divisible by this value. The default #' value is 1. #' \item \code{verbose}: defaults to FALSE. If TRUE, the progress of the sampler (every 10\%) #' is printed to the screen. #' \item \code{seed}: seed for the random number generator. The default is \code{NA} which #' corresponds to a random seed of 12345. #' \item \code{beta.start}: starting values for the Markov chain, either a scalar or vector #' with length equal to the number of estimated coefficients. The default is \code{NA}, such #' that the maximum likelihood estimates are used as the starting values. #' } #' Use the following parameters to specify the model's priors: #' \itemize{ #' \item \code{b0}: prior mean for the coefficients, either a numeric vector or a #' scalar. If a scalar value, that value will be the prior mean for all the #' coefficients. The default is 0. #' \item \code{B0}: prior precision parameter for the coefficients, either a #' square matrix (with the dimensions equal to the number of the coefficients) or #' a scalar. If a scalar value, that value times an identity matrix will be the #' prior precision parameter. The default is 0, which leads to an improper prior. #' } #' Use the following arguments to specify optional output for the model: #' \itemize{ #' \item \code{bayes.resid}: defaults to FALSE. If TRUE, the latent #' Bayesian residuals for all observations are returned. Alternatively, #' users can specify a vector of observations for which the latent residuals should be returned. #' } #' @return Depending on the class of model selected, \code{zelig} will return #' an object with elements including \code{coefficients}, \code{residuals}, #' and \code{formula} which may be summarized using #' \code{summary(z.out)} or individually extracted using, for example, #' \code{coef(z.out)}. See #' \url{http://docs.zeligproject.org/articles/getters.html} for a list of #' functions to extract model components. You can also extract whole fitted #' model objects using \code{\link{from_zelig_model}}. #' #' @seealso Vignette: \url{http://docs.zeligproject.org/articles/zelig_logitbayes.html} #' @import methods #' @export Zelig-logit-bayes #' @exportClass Zelig-logit-bayes #' #' @include model-zelig.R #' @include model-bayes.R #' @include model-logit.R zlogitbayes <- setRefClass("Zelig-logit-bayes", contains = c("Zelig-bayes", "Zelig-logit")) zlogitbayes$methods( initialize = function() { callSuper() .self$name <- "logit-bayes" .self$family <- "binomial" .self$link <- "logit" .self$linkinv <- eval(call(.self$family, .self$link))$linkinv .self$year <- 2013 .self$category <- "dichotomous" .self$authors <- "Ben Goodrich, Ying Lu" .self$description = "Bayesian Logistic Regression for Dichotomous Dependent Variables" .self$fn <- quote(MCMCpack::MCMClogit) # JSON from parent .self$wrapper <- "logit.bayes" } ) zlogitbayes$methods( mcfun = function(x, b0 = 0, b1 = 1, ..., sim = TRUE){ mu <- 1/(1 + exp(-b0 - b1 * x)) if(sim) { y <- rbinom(n = length(x), size = 1, prob = mu) return(y) } else { return(mu) } } ) Zelig/R/model-probit-gee.R0000755000176200001440000001036513754260262015022 0ustar liggesusers#' Generalized Estimating Equation for Probit Regression #' @param formula a symbolic representation of the model to be #' estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the #' dependent variable and \code{x1} and \code{x2} are the explanatory #' variables, and \code{y}, \code{x1}, and \code{x2} are contained in the #' same dataset. (You may include more than two explanatory variables, #' of course.) The \code{+} symbol means ``inclusion'' not #' ``addition.'' You may also include interaction terms and main #' effects in the form \code{x1*x2} without computing them in prior #' steps; \code{I(x1*x2)} to include only the interaction term and #' exclude the main effects; and quadratic terms in the form #' \code{I(x1^2)}. #' @param model the name of a statistical model to estimate. #' For a list of other supported models and their documentation see: #' \url{http://docs.zeligproject.org/articles/}. #' @param data the name of a data frame containing the variables #' referenced in the formula or a list of multiply imputed data frames #' each having the same variable names and row numbers (created by #' \code{Amelia} or \code{\link{to_zelig_mi}}). #' @param ... additional arguments passed to \code{zelig}, #' relevant for the model to be estimated. #' @param by a factor variable contained in \code{data}. If supplied, #' \code{zelig} will subset #' the data frame based on the levels in the \code{by} variable, and #' estimate a model for each subset. This can save a considerable amount of #' effort. You may also use \code{by} to run models using MatchIt #' subclasses. #' @param cite If is set to 'TRUE' (default), the model citation will be printed #' to the console. #' @param corstr:character string specifying the correlation structure: "independence", #' "exchangeable", "ar1", "unstructured" and "userdefined" #' @param See geeglm in package geepack for other function arguments. #' @param id: where id is a variable which identifies the clusters. The data should be #' sorted by id and should be ordered within each cluster when appropriate #' @param corstr: character string specifying the correlation structure: "independence", #' "exchangeable", "ar1", "unstructured" and "userdefined" #' @param geeglm: See geeglm in package geepack for other function arguments #' #' @details #' Additional parameters avaialable to this model include: #' \itemize{ #' \item \code{weights}: vector of weight values or a name of a variable in the dataset #' by which to weight the model. For more information see: #' \url{http://docs.zeligproject.org/articles/weights.html}. #' \item \code{bootstrap}: logical or numeric. If \code{FALSE} don't use bootstraps to #' robustly estimate uncertainty around model parameters due to sampling error. #' If an integer is supplied, the number of boostraps to run. #' For more information see: #' \url{http://docs.zeligproject.org/articles/bootstraps.html}. #' } #' @return Depending on the class of model selected, \code{zelig} will return #' an object with elements including \code{coefficients}, \code{residuals}, #' and \code{formula} which may be summarized using #' \code{summary(z.out)} or individually extracted using, for example, #' \code{coef(z.out)}. See #' \url{http://docs.zeligproject.org/articles/getters.html} for a list of #' functions to extract model components. You can also extract whole fitted #' model objects using \code{\link{from_zelig_model}}. #' #'@examples #' data(turnout) #' turnout$cluster <- rep(c(1:200), 10) #' sorted.turnout <- turnout[order(turnout$cluster),] #' z.out1 <- zelig(vote ~ race + educate, model = "probit.gee", #' id = "cluster", data = sorted.turnout) #' summary(z.out1) #' #' @seealso Vignette: \url{http://docs.zeligproject.org/articles/zelig_probitgee.html} #' @import methods #' @export Zelig-probit-gee #' @exportClass Zelig-probit-gee #' #' @include model-zelig.R #' @include model-binchoice-gee.R zprobitgee <- setRefClass("Zelig-probit-gee", contains = c("Zelig-binchoice-gee")) zprobitgee$methods( initialize = function() { callSuper() .self$name <- "probit-gee" .self$link <- "probit" .self$description <- "General Estimating Equation for Probit Regression" .self$wrapper <- "probit.gee" } ) Zelig/R/model-probit.R0000755000176200001440000000653713754260262014272 0ustar liggesusers#' Probit Regression for Dichotomous Dependent Variables #' @param formula a symbolic representation of the model to be #' estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the #' dependent variable and \code{x1} and \code{x2} are the explanatory #' variables, and \code{y}, \code{x1}, and \code{x2} are contained in the #' same dataset. (You may include more than two explanatory variables, #' of course.) The \code{+} symbol means ``inclusion'' not #' ``addition.'' You may also include interaction terms and main #' effects in the form \code{x1*x2} without computing them in prior #' steps; \code{I(x1*x2)} to include only the interaction term and #' exclude the main effects; and quadratic terms in the form #' \code{I(x1^2)}. #' @param model the name of a statistical model to estimate. #' For a list of other supported models and their documentation see: #' \url{http://docs.zeligproject.org/articles/}. #' @param data the name of a data frame containing the variables #' referenced in the formula or a list of multiply imputed data frames #' each having the same variable names and row numbers (created by #' \code{Amelia} or \code{\link{to_zelig_mi}}). #' @param ... additional arguments passed to \code{zelig}, #' relevant for the model to be estimated. #' @param by a factor variable contained in \code{data}. If supplied, #' \code{zelig} will subset #' the data frame based on the levels in the \code{by} variable, and #' estimate a model for each subset. This can save a considerable amount of #' effort. You may also use \code{by} to run models using MatchIt #' subclasses. #' @param cite If is set to 'TRUE' (default), the model citation will be printed #' to the console. #' @examples #' data(turnout) #' z.out <- zelig(vote ~ race + educate, model = "probit", data = turnout) #' summary(z.out) #' x.out <- setx(z.out) #' s.out <- sim(z.out, x = x.out) #' summary(s.out) #' plot(s.out) #' #' @details #' Additional parameters avaialable to this model include: #' \itemize{ #' \item \code{weights}: vector of weight values or a name of a variable in the dataset #' by which to weight the model. For more information see: #' \url{http://docs.zeligproject.org/articles/weights.html}. #' \item \code{bootstrap}: logical or numeric. If \code{FALSE} don't use bootstraps to #' robustly estimate uncertainty around model parameters due to sampling error. #' If an integer is supplied, the number of boostraps to run. #' For more information see: #' \url{http://docs.zeligproject.org/articles/bootstraps.html}. #' } #' #' @seealso Vignette: \url{http://docs.zeligproject.org/articles/zelig_probit.html} #' @import methods #' @export Zelig-probit #' @exportClass Zelig-probit #' #' @include model-zelig.R #' @include model-glm.R #' @include model-binchoice.R zprobit <- setRefClass("Zelig-probit", contains = "Zelig-binchoice") zprobit$methods( initialize = function() { callSuper() .self$name <- "probit" .self$link <- "probit" .self$description = "Probit Regression for Dichotomous Dependent Variables" .self$packageauthors <- "R Core Team" .self$wrapper <- "probit" } ) zprobit$methods( mcfun = function(x, b0=0, b1=1, ..., sim=TRUE){ mu <- pnorm(b0 + b1 * x) if(sim){ y <- rbinom(n=length(x), size=1, prob=mu) return(y) }else{ return(mu) } } ) Zelig/R/model-zelig.R0000755000176200001440000016317213764665644014122 0ustar liggesusers#' Zelig reference class #' #' Zelig website: \url{https://zeligproject.org/} #' #' @import methods #' @export Zelig #' @exportClass Zelig #' #' @field fn R function to call to wrap #' @field formula Zelig formula #' @field weights [forthcoming] #' @field name name of the Zelig model #' @field data data frame or matrix #' @field by split the data by factors #' @field mi work with imputed dataset #' @field idx model index #' @field zelig.call Zelig function call #' @field model.call wrapped function call #' @field zelig.out estimated zelig model(s) #' @field setx.out set values #' @field setx.labels pretty-print qi #' @field bsetx is x set? #' @field bsetx1 is x1 set? #' @field bsetrange is range set? #' @field bsetrange1 is range1 set? #' @field range range #' @field range1 range1 #' @field test.statistics list of test statistics #' @field sim.out simulated qi's #' @field simparam simulated parameters #' @field num number of simulations #' @field authors Zelig model authors #' @field zeligauthors Zelig authors #' @field modelauthors wrapped model authors #' @field packageauthors wrapped package authors #' @field refs citation information #' @field year model is released #' @field description model description #' @field url model URL #' @field url.docs model documentation URL #' @field category model category #' @field vignette.url vignette URL #' @field json JSON export #' @field ljson JSON export #' @field outcome JSON export #' @field wrapper JSON export #' @field explanatory JSON export #' @field mcunit.test unit testing #' @field with.feedback Feedback #' @field robust.se return robust standard errors z <- setRefClass("Zelig", fields = list(fn = "ANY", # R function to call to wrap formula = "ANY", # Zelig formula weights = "ANY", acceptweights = "logical", name = "character", # name of the Zelig model data = "ANY", # data frame or matrix, originaldata = "ANY", # data frame or matrix, originalweights = "ANY", # ddata = "ANY", # data.by = "ANY", # data frame or matrix by = "ANY", mi = "logical", matched = "logical", avg = "ANY", idx = "ANY", # model index zelig.call = "call", # Zelig function call model.call = "call", # wrapped function call zelig.out = "ANY", # estimated zelig model(s) signif.stars = "logical", signif.stars.default = "logical", # significance stars default setx.out = "ANY", # set values setx.labels = "list", # pretty-print qi, bsetx = "logical", bsetx1 = "logical", bsetrange = "logical", bsetrange1 = "logical", range = "ANY", range1 = "ANY", setforeveryby = "logical", test.statistics = "ANY", sim.out = "list", # simulated qi's simparam = "ANY", # simulated parameters num = "numeric", # nb of simulations bootstrap = "logical", # use bootstrap bootstrap.num = "numeric", # number of bootstraps to use authors = "character", # Zelig model description zeligauthors = "character", modelauthors = "character", packageauthors = "character", refs = "ANY", # is there a way to recognize class "bibentry"?, year = "numeric", description = "character", url = "character", url.docs = "character", category = "character", vignette.url = "character", json = "ANY", # JSON export ljson = "ANY", outcome = "ANY", wrapper = "character", explanatory = "ANY", #Unit Testing mcunit.test = "ANY", mcformula = "ANY", # Feedback with.feedback = "logical", # Robust standard errors robust.se = "logical" )) z$methods( initialize = function() { .self$authors <- "Kosuke Imai, Gary King, and Olivia Lau" .self$zeligauthors <- "Christine Choirat, Christopher Gandrud, James Honaker, Kosuke Imai, Gary King, and Olivia Lau" .self$refs <- bibentry() .self$year <- as.numeric(format(Sys.Date(), "%Y")) .self$url <- "https://zeligproject.org/" .self$url.docs <- "http://docs.zeligproject.org/articles/" .self$setx.out <- list() .self$setx.labels <- list(ev = "Expected Values: E(Y|X)", ev1 = "Expected Values: E(Y|X1)", pv = "Predicted Values: Y|X", pv1 = "Predicted Values: Y|X1", fd = "First Differences: E(Y|X1) - E(Y|X)") .self$bsetx <- FALSE .self$bsetx1 <- FALSE .self$bsetrange <- FALSE .self$bsetrange1 <- FALSE .self$acceptweights <- FALSE .self$bootstrap <- FALSE .self$bootstrap.num <- 100 # JSON .self$vignette.url <- paste(.self$url.docs, tolower(class(.self)[1]), ".html", sep = "") .self$vignette.url <- sub("-gee", "gee", .self$vignette.url) .self$vignette.url <- sub("-bayes", "bayes", .self$vignette.url) # .self$vignette.url <- paste(.self$url.docs, "zelig-", sub("-", "", .self$name), ".html", sep = "") .self$category <- "undefined" .self$explanatory <- c("continuous", "discrete", "nominal", "ordinal", "binary") .self$outcome <- "" .self$wrapper <- "wrapper" # Is 'ZeligFeedback' package installed? .self$with.feedback <- "ZeligFeedback" %in% installed.packages() .self$setforeveryby <- TRUE .self$avg <- function(val) { if (is.numeric(val)) mean(val) else if (is.ordered(val)) Median(val) else Mode(val) } } ) z$methods( packagename = function() { "Automatically retrieve wrapped package name" # If this becomes "quote(mypackage::myfunction) then # regmatches(.self$fn,regexpr("(?<=\\()(.*?)(?=\\::)",.self$fn, perl=TRUE)) # would extract "mypackage" return(as.character(.self$fn)[2]) } ) z$methods( cite = function() { "Provide citation information about Zelig and Zelig model, and about wrapped package and wrapped model" title <- paste(.self$name, ": ", .self$description, sep="") localauthors <- "" if (length(.self$modelauthors) & (!identical(.self$modelauthors,""))){ # covers both empty styles: character(0) and "" --the latter being length 1. localauthors<-.self$modelauthors } else if (length(.self$packageauthors) & (!identical(.self$packageauthors,""))){ localauthors<-.self$packageauthors } else { localauthors<-.self$zeligauthors } cat("How to cite this model in Zelig:\n ", localauthors, ". ", .self$year, ".\n ", title, "\n in ", .self$zeligauthors, ",\n \"Zelig: Everyone's Statistical Software,\" ", .self$url, "\n", sep = "") } ) # Construct a reference list specific to a Zelig model # Styles available from the bibentry print method: "text", "Bibtex", "citation", "html", "latex", "R", "textVersion" # The "sphinx" style reformats "text" style with some markdown substitutions z$methods( references = function(style="sphinx") { "Construct a reference list specific to a Zelig model." mystyle <- style if (mystyle=="sphinx"){ mystyle <- "text" } mycites<-.self$refs if(!is.na(.self$packagename() )) { mycites <- c(mycites, citation(.self$packagename())) # Concatentate model specific Zelig references with package references } mycites<-mycites[!duplicated(mycites)] # Remove duplicates (many packages have duplicate references in their lists) s <- capture.output(print(mycites, style = mystyle)) if(style == "sphinx"){ # format the "text" style conventions for sphinx markdown for # building docs for zeligproject.org s<-gsub("\\*","\\*\\*",s, perl=TRUE) s<-gsub("_","\\*",s, perl=TRUE) s<-gsub("\\*\\(","\\* \\(",s, perl=TRUE) } cat(s, sep="\n") } ) #' Zelig method #' @param formula TEST z$methods( zelig = function(formula, data, model = NULL, ..., weights = NULL, by, bootstrap = FALSE) { "The zelig function estimates a variety of statistical models" fn2 <- function(fc, data) { fc$data <- data return(fc) } # Prepare data for possible transformations if ("amelia" %in% class(data)) { localdata <- data$imputations is_matched <- FALSE } else if ("matchit" %in% class(data)) { is_matched <- TRUE localdata <- MatchIt::match.data(data) iweights <- localdata$weights } else { localdata <- data is_matched <- FALSE } # Without dots for single and multiple equations temp_formula <- as.Formula(formula) if (sum(length(temp_formula)) <= 2) .self$formula <- as.Formula(terms(temp_formula, data = localdata)) else if (sum(length(temp_formula)) > 2) { f_dots <- attr(terms(temp_formula, data = localdata), "Formula_without_dot") if (!is.null(f_dots)) # .self$formula <- as.Formula(f_dots) stop('formula expansion not currently supported for formulas with multiple equations.\nPlease directly specify the variables in the formula call.', call. = FALSE) else .self$formula <- as.Formula(formula) } # Convert factors and logs converted internally to the zelig call form_factors <- transformer(.self$formula, FUN = 'factor', check = TRUE) form_logs <- transformer(.self$formula, FUN = 'log', check = TRUE) if (any(c(form_factors, form_logs))) { if (form_factors) { localformula <- transformer(formula, data = localdata, FUN = 'factor', f_out = TRUE) localdata <- transformer(formula, data = localdata, FUN = 'factor', d_out = TRUE) .self$formula <- localformula .self$data <- localdata } if (form_logs) { if (.self$name == 'ivreg') stop('logging values in the zelig call is not currently supported for ivreg models.', call. = FALSE) localformula <- transformer(formula, data = localdata, FUN = 'log', f_out = TRUE) localdata <- transformer(formula, data = localdata, FUN = 'log', d_out = TRUE) .self$formula <- localformula .self$data <- localdata } } if (!("relogit" %in% .self$wrapper)) .self$model.call$formula <- match.call(zelig, .self$formula) else if ("relogit" %in% .self$wrapper) { .self$modcall_formula_transformer() } # Overwrite formula with mc unit test formula into correct environment, if it exists # Requires fixing R scoping issue if("formula" %in% class(.self$mcformula)){ .self$formula <- as.Formula( deparse(.self$mcformula), env = environment(.self$formula) ) .self$model.call$formula <- as.Formula( deparse(.self$mcformula), env = globalenv() ) } else if(is.character(.self$mcformula)) { .self$formula <- as.Formula( .self$mcformula, env = environment(.self$formula) ) .self$model.call$formula <- as.Formula( .self$mcformula, env = globalenv() ) } if(!is.null(model)){ cat("Argument model is only valid for the Zelig wrapper, but not the Zelig method, and will be ignored.\n") flag <- !(names(.self$model.call) == "model") .self$model.call <- .self$model.call[flag] flag <- !(names(.self$zelig.call) == "model") .self$zelig.call <- .self$zelig.call[flag] } .self$by <- by .self$originaldata <- localdata .self$originalweights <- weights datareformed <- FALSE if(is.numeric(bootstrap)){ .self$bootstrap <- TRUE .self$bootstrap.num <- bootstrap } else if(is.logical(bootstrap)){ .self$bootstrap <- bootstrap } # Remove bootstrap argument from model call .self$model.call$bootstrap <- NULL # Check if bootstrap possible by checking whether param method has method argument available if(.self$bootstrap){ if(!("method" %in% names(formals(.self$param)))){ stop("The bootstrap does not appear to be implemented for this Zelig model. Check that the param() method allows point predictions.") } .self$setforeveryby <- FALSE # compute covariates in set() at the dataset-level } # Matched datasets from MatchIt if (is_matched){ .self$matched <- TRUE .self$data <- localdata datareformed <- TRUE # Check if noninteger valued weights exist and are incompatible with zelig model validweights <- TRUE if(!.self$acceptweights){ # This is a convoluted way to do this, but avoids the costly "any()" calculation if not necessary if(any(iweights != ceiling(iweights))){ # any(y != ceiling(y)) tests slightly faster than all(y == ceiling(y)) validweights <- FALSE } } if(!validweights){ # could also be if((!acceptweights) & (any(iweights != ceiling(iweights)) but avoid the long any for big datasets cat("The weights created by matching for this dataset have noninteger values,\n", "however, the statistical model you have chosen is only compatible with integer weights.\n", "Either change the matching method (such as to `optimal' matching with a 1:1 ratio)\n", "or change the statistical model in Zelig.\n", "We will round matching weights up to integers to proceed.\n\n") .self$weights <- ceiling(iweights) } else { .self$weights <- iweights } # Set references appropriate to matching methods used .self$refs <- c(.self$refs, citation("MatchIt")) if(m.out$call$method=="cem" & ("cem" %in% installed.packages())) .self$refs <- c(.self$refs, citation("cem")) #if(m.out$call$method=="exact") .self$refs <- c(.self$refs, citation("")) if((m.out$call$method=="full") & ("optmatch" %in% installed.packages())) .self$refs <- c(.self$refs, citation("optmatch")) if(m.out$call$method=="genetic" & ("Matching" %in% installed.packages())) .self$refs <- c(.self$refs, citation("Matching")) #if(m.out$call$method=="nearest") .self$refs <- c(.self$refs, citation("")) if(m.out$call$method=="optimal" & ("optmatch" %in% installed.packages())) .self$refs <- c(.self$refs, citation("optmatch")) #if(m.out$call$method=="subclass") .self$refs <- c(.self$refs, citation("")) } else { .self$matched <- FALSE } # Multiply Imputed datasets from Amelia or mi utility # Notice imputed objects ignore weights currently, # which is reasonable as the Amelia package ignores weights if (("amelia" %in% class(localdata)) | ("mi" %in% class(localdata))) { idata <- localdata .self$data <- bind_rows(lapply(seq(length(idata)), function(imputationNumber) cbind(imputationNumber, idata[[imputationNumber]]))) if (!is.null(weights)) stop('weights are currently not available with imputed data.', call. = FALSE) .self$weights <- NULL # This should be considered or addressed datareformed <- TRUE .self$by <- c("imputationNumber", by) .self$mi <- TRUE .self$setforeveryby <- FALSE # compute covariates in set() at on the entire stacked dataset .self$refs <- c(.self$refs, citation("Amelia")) if (.self$fn == "geepack::geeglm" & is.character(.self$model.call$id)) { .self$model.call$id <- subset(.self$data, imputationNumber == 1)[, .self$model.call$id] } } else { .self$mi <- FALSE } if (!datareformed){ .self$data <- localdata # If none of the above package integrations have already reformed the # data from another object, use the supplied data # Run some checking on weights argument, and see if is valid string or vector if(!is.null(weights)){ if(is.character(weights)){ if(weights %in% names(.self$data)){ .self$weights <- .self$data[[weights]] # This is a way to convert data.frame portion to type numeric (as data.frames are lists) } else { warning("Variable name given for weights not found in dataset, so will be ignored.\n\n", call. = FALSE) .self$weights <- NULL # No valid weights .self$model.call$weights <- NULL } } else if(is.vector(weights)){ if (length(weights) == nrow(.self$data) & is.vector(weights)){ localWeights <- weights # avoids CRAN warning about deep assignment from weights existing separately as argument and field if(min(localWeights) < 0) { localWeights[localWeights < 0] <- 0 warning("Negative valued weights were supplied and will be replaced with zeros.", call. = FALSE) } .self$weights <- localWeights # Weights } else { warning("Length of vector given for weights is not equal to number of observations in dataset, and will be ignored.\n\n", call. = FALSE) .self$weights <- NULL # No valid weights .self$model.call$weights <- NULL } } else { warning("Supplied weights argument is not a vector or a variable name in the dataset, and will be ignored.\n\n", call. = FALSE) .self$weights <- NULL # No valid weights .self$model.call$weights <- NULL } } else { .self$weights <- NULL # No weights set, so weights are NULL .self$model.call$weights <- NULL } } # If the Zelig model does not not accept weights, but weights are provided, we rebuild the data # by bootstrapping using the weights as probabilities # or by duplicating rows proportional to the ceiling of their weight # Otherwise we pass the weights to the model call if(!is.null(.self$weights)){ if ((!.self$acceptweights)){ .self$buildDataByWeights2() # Could use alternative method $buildDataByWeights() for duplication # approach. Maybe set as argument?\ .self$model.call$weights <- NULL } else { .self$model.call$weights <- .self$weights # NEED TO CHECK THIS IS THE NAME FOR ALL MODELS, or add more generic # field containing the name for the weights argument } } if (.self$bootstrap){ .self$buildDataByBootstrap() } .self$model.call[[1]] <- .self$fn .self$model.call$by <- NULL if (is.null(.self$by)) { .self$data <- cbind(1, .self$data) names(.self$data)[1] <- "by" .self$by <- "by" } #cat("zelig.call:\n") #print(.self$zelig.call) #cat("model.call:\n") #print(.self$model.call) .self$data <- tbl_df(.self$data) #.self$zelig.out <- eval(fn2(.self$model.call, data = data)) # shortened test version that bypasses "by" .self$zelig.out <- .self$data %>% group_by_(.self$by) %>% do(z.out = eval(fn2(.self$model.call, quote(as.data.frame(.))))) } ) z$methods( set = function(..., fn = list(numeric = mean, ordered = Median)) { "Setting Explanatory Variable Values" is_uninitializedField(.self$zelig.out) is_zeligei(.self) # Find variable transformations in formula call # coef_names <- names(rm_intercept(unlist(.self$get_coef()))) .self$avg <- function(val) { if (is.numeric(val)) ifelse(is.null(fn$numeric), mean(val), fn$numeric(val)) else if (is.ordered(val)) ifelse(is.null(fn$ordered), Median(val), fn$ordered(val)) else Mode(val) } s <- list(...) # This eliminates warning messages when factor rhs passed to lm() model in reduce() utility function if(.self$category == "multinomial"){ # Perhaps find more robust way to test if dep.var. is factor f2 <- update(.self$formula, as.numeric(.) ~ .) } else { f2 <- .self$formula } f <- update(.self$formula, 1 ~ .) # update <- na.omit(.self$data) %>% # remove missing values # compute on each slice of the dataset defined by "by" if(.self$setforeveryby){ update <- .self$data %>% group_by_(.self$by) %>% do(mm = model.matrix(f, reduce(dataset = "MEANINGLESS ARGUMENT", s, formula = f2, data = ., avg = .self$avg))) # fix in last argument from data=.self$data to data=. (JH) # compute over the entire dataset - currently used for mi and bootstrap. Should be opened up to user. } else { if(.self$bootstrap){ flag <- .self$data$bootstrapIndex == (.self$bootstrap.num + 1) # These are the original observations tempdata <- .self$data[flag,] } else { tempdata <- .self$data # presently this is for mi. And this is then the entire stacked dataset. } allreduce <- reduce(dataset = "MEANINGLESS ARGUMENT", s, formula = f2, data = tempdata, avg = .self$avg) allmm <- model.matrix(f, allreduce) update <- .self$data %>% group_by_(.self$by) %>% do(mm = allmm) } return(update) } ) z$methods( setx = function(..., fn = list(numeric = mean, ordered = Median, other = Mode)) { is_uninitializedField(.self$zelig.out) is_zeligei(.self) .self$bsetx <- TRUE .self$setx.out$x <- .self$set(..., fn = fn) } ) z$methods( setx1 = function(..., fn = list(numeric = mean, ordered = Median, other = Mode)) { .self$bsetx1 <- TRUE .self$setx.out$x1 <- .self$set(...) } ) z$methods( setrange = function(..., fn = list(numeric = mean, ordered = Median, other = Mode)) { is_uninitializedField(.self$zelig.out) .self$bsetrange <- TRUE rng <- list() s <- list(...) m <- expand_grid_setrange(s) .self$range <- m .self$setx.out$range <- list() for (i in 1:nrow(m)) { l <- as.list(as.list(m[i, ])) names(l) <- names(m) .self$setx.out$range[[i]] <- .self$set(l) } } ) z$methods( setrange1 = function(..., fn = list(numeric = mean, ordered = Median, other = Mode)) { .self$bsetrange1 <- TRUE rng <- list() s <- list(...) m <- expand_grid_setrange(s) .self$range1 <- m .self$setx.out$range1 <- list() for (i in 1:nrow(m)) { l <- as.list(as.list(m[i, ])) names(l) <- names(m) .self$setx.out$range1[[i]] <- .self$set(l) } } ) z$methods( param = function(z.out, method = "mvn") { if(identical(method,"mvn")){ return(mvrnorm(.self$num, coef(z.out), vcov(z.out))) } else if(identical(method,"point")){ return(t(as.matrix(coef(z.out)))) } else { stop("param called with method argument of undefined type.") } } ) z$methods( sim = function(num = NULL) { "Generic Method for Computing and Organizing Simulated Quantities of Interest" is_zelig(.self) is_uninitializedField(.self$zelig.out) is_zeligei(.self) ## If num is defined by user, it overrides the value stored in the .self$num field. ## If num is not defined by user, but is also not yet defined in .self$num, then it defaults to 1000. localNum <- num # avoids CRAN warning about deep assignment from num existing separately as argument and field if (length(.self$num) == 0){ if(is.null(localNum)){ localNum <- 1000 } } if(!is.null(localNum)){ .self$num <- localNum } # This was previous version, that assumed sim only called once, or only method to access/write .self$num field: #if (length(.self$num) == 0) # .self$num <- num # Divide simulations among imputed datasets if(.self$mi){ am.m <- length(.self$get_coef()) .self$num <- ceiling(.self$num/am.m) } # If bootstrapped, use distribution of estimated parameters, # otherwise use $param() method for parametric bootstrap. if (.self$bootstrap & ! .self$mi){ .self$num <- 1 .self$simparam <- .self$zelig.out %>% do(simparam = .self$param(.$z.out, method = "point")) } else { .self$simparam <- .self$zelig.out %>% do(simparam = .self$param(.$z.out)) } if (.self$bsetx) .self$simx() if (.self$bsetx1) .self$simx1() if (.self$bsetrange) .self$simrange() if (.self$bsetrange1) .self$simrange1() #if (is.null(.self$sim.out$x) & is.null(.self$sim.out$range)) if (!isTRUE(is_sims_present(.self$sim.out, fail = FALSE))) warning('No simulations drawn, likely due to insufficient inputs.', call. = FALSE) } ) z$methods( simx = function() { d <- zelig_mutate(.self$zelig.out, simparam = .self$simparam$simparam) d <- zelig_mutate(d, mm = .self$setx.out$x$mm) .self$sim.out$x <- d %>% do(qi = .self$qi(.$simparam, .$mm)) %>% do(ev = .$qi$ev, pv = .$qi$pv) } ) z$methods( simx1 = function() { d <- zelig_mutate(.self$zelig.out, simparam = .self$simparam$simparam) d <- zelig_mutate(d, mm = .self$setx.out$x1$mm) .self$sim.out$x1 <- d %>% do(qi = .self$qi(.$simparam, .$mm)) %>% do(ev = .$qi$ev, pv = .$qi$pv) d <- zelig_mutate(.self$sim.out$x1, ev0 = .self$sim.out$x$ev) d <- d %>% do(fd = .$ev - .$ev0) .self$sim.out$x1 <- zelig_mutate(.self$sim.out$x1, fd = d$fd) #JH } ) z$methods( simrange = function() { .self$sim.out$range <- list() for (i in 1:nrow(.self$range)) { d <- zelig_mutate(.self$zelig.out, simparam = .self$simparam$simparam) d <- zelig_mutate(d, mm = .self$setx.out$range[[i]]$mm) .self$sim.out$range[[i]] <- d %>% do(qi = .self$qi(.$simparam, .$mm)) %>% do(ev = .$qi$ev, pv = .$qi$pv) } } ) z$methods( simrange1 = function() { .self$sim.out$range1 <- list() for (i in 1:nrow(.self$range1)) { d <- zelig_mutate(.self$zelig.out, simparam = .self$simparam$simparam) d <- zelig_mutate(d, mm = .self$setx.out$range1[[i]]$mm) .self$sim.out$range1[[i]] <- d %>% do(qi = .self$qi(.$simparam, .$mm)) %>% do(ev = .$qi$ev, pv = .$qi$pv) } } ) z$methods( simx = function() { d <- zelig_mutate(.self$zelig.out, simparam = .self$simparam$simparam) d <- zelig_mutate(d, mm = .self$setx.out$x$mm) .self$sim.out$x <- d %>% do(qi = .self$qi(.$simparam, .$mm)) %>% do(ev = .$qi$ev, pv = .$qi$pv) } ) z$methods( ATT = function(treatment, treated = 1, quietly = TRUE, num = NULL) { "Generic Method for Computing Simulated (Sample) Average Treatment Effects on the Treated" ## Checks on user provided arguments if(!is.character(treatment)){ stop("Argument treatment should be the name of the treatment variable in the dataset.") } if(!(treatment %in% names(.self$data))){ stop(cat("Specified treatment variable", treatment, "is not in the dataset.")) } # Check treatment variable included in model. # Check treatment variable is 0 or 1 (or generalize to dichotomous). # Check argument "treated" is 0 or 1 (or generalize to values of "treatment"). # Check "ev" is available QI. # Check if multiple equation model (which will need method overwrite). ## If num is defined by user, it overrides the value stored in the .self$num field. ## If num is not defined by user, but is also not yet defined in .self$num, then it defaults to 1000. localNum <- num if (length(.self$num) == 0){ if(is.null(localNum)){ localNum <- 1000 } } if(!is.null(localNum)){ if(!identical(localNum,.self$num)){ # .self$num changed, so regenerate simparam .self$num <- localNum .self$simparam <- .self$zelig.out %>% do(simparam = .self$param(.$z.out)) } } ## Extract name of dependent variable, treated units depvar <- as.character(.self$zelig.call[[2]][2]) ## Use dplyr to cycle over all splits of dataset ## NOTE: THIS IS GOING TO USE THE SAME simparam SET FOR EVERY SPLIT .self$sim.out$TE <- .self$data %>% group_by_(.self$by) %>% do(ATT = .self$simATT(simparam = .self$simparam$simparam[[1]], data = . , depvar = depvar, treatment = treatment, treated = treated) ) # z.out = eval(fn2(.self$model.call, quote(as.data.frame(.))))) if(!quietly){ return(.self$sim.out$TE) # The $get_qi() method may generalize, otherwise, write a $getter. } } ) # Has calls to .self, so constructed as method rather than function internal to $ATT() # Function to simulate ATT z$methods( simATT = function(simparam, data, depvar, treatment, treated) { "Simulate an Average Treatment on the Treated" localData <- data # avoids CRAN warning about deep assignment from data existing separately as argument and field flag <- localData[[treatment]]==treated localData[[treatment]] <- 1-treated cf.mm <- model.matrix(.self$formula, localData) # Counterfactual model matrix cf.mm <- cf.mm[flag,] y1 <- localData[flag, depvar] y1.n <- sum(flag) ATT <- matrix(NA, nrow=y1.n, ncol= .self$num) for(i in 1:y1.n){ # Maybe $qi() generally works for all mm? Of all dimensions? If so, loop not needed. ATT[i,] <- as.numeric(y1[i,1]) - .self$qi(simparam=simparam, mm=cf.mm[i, , drop=FALSE])$ev } ATT <- apply(ATT, 2, mean) return(ATT) } ) z$methods( get_names = function() { "Return Zelig object field names" z_names <- names(as.list(.self)) return(z_names) } ) z$methods( show = function(signif.stars = FALSE, subset = NULL, bagging = FALSE) { "Display a Zelig object" is_uninitializedField(.self$zelig.out) .self$signif.stars <- signif.stars .self$signif.stars.default <- getOption("show.signif.stars") options(show.signif.stars = .self$signif.stars) if ("uninitializedField" %in% class(.self$zelig.out)) cat("Next step: Use 'zelig' method") else if (length(.self$setx.out) == 0) { ############################################################################# # Current workaround to display call as $zelig.call rather than $model.call # This is becoming a more complex workaround than revising the summary method # should improve this approach in future: for(jj in 1:length(.self$zelig.out$z.out)){ if("S4" %in% typeof(.self$zelig.out$z.out[[jj]]) ){ slot(.self$zelig.out$z.out[[jj]],"call") <- .self$zelig.call } else { if("call" %in% names(.self$zelig.out$z.out[[jj]])){ .self$zelig.out$z.out[[jj]]$call <- .self$zelig.call } else if ("call" %in% names(attributes(.self$zelig.out$z.out[[1]])) ){ attr(.self$zelig.out$z.out[[1]],"call")<- .self$zelig.call } } } ########################################################################## if((.self$mi || .self$bootstrap) & is.null(subset)){ if (.self$mi) cat("Model: Combined Imputations \n\n") else cat("Model: Combined Bootstraps \n\n") mi_combined <- combine_coef_se(.self, messages = FALSE) printCoefmat(mi_combined, P.values = TRUE, has.Pvalue = TRUE, digits = max(2, getOption("digits") - 4)) cat("\n") if (.self$mi) cat("For results from individual imputed datasets, use summary(x, subset = i:j)\n") else cat("For results from individual bootstrapped datasets, use summary(x, subset = i:j)\n") } else if ((.self$mi) & !is.null(subset)) { for(i in subset){ cat("Imputed Dataset ", i, sep = "") print(base::summary(.self$zelig.out$z.out[[i]])) } } else if ((.self$bootstrap) & !is.null(subset)) { for(i in subset){ cat("Bootstrapped Dataset ", i, sep = "") print(base::summary(.self$zelig.out$z.out[[i]])) } } else { summ <- .self$zelig.out %>% do(summ = {cat("Model: \n") if (length(.self$by) == 1) { if (.self$by == "by") { cat() } else { print(.[.self$by]) } } else { print(.[.self$by]) } if("S4" %in% typeof(.$z.out)){ # Need to change summary method here for some classes print(summary(.$z.out)) } else { print(base::summary(.$z.out)) } }) } if("gim.criteria" %in% names(.self$test.statistics)){ if(.self$test.statistics$gim.criteria){ # cat("According to the GIM-rule-of-thumb, your model probably has some type of specification error.\n", # "We suggest you run model diagnostics and seek to fix the problem.\n", # "You may also wish to run the full GIM test (which takes more time) to be sure.\n", # "See http://.... for more information.\n \n") cat("Statistical Warning: The GIM test suggests this model is misspecified\n", "(based on comparisons between classical and robust SE's; see http://j.mp/GIMtest).\n", "We suggest you run diagnostics to ascertain the cause, respecify the model\n", "and run it again.\n\n") } } if (!is_zeligei(.self, fail = FALSE)) cat("Next step: Use 'setx' method\n") } else if (length(.self$setx.out) != 0 & length(.self$sim.out) == 0) { niceprint <- function(obj, name){ if(!is.null(obj[[1]])){ cat(name, ":\n", sep = "") if (is.data.frame(obj)) screenoutput <- obj else screenoutput <- obj[[1]] attr(screenoutput,"assign") <- NULL print(screenoutput, digits = max(2, getOption("digits") - 4)) } } range_out <- function(x, which_range = 'range') { if (!is.null(x$setx.out[[which_range]])) { xvarnames <- names(as.data.frame(x$setx.out[[which_range]][[1]]$mm[[1]])) d <- length(x$setx.out[[which_range]]) num_cols <- length(x$setx.out[[which_range]][[1]]$mm[[1]] ) xmatrix <- matrix(NA, nrow = d, ncol = num_cols) for (i in 1:d){ xmatrix[i,] <- matrix(x$setx.out[[which_range]][[i]]$mm[[1]], ncol = num_cols) } xdf <- data.frame(xmatrix) names(xdf) <- xvarnames return(xdf) } } niceprint(obj=.self$setx.out$x$mm, name="setx") niceprint(obj=.self$setx.out$x1$mm, name="setx1") niceprint(obj = range_out(.self), name = "range") niceprint(obj = range_out(.self, 'range1'), name = "range1") # niceprint(obj=.self$setx.out$range[[1]]$mm, name="range") # niceprint(obj=.self$setx.out$range1[[1]]$mm, name="range1") cat("\nNext step: Use 'sim' method\n") } else { # sim.out pstat <- function(s.out, what = "sim x") { simu <- s.out %>% do(simu = {cat("\n", what, ":\n") cat(" -----\n") cat("ev\n") print(stat(.$ev, .self$num)) cat("pv\n") print(stat(.$pv, .self$num)) if (!is.null(.$fd)) { cat("fd\n") print(stat(.$fd, .self$num))} } ) } pstat(.self$sim.out$x) pstat(.self$sim.out$x1, "sim x1") if (!is.null(.self$setx.out$range)) { for (i in seq(.self$sim.out$range)) { cat("\n") print(.self$range[i, ]) cat("\n") pstat(.self$sim.out$range[[i]], "sim range") cat("\n") } } if (!is.null(.self$setx.out$range1)) { for (i in seq(.self$sim.out$range1)) { cat("\n") print(.self$range1[i, ]) cat("\n") pstat(.self$sim.out$range1[[i]], "sim range") cat("\n") } } } options(show.signif.stars = .self$signif.stars.default) } ) z$methods( graph = function(...) { "Plot the quantities of interest" is_uninitializedField(.self$zelig.out) is_sims_present(.self$sim.out) if (is_simsx(.self$sim.out, fail = FALSE)) qi.plot(.self, ...) if (is_simsrange(.self$sim.out, fail = FALSE)) ci.plot(.self, ...) } ) z$methods( summarize = function(...) { "Display a Zelig object" show(...) } ) z$methods( summarise = function(...) { "Display a Zelig object" show(...) } ) z$methods( help = function() { "Open the model vignette from https://zeligproject.org/" # vignette(class(.self)[1]) browseURL(.self$vignette.url) } ) z$methods( from_zelig_model = function() { "Extract the original fitted model object from a zelig call. Note only works for models using directly wrapped functions." is_uninitializedField(.self$zelig.out) result <- try(.self$zelig.out$z.out, silent = TRUE) if ("try-error" %in% class(result)) { stop("from_zelig_model not available for this fitted model.") } else { if (length(result) == 1) { result <- result[[1]] result <- strip_package_name(result) } else if (length(result) > 1) { if (.self$mi) { message("Returning fitted model objects for each imputed data set in a list.") } else if (.self$bootstrap) { message("Returning fitted model objects for each bootstrapped data set in a list.") } else { message("Returning fitted model objects for each subset of the data created from the 'by' argument, in a list.") } result <- lapply(result, strip_package_name) } return(result) } }) #' Method for extracting estimated coefficients from Zelig objects #' @param nonlist logical whethe to \code{unlist} the result if there are only #' one set of coefficients. Enables backwards compatibility. z$methods( get_coef = function(nonlist = FALSE) { "Get estimated model coefficients" is_uninitializedField(.self$zelig.out) result <- try(lapply(.self$zelig.out$z.out, coef), silent = TRUE) if ("try-error" %in% class(result)) stop("'coef' method' not implemented for model '", .self$name, "'") else { if (nonlist & length(result) == 1) result <- unlist(result) return(result) } } ) #' Method for extracting estimated variance covariance matrix from Zelig objects #' @param nonlist logical whethe to \code{unlist} the result if there are only #' one set of coefficients. Enables backwards compatibility. z$methods( get_vcov = function() { "Get estimated model variance-covariance matrix" is_uninitializedField(.self$zelig.out) if (length(.self$robust.se) == 0) .self$robust.se <- FALSE if (!.self$robust.se) { if ("geeglm" %in% class(.self$zelig.out$z.out[[1]])) result <- lapply(.self$zelig.out$z.out, vcov_gee) else if ("rq" %in% class(.self$zelig.out$z.out[[1]])) result <- lapply(.self$zelig.out$z.out, vcov_rq) else result <- lapply(.self$zelig.out$z.out, vcov) } else if (.self$robust.se) result <- lapply(.self$zelig.out$z.out, vcovHC, "HC1") if ("try-error" %in% class(result)) stop("'vcov' method' not implemented for model '", .self$name, "'") else return(result) } ) #' Method for extracting p-values from Zelig objects #' @param object an object of class Zelig z$methods( get_pvalue = function() { "Get estimated model p-values" is_uninitializedField(.self$zelig.out) result <- try(lapply(.self$zelig.out$z.out, p_pull), silent = TRUE) if ("try-error" %in% class(result)) stop("'get_pvalue' method' not implemented for model '", .self$name, "'") else return(result) } ) #' Method for extracting standard errors from Zelig objects #' @param object an object of class Zelig z$methods( get_se = function() { "Get estimated model standard errors" is_uninitializedField(.self$zelig.out) result <- try(lapply(.self$zelig.out$z.out, se_pull), silent = TRUE) if ("try-error" %in% class(result)) stop("'get_se' method' not implemented for model '", .self$name, "'") else return(result) } ) z$methods( get_residuals = function(...) { "Get estimated model residuals" is_uninitializedField(.self$zelig.out) result <- try(lapply(.self$zelig.out$z.out, residuals, ...), silent = TRUE) if ("try-error" %in% class(result)) stop("'residuals' method' not implemented for model '", .self$name, "'") else return(result) } ) z$methods( get_df_residual = function() { "Get residual degrees-of-freedom" is_uninitializedField(.self$zelig.out) result <- try(lapply(.self$zelig.out$z.out, df.residual), silent = TRUE) if ("try-error" %in% class(result)) stop("'df.residual' method' not implemented for model '", .self$name, "'") else return(result) } ) z$methods( get_fitted = function(...) { "Get estimated fitted values" is_uninitializedField(.self$zelig.out) result <- lapply(.self$zelig.out$z.out, fitted, ...) if ("try-error" %in% class(result)) stop("'predict' method' not implemented for model '", .self$name, "'") else return(result) } ) z$methods( get_predict = function(...) { "Get predicted values" is_uninitializedField(.self$zelig.out) result <- lapply(.self$zelig.out$z.out, predict, ...) if ("try-error" %in% class(result)) stop("'predict' method' not implemented for model '", .self$name, "'") else return(result) } ) z$methods( get_qi = function(qi = "ev", xvalue = "x", subset = NULL) { "Get quantities of interest" is_sims_present(.self$sim.out) possiblexvalues <- names(.self$sim.out) if(!(xvalue %in% possiblexvalues)){ stop(paste("xvalue must be ", paste(possiblexvalues, collapse = " or ") , ".", sep = "")) } possibleqivalues <- c(names(.self$sim.out[[xvalue]]), names(.self$sim.out[[xvalue]][[1]])) if(!(qi %in% possibleqivalues)){ stop(paste("qi must be ", paste(possibleqivalues, collapse=" or ") , ".", sep = "")) } if(.self$mi){ if(is.null(subset)){ am.m <- length(.self$get_coef()) subset <- 1:am.m } tempqi <- do.call(rbind, .self$sim.out[[xvalue]][[qi]][subset]) } else if(.self$bootstrap){ if(is.null(subset)){ subset <- 1:.self$bootstrap.num } tempqi <- do.call(rbind, .self$sim.out[[xvalue]][[qi]][subset]) } else if(xvalue %in% c("range", "range1")) { tempqi <- do.call(rbind, .self$sim.out[[xvalue]])[[qi]] } else { tempqi<- .self$sim.out[[xvalue]][[qi]][[1]] # also works: tempqi <- do.call(rbind, .self$sim.out[[xvalue]][[qi]]) } return(tempqi) } ) z$methods( get_model_data = function() { "Get data used to estimate the model" is_uninitializedField(.self$zelig.out) model_data <- .self$originaldata return(model_data) } ) z$methods( toJSON = function() { "Convert Zelig object to JSON format" if (!is.list(.self$json)) .self$json <- list() .self$json$"name" <- .self$name .self$json$"description" <- .self$description .self$json$"outcome" <- list(modelingType = .self$outcome) .self$json$"explanatory" <- list(modelingType = .self$explanatory) .self$json$"vignette.url" <- .self$vignette.url .self$json$"wrapper" <- .self$wrapper tree <- c(class(.self)[1], .self$.refClassDef@refSuperClasses) .self$json$tree <- head(tree, match("Zelig", tree) - 1) .self$ljson <- .self$json .self$json <- jsonlite::toJSON(json, pretty = TRUE) return(.self$json) } ) # empty default data generating process to avoid error if not created as model specific method z$methods( mcfun = function(x, ...){ return( rep(1,length(x)) ) } ) # Monte Carlo unit test z$methods( mcunit = function(nsim = 500, minx = -2, maxx = 2, b0 = 0, b1 = 1, alpha = 1, ci = 0.95, plot = TRUE, ...){ passes <- TRUE n.short <- 10 # number of p alpha.ci <- 1 - ci # alpha values for ci bounds, not speed parameter if (.self$name %in% "ivreg") { z.sim <- runif(n = nsim, min = minx, max = maxx) z.seq <- seq(from = minx, to = maxx, length = nsim) h.sim <- runif(n = nsim, min = minx, max = maxx) h.seq <- seq(from = minx, to = maxx, length = nsim) } else { x.sim <- runif(n = nsim, min = minx, max = maxx) x.seq <- seq(from = minx, to = maxx, length = nsim) } if (.self$name %in% "ivreg") { data.hat <- .self$mcfun(z = z.seq, h = h.seq, b0 = b0, b1 = b1, alpha = alpha, ..., sim = FALSE) x.seq <- unlist(data.hat[2]) data.hat <- unlist(data.hat[1]) } else data.hat <- .self$mcfun(x = x.seq, b0 = b0, b1 = b1, alpha = alpha, ..., sim = FALSE) if(!is.data.frame(data.hat)){ if (.self$name %in% "ivreg") { data.hat <- data.frame(x.seq = x.seq, z.seq = z.seq, h.seq = h.seq, y.hat = data.hat) } else data.hat <- data.frame(x.seq = x.seq, y.hat = data.hat) } if (.self$name %in% "ivreg") { data.sim <- .self$mcfun(z = z.sim, h = h.sim, b0 = b0, b1 = b1, alpha = alpha, ..., sim = TRUE) x.sim <- unlist(data.hat[2]) data.sim <- unlist(data.hat[1]) } else data.sim <- .self$mcfun(x = x.sim, b0 = b0, b1 = b1, alpha = alpha, ..., sim = TRUE) if(!is.data.frame(data.sim)){ if (.self$name %in% "ivreg") { data.sim <- data.frame(x.sim = x.sim, z.sim = z.sim, h.sim = h.sim, y.sim = data.sim) } else data.sim <- data.frame(x.sim = x.sim, y.sim = data.sim) } ## Estimate Zelig model and create numerical bounds on expected values # This should be the solution, but requires fixing R scoping issue: #.self$zelig(y.sim~x.sim, data=data.sim) # formula will be overwritten in zelig() if .self$mcformula has been set ## Instead, remove formula field and set by hard code .self$mcformula <- NULL if(.self$name %in% c("exp", "weibull", "lognorm")){ .self$zelig(Surv(y.sim, event) ~ x.sim, data = data.sim) } else if (.self$name %in% c("relogit")) { tau <- sum(data.sim$y.sim)/nsim .self$zelig(y.sim ~ x.sim, tau = tau, data = data.sim) } else if (.self$name %in% "ivreg") { .self$zelig(y.sim ~ x.sim | z.sim + h.sim, data = data.sim) } else { .self$zelig(y.sim ~ x.sim, data = data.sim) } x.short.seq <- seq(from = minx, to = maxx, length = n.short) .self$setrange(x.sim = x.short.seq) .self$sim() if (.self$name %in% c("relogit")) { data.short.hat <- .self$mcfun(x = x.short.seq, b0 = b0, b1 = b1, alpha = alpha, keepall = TRUE, ..., sim = FALSE) } else { data.short.hat <- .self$mcfun(x = x.short.seq, b0 = b0, b1 = b1, alpha = alpha, ..., sim = FALSE) } if(!is.data.frame(data.short.hat)){ data.short.hat <- data.frame(x.seq = x.short.seq, y.hat = data.short.hat) } history.ev <- history.pv <- matrix(NA, nrow = n.short, ncol = 2) for(i in 1:n.short){ xtemp <- x.short.seq[i] .self$setx(x.sim = xtemp) .self$sim() #temp<-sort( .self$sim.out$x$ev[[1]] ) temp <- .self$sim.out$range[[i]]$ev[[1]] # This is for ev's that are a probability distribution across outcomes, like ordered logit/probit if(ncol(temp) > 1){ temp <- temp %*% as.numeric(sort(unique(data.sim$y.sim))) #as.numeric(colnames(temp)) } temp <- sort(temp) # calculate bounds of expected values history.ev[i,1] <- temp[max(round(length(temp)*(alpha.ci/2)),1) ] # Lower ci bound history.ev[i,2] <- temp[round(length(temp)*(1 - (alpha.ci/2)))] # Upper ci bound #temp<-sort( .self$sim.out$x$pv[[1]] ) temp <- sort( .self$sim.out$range[[i]]$pv[[1]] ) # check that ci contains true value passes <- passes & (min(history.ev[i,]) <= data.short.hat$y.hat[i] ) & (max(history.ev[i,]) >= data.short.hat$y.hat[i] ) #calculate bounds of predicted values history.pv[i,1] <- temp[max(round(length(temp)*(alpha.ci/2)),1) ] # Lower ci bound history.pv[i,2] <- temp[round(length(temp)*(1 - (alpha.ci/2)))] # Upper ci bound } ## Plot Monte Carlo Data if(plot){ all.main = substitute( paste(modelname, "(", beta[0], "=", b0, ", ", beta[1], "=", b1,",", alpha, "=", a0, ")"), list(modelname = .self$name, b0 = b0, b1=b1, a0 = alpha) ) all.ylim<-c( min(c(data.sim$y.sim, data.hat$y.hat)) , max(c(data.sim$y.sim, data.hat$y.hat)) ) plot(data.sim$x.sim, data.sim$y.sim, main=all.main, ylim=all.ylim, xlab="x", ylab="y", col="steelblue") par(new=TRUE) plot(data.hat$x.seq, data.hat$y.hat, main="", ylim=all.ylim, xlab="", ylab="", xaxt="n", yaxt="n", type="l", col="green", lwd=2) for(i in 1:n.short){ lines(x=rep(x.short.seq[i],2), y=c(history.pv[i,1],history.pv[i,2]), col="lightpink", lwd=1.6) lines(x=rep(x.short.seq[i],2), y=c(history.ev[i,1],history.ev[i,2]), col="firebrick", lwd=1.6) } } return(passes) } ) # rebuild dataset by duplicating observations by (rounded) weights z$methods( buildDataByWeights = function() { if(!.self$acceptweights){ idata <- .self$data iweights <- .self$weights ceilweights <- ceiling(iweights) n.obs <- nrow(idata) windex <- rep(1:n.obs, ceilweights) idata <- idata[windex,] .self$data <- idata if(any(iweights != ceiling(iweights))){ cat("Noninteger weights were set, but the model in Zelig is only able to use integer valued weights.\n", "Each weight has been rounded up to the nearest integer.\n\n") } } } ) # rebuild dataset by bootstrapping using weights as probabilities z$methods( buildDataByWeights2 = function() { if(!.self$acceptweights){ iweights <- .self$weights if(any(iweights != ceiling(iweights))){ cat("Noninteger weights were set, but the model in Zelig is only able to use integer valued weights.\n", "A bootstrapped version of the dataset was constructed using the weights as sample probabilities.\n\n") idata <- .self$data n.obs <- nrow(idata) n.w <- sum(iweights) iweights <- iweights/n.w windex <- sample(x=1:n.obs, size=n.w, replace=TRUE, prob=iweights) # Should size be n.w or n.obs? Relatedly, n.w might not be integer. idata <- idata[windex,] .self$data <- idata }else{ .self$buildDataByWeights() # If all weights are integers, just use duplication to rebuild dataset. } } } ) # rebuild dataset by bootstrapping using weights as probabilities # might possibly combine this method with $buildDataByWeights2() z$methods( buildDataByBootstrap = function() { idata <- .self$data n.boot <- .self$bootstrap.num n.obs <- nrow(idata) if(!is.null(.self$weights)){ iweights <- .self$weights n.w <- sum(iweights) iweights <- iweights/n.w } else { iweights <- NULL } windex <- bootstrapIndex <- NULL for(i in 1:n.boot) { windex <- c(windex, sample(x=1:n.obs, size=n.obs, replace = TRUE, prob = iweights)) bootstrapIndex <- c(bootstrapIndex, rep(i,n.obs)) } # Last dataset is original data idata <- rbind(idata[windex,], idata) bootstrapIndex <- c(bootstrapIndex, rep(n.boot+1,n.obs)) idata$bootstrapIndex <- bootstrapIndex .self$data <- idata .self$by <- c("bootstrapIndex", .self$by) } ) z$methods( feedback = function() { "Send feedback to the Zelig team" if (!.self$with.feedback) return("ZeligFeedback package not installed") # If ZeligFeedback is installed print("ZeligFeedback package installed") print(ZeligFeedback::feedback(.self)) } ) # z$methods( # finalize = function() { # if (!.self$with.feedback) # return("ZeligFeedback package not installed") # # If ZeligFeedback is installed # print("Thanks for providing Zelig usage information") # # print(ZeligFeedback::feedback(.self)) # write(paste("feedback", ZeligFeedback::feedback(.self)), # file = paste0("test-zelig-finalize-", date(), ".txt")) # } # ) #' Summary method for Zelig objects #' @param object An Object of Class Zelig #' @param ... Additional parameters to be passed to summary setMethod("summary", "Zelig", function(object, ...) { object$summarize(...) } ) #' Plot method for Zelig objects #' @param x An Object of Class Zelig #' @param y unused #' @param ... Additional parameters to be passed to plot setMethod("plot", "Zelig", function(x, ...) { x$graph(...) } ) #' Names method for Zelig objects #' @param x An Object of Class Zelig setMethod("names", "Zelig", function(x) { x$get_names() } ) setGeneric("vcov") #' Variance-covariance method for Zelig objects #' @param object An Object of Class Zelig setMethod("vcov", "Zelig", function(object) { object$get_vcov() } ) #' Method for extracting estimated coefficients from Zelig objects #' @param object An Object of Class Zelig setMethod("coefficients", "Zelig", function(object) { object$get_coef(nonlist = TRUE) } ) setGeneric("coef") #' Method for extracting estimated coefficients from Zelig objects #' @param object An Object of Class Zelig setMethod("coef", "Zelig", function(object) { object$get_coef(nonlist = TRUE) } ) #' Method for extracting residuals from Zelig objects #' @param object An Object of Class Zelig setMethod("residuals", "Zelig", function(object) { object$get_residuals() } ) #' Method for extracting residual degrees-of-freedom from Zelig objects #' @param object An Object of Class Zelig setMethod("df.residual", "Zelig", function(object) { object$get_df_residual() } ) setGeneric("fitted") #' Method for extracting estimated fitted values from Zelig objects #' @param object An Object of Class Zelig #' @param ... Additional parameters to be passed to fitted setMethod("fitted", "Zelig", function(object, ...) { object$get_fitted(...) } ) setGeneric("predict") #' Method for getting predicted values from Zelig objects #' @param object An Object of Class Zelig #' @param ... Additional parameters to be passed to predict setMethod("predict", "Zelig", function(object, ...) { object$get_predict(...) } ) Zelig/R/model-normal-gee.R0000755000176200001440000001173313754260262015013 0ustar liggesusers#' Generalized Estimating Equation for Normal Regression #' #'@param formula a symbolic representation of the model to be #' estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the #' dependent variable and \code{x1} and \code{x2} are the explanatory #' variables, and \code{y}, \code{x1}, and \code{x2} are contained in the #' same dataset. (You may include more than two explanatory variables, #' of course.) The \code{+} symbol means ``inclusion'' not #' ``addition.'' You may also include interaction terms and main #' effects in the form \code{x1*x2} without computing them in prior #' steps; \code{I(x1*x2)} to include only the interaction term and #' exclude the main effects; and quadratic terms in the form #' \code{I(x1^2)}. #'@param model the name of a statistical model to estimate. #' For a list of other supported models and their documentation see: #' \url{http://docs.zeligproject.org/articles/}. #'@param data the name of a data frame containing the variables #' referenced in the formula or a list of multiply imputed data frames #' each having the same variable names and row numbers (created by #' \code{Amelia} or \code{\link{to_zelig_mi}}). #'@param ... additional arguments passed to \code{zelig}, #' relevant for the model to be estimated. #'@param by a factor variable contained in \code{data}. If supplied, #' \code{zelig} will subset #' the data frame based on the levels in the \code{by} variable, and #' estimate a model for each subset. This can save a considerable amount of #' effort. You may also use \code{by} to run models using MatchIt #' subclasses. #'@param cite If is set to 'TRUE' (default), the model citation will be printed #' to the console. #' @param robust defaults to TRUE. If TRUE, consistent standard errors are estimated using a "sandwich" #' estimator. #'@param corstr defaults to "independence". It can take on the following arguments: #'@param Independence (corstr = independence): cor(yit,yit')=0, for all t,t' with t not equal to t'. #' It assumes that there is no correlation within the clusters and the model becomes equivalent #' to standard normal regression. The "working" correlation matrix is the identity matrix. #'@param Fixed corstr = fixed): If selected, the user must define the "working" correlation #'matrix with the R argument rather than estimating it from the model. #'@param id: where id is a variable which identifies the clusters. The data should be sorted by #'id and should be ordered within each cluster when appropriate #'@param corstr: character string specifying the correlation structure: "independence", #'"exchangeable", "ar1", "unstructured" and "userdefined" #'@param geeglm: See geeglm in package geepack for other function arguments #'@param Mv: defaults to 1. It specifies the number of periods of correlation and #' only needs to be specified when \code{corstr} is stat_M_dep, non_stat_M_dep, or AR-M. #'@param R: defaults to NULL. It specifies a user-defined correlation matrix rather than #' estimating it from the data. The argument is used only when corstr is "fixed". The input is a TxT #' matrix of correlations, where T is the size of the largest cluster. #' @details #' Additional parameters avaialable to this model include: #' \itemize{ #' \item \code{weights}: vector of weight values or a name of a variable in the dataset #' by which to weight the model. For more information see: #' \url{http://docs.zeligproject.org/articles/weights.html}. #' } #' @return Depending on the class of model selected, \code{zelig} will return #' an object with elements including \code{coefficients}, \code{residuals}, #' and \code{formula} which may be summarized using #' \code{summary(z.out)} or individually extracted using, for example, #' \code{coef(z.out)}. See #' \url{http://docs.zeligproject.org/articles/getters.html} for a list of #' functions to extract model components. You can also extract whole fitted #' model objects using \code{\link{from_zelig_model}}. #' #' @examples #' library(Zelig) #' data(macro) #' z.out <- zelig(unem ~ gdp + capmob + trade, model ="normal.gee", id = "country", #' data = macro, corstr = "AR-M") #' summary(z.out) #' @seealso Vignette: \url{http://docs.zeligproject.org/articles/zelig_normalgee.html} #' @import methods #' @export Zelig-normal-gee #' @exportClass Zelig-normal-gee #' #' @include model-zelig.R #' @include model-gee.R #' @include model-normal.R znormalgee <- setRefClass("Zelig-normal-gee", contains = c("Zelig-gee", "Zelig-normal")) znormalgee$methods( initialize = function() { callSuper() .self$name <- "normal-gee" .self$family <- "gaussian" .self$link <- "identity" .self$linkinv <- eval(call(.self$family, .self$link))$linkinv .self$year <- 2011 .self$category <- "continuous" .self$authors <- "Patrick Lam" .self$description = "General Estimating Equation for Normal Regression" .self$fn <- quote(geepack::geeglm) # JSON from parent .self$wrapper <- "normal.gee" } ) Zelig/R/model-logit-survey.R0000755000176200001440000001230413754260262015431 0ustar liggesusers#' Logit Regression with Survey Weights #'@param formula a symbolic representation of the model to be #' estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the #' dependent variable and \code{x1} and \code{x2} are the explanatory #' variables, and \code{y}, \code{x1}, and \code{x2} are contained in the #' same dataset. (You may include more than two explanatory variables, #' of course.) The \code{+} symbol means ``inclusion'' not #' ``addition.'' You may also include interaction terms and main #' effects in the form \code{x1*x2} without computing them in prior #' steps; \code{I(x1*x2)} to include only the interaction term and #' exclude the main effects; and quadratic terms in the form #' \code{I(x1^2)}. #'@param model the name of a statistical model to estimate. #' For a list of other supported models and their documentation see: #' \url{http://docs.zeligproject.org/articles/}. #'@param data the name of a data frame containing the variables #' referenced in the formula or a list of multiply imputed data frames #' each having the same variable names and row numbers (created by #' \code{Amelia} or \code{\link{to_zelig_mi}}). #'@param ... additional arguments passed to \code{zelig}, #' relevant for the model to be estimated. #'@param by a factor variable contained in \code{data}. If supplied, #' \code{zelig} will subset #' the data frame based on the levels in the \code{by} variable, and #' estimate a model for each subset. This can save a considerable amount of #' effort. You may also use \code{by} to run models using MatchIt #' subclasses. #'@param cite If is set to 'TRUE' (default), the model citation will be printed #' to the console. #' #' @details #' Additional parameters avaialable to this model include: #' \itemize{ #' \item weights: vector of weight values or a name of a variable in the dataset #' by which to weight the model. For more information see: #' \url{http://docs.zeligproject.org/articles/weights.html}. #' \item bootstrap: logical or numeric. If \code{FALSE} don't use bootstraps to #' robustly estimate uncertainty around model parameters due to sampling error. #' If an integer is supplied, the number of boostraps to run. #' For more information see: #' \url{http://docs.zeligproject.org/articles/bootstraps.html}. #' } #' #' @return Depending on the class of model selected, \code{zelig} will return #' an object with elements including \code{coefficients}, \code{residuals}, #' and \code{formula} which may be summarized using #' \code{summary(z.out)} or individually extracted using, for example, #' \code{coef(z.out)}. See #' \url{http://docs.zeligproject.org/articles/getters.html} for a list of #' functions to extract model components. You can also extract whole fitted #' model objects using \code{\link{from_zelig_model}}. #' #'@param below (defaults to 0) The point at which the dependent variable is censored from below. If any values in the dependent variable are observed to be less than the censoring point, it is assumed that that particular observation is censored from below at the observed value. (See for a Bayesian implementation that supports both left and right censoring.) #'@param robust defaults to FALSE. If TRUE, zelig() computes robust standard errors based on sandwich estimators (see and ) and the options selected in cluster. #'@param if robust = TRUE, you may select a variable to define groups of correlated observations. Let x3 be a variable that consists of either discrete numeric values, character strings, or factors that define strata. Then #' z.out <- zelig(y ~ x1 + x2, robust = TRUE, cluster = "x3", model = "tobit", data = mydata) #' means that the observations can be correlated within the strata defined by the variable x3, and that robust standard errors should be calculated according to those clusters. If robust = TRUE but cluster is not specified, zelig() assumes that each observation falls into its own cluster. #' #'@examples #' #' data(api, package = "survey") #' apistrat$yr.rnd.numeric <- as.numeric(apistrat$yr.rnd == "Yes") #' z.out1 <- zelig(yr.rnd.numeric ~ meals + mobility, model = "logit.survey", #' weights = apistrat$pw, data = apistrat) #' #' summary(z.out1) #' x.low <- setx(z.out1, meals= quantile(apistrat$meals, 0.2)) #' x.high <- setx(z.out1, meals= quantile(apistrat$meals, 0.8)) #' s.out1 <- sim(z.out1, x = x.low, x1 = x.high) #' summary(s.out1) #' plot(s.out1) #' #' @seealso Vignette: \url{http://docs.zeligproject.org/articles/zelig_logitsurvey.html} #' @import methods #' @export Zelig-logit-survey #' @exportClass Zelig-logit-survey #' #' @include model-zelig.R #' @include model-binchoice-survey.R zlogitsurvey <- setRefClass("Zelig-logit-survey", contains = c("Zelig-binchoice-survey")) zlogitsurvey$methods( initialize = function() { callSuper() .self$name <- "logit-survey" .self$link <- "logit" .self$description <- "Logistic Regression with Survey Weights" .self$wrapper <- "logit.survey" } ) zlogitsurvey$methods( mcfun = function(x, b0=0, b1=1, ..., sim=TRUE){ mu <- 1/(1 + exp(-b0 - b1 * x)) if(sim){ y <- rbinom(n=length(x), size=1, prob=mu) return(y) }else{ return(mu) } } ) Zelig/R/model-bayes.R0000644000176200001440000001035113754260262014060 0ustar liggesusers#' Bayes Model object for inheritance across models in Zelig #' #' @import methods #' @export Zelig-bayes #' @exportClass Zelig-bayes #' #' @include model-zelig.R zbayes <- setRefClass("Zelig-bayes", contains = "Zelig") zbayes$methods( initialize = function() { callSuper() .self$packageauthors <- "Andrew D. Martin, Kevin M. Quinn, and Jong Hee Park" .self$modelauthors <- "Ben Goodrich, and Ying Lu" } ) zbayes$methods( zelig = function(formula, burnin = 1000, mcmc = 10000, verbose = 0, ..., data, by = NULL, bootstrap = FALSE) { if(!identical(bootstrap,FALSE)){ stop("Error: The bootstrap is not available for Markov chain Monte Carlo (MCMC) models.") } .self$zelig.call <- match.call(expand.dots = TRUE) .self$model.call <- .self$zelig.call if (missing(verbose)) verbose <- round((mcmc + burnin) / 10) # .self$model.call$family <- call(.self$family, .self$link) .self$model.call$verbose <- verbose .self$num <- mcmc # CC: check callSuper(formula = formula, data = data, ..., by = by, bootstrap = FALSE) } ) zbayes$methods( param = function(z.out) { return(z.out) } ) zbayes$methods( get_coef = function() { "Get estimated model coefficients" return(.self$zelig.out$z.out[[1]]) } ) zbayes$methods( geweke.diag = function() { diag <- lapply(.self$zelig.out$z.out, coda::geweke.diag) # Collapse if only one list element for prettier printing if(length(diag)==1){ diag<-diag[[1]] } if(!citation("coda") %in% .self$refs){ .self$refs<-c(.self$refs,citation("coda")) } ref1<-bibentry( bibtype="InCollection", title = "Evaluating the accuracy of sampling-based approaches to calculating posterior moments.", booktitle = "Bayesian Statistics 4", author = person("John", "Geweke"), year = 1992, publisher = "Clarendon Press", address = "Oxford, UK", editor = c(person("JM", "Bernado"), person("JO", "Berger"), person("AP", "Dawid"), person("AFM", "Smith")) ) .self$refs<-c(.self$refs,ref1) return(diag) } ) zbayes$methods( heidel.diag = function() { diag <- lapply(.self$zelig.out$z.out, coda::heidel.diag) # Collapse if only one list element for prettier printing if(length(diag)==1){ diag<-diag[[1]] } if(!citation("coda") %in% .self$refs){ .self$refs<-c(.self$refs,citation("coda")) } ref1<-bibentry( bibtype="Article", title = "Simulation run length control in the presence of an initial transient.", author = c(person("P", "Heidelberger"), person("PD", "Welch")), journal = "Operations Research", volume = 31, year = 1983, pages = "1109--44") .self$refs<-c(.self$refs,ref1) return(diag) } ) zbayes$methods( raftery.diag = function() { diag <- lapply(.self$zelig.out$z.out, coda::raftery.diag) # Collapse if only one list element for prettier printing if(length(diag)==1){ diag<-diag[[1]] } if(!citation("coda") %in% .self$refs){ .self$refs<-c(.self$refs,citation("coda")) } ref1<-bibentry( bibtype="Article", title = "One long run with diagnostics: Implementation strategies for Markov chain Monte Carlo.", author = c(person("Adrian E", "Raftery"), person("Steven M", "Lewis")), journal = "Statistical Science", volume = 31, year = 1992, pages = "1109--44") ref2<-bibentry( bibtype="InCollection", title = "The number of iterations, convergence diagnostics and generic Metropolis algorithms.", booktitle = "Practical Markov Chain Monte Carlo", author = c(person("Adrian E", "Raftery"), person("Steven M", "Lewis")), year = 1995, publisher = "Chapman and Hall", address = "London, UK", editor = c(person("WR", "Gilks"), person("DJ", "Spiegelhalter"), person("S", "Richardson")) ) .self$refs<-c(.self$refs,ref1,ref2) return(diag) } ) Zelig/R/model-mlogit-bayes.R0000644000176200001440000001552113754260262015355 0ustar liggesusers#' Bayesian Multinomial Logistic Regression #' #' @param formula a symbolic representation of the model to be #' estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the #' dependent variable and \code{x1} and \code{x2} are the explanatory #' variables, and \code{y}, \code{x1}, and \code{x2} are contained in the #' same dataset. (You may include more than two explanatory variables, #' of course.) The \code{+} symbol means ``inclusion'' not #' ``addition.'' You may also include interaction terms and main #' effects in the form \code{x1*x2} without computing them in prior #' steps; \code{I(x1*x2)} to include only the interaction term and #' exclude the main effects; and quadratic terms in the form #' \code{I(x1^2)}. #' @param model the name of a statistical model to estimate. #' For a list of other supported models and their documentation see: #' \url{http://docs.zeligproject.org/articles/}. #' @param data the name of a data frame containing the variables #' referenced in the formula or a list of multiply imputed data frames #' each having the same variable names and row numbers (created by #' \code{Amelia} or \code{\link{to_zelig_mi}}). #' @param ... additional arguments passed to \code{zelig}, #' relevant for the model to be estimated. #' @param by a factor variable contained in \code{data}. If supplied, #' \code{zelig} will subset #' the data frame based on the levels in the \code{by} variable, and #' estimate a model for each subset. This can save a considerable amount of #' effort. You may also use \code{by} to run models using MatchIt #' subclasses. #' @param cite If is set to 'TRUE' (default), the model citation will be printed #' to the console. #' @examples #' data(mexico) #' z.out <- zelig(vote88 ~ pristr + othcok + othsocok,model = "mlogit.bayes", #' data = mexico,verbose = FALSE) #' #' @details #' zelig() accepts the following arguments for mlogit.bayes: #' \itemize{ #' \item \code{baseline}: either a character string or numeric value (equal to #' one of the observed values in the dependent variable) specifying a baseline category. #' The default value is NA which sets the baseline to the first alphabetical or #' numerical unique value of the dependent variable. #' } #' Additional parameters avaialable to this model include: #' \itemize{ #' \item \code{weights}: vector of weight values or a name of a variable in the dataset #' by which to weight the model. For more information see: #' \url{http://docs.zeligproject.org/articles/weights.html}. #' \item \code{burnin}: number of the initial MCMC iterations to be discarded (defaults to 1,000). #' \item \code{mcmc}: number of the MCMC iterations after burnin (defaults to 10,000). #' \item \code{mcmc.method}: either "MH" or "slice", specifying whether to use Metropolis Algorithm #' or slice sampler. The default value is MH. #' \item \code{thin}: thinning interval for the Markov chain. Only every thin-th draw from the Markov #' chain is kept. The value of mcmc must be divisible by this value. The default value is 1. #' \item \code{tune}: tuning parameter for the Metropolis-Hasting step, either a scalar or a numeric #' vector (for kk coefficients, enter a kk vector). The tuning parameter should be set such #' that the acceptance rate is satisfactory (between 0.2 and 0.5). The default value is 1.1. #' \item \code{verbose}: defaults to FALSE. If TRUE, the progress of the sampler (every 10\%) is #' printed to the screen. #' \item \code{seed}: seed for the random number generator. The default is \code{NA} which corresponds #' to a random seed of 12345. #' \item \code{beta.start}: starting values for the Markov chain, either a scalar or vector with #' length equal to the number of estimated coefficients. The default is \code{NA}, such #' that the maximum likelihood estimates are used as the starting values. #' } #' Use the following parameters to specify the model's priors: #' \itemize{ #' \item \code{b0}: prior mean for the coefficients, either a numeric vector or a scalar. #' If a scalar value, that value will be the prior mean for all the coefficients. #' The default is 0. #' \item \code{B0}: prior precision parameter for the coefficients, either a square #' matrix (with the dimensions equal to the number of the coefficients) or a scalar. #' If a scalar value, that value times an identity matrix will be the prior precision #' parameter. The default is 0, which leads to an improper prior. #' } #' @return Depending on the class of model selected, \code{zelig} will return #' an object with elements including \code{coefficients}, \code{residuals}, #' and \code{formula} which may be summarized using #' \code{summary(z.out)} or individually extracted using, for example, #' \code{coef(z.out)}. See #' \url{http://docs.zeligproject.org/articles/getters.html} for a list of #' functions to extract model components. You can also extract whole fitted #' model objects using \code{\link{from_zelig_model}}. #' #' @seealso Vignette: \url{http://docs.zeligproject.org/articles/zelig_mlogitbayes.html} #' @import methods #' @export Zelig-mlogit-bayes #' @exportClass Zelig-mlogit-bayes #' #' @include model-zelig.R #' @include model-bayes.R zmlogitbayes <- setRefClass("Zelig-mlogit-bayes", contains = c("Zelig-bayes")) zmlogitbayes$methods( initialize = function() { callSuper() .self$name <- "mlogit-bayes" .self$year <- 2013 .self$category <- "discrete" .self$authors <- "Ben Goodrich, Ying Lu" .self$description = "Bayesian Multinomial Logistic Regression for Dependent Variables with Unordered Categorical Values" .self$fn <- quote(MCMCpack::MCMCmnl) # JSON from parent .self$wrapper <- "mlogit.bayes" } ) zmlogitbayes$methods( qi = function(simparam, mm) { resp <- model.response(model.frame(.self$formula, data = .self$data)) level <- length(table(resp)) p <- dim(model.matrix(eval(.self$formula), data = .self$data))[2] coef <- simparam eta <- array(NA, c(nrow(coef), level, nrow(mm))) eta[, 1, ] <- matrix(0, nrow(coef), nrow(mm)) for (j in 2:level) { ind <- (1:p) * (level - 1) - (level - j) eta[, j, ]<- coef[, ind] %*% t(mm) } eta <- exp(eta) ev <- array(NA, c(nrow(coef), level, nrow(mm))) pv <- matrix(NA, nrow(coef), nrow(mm)) colnames(ev) <- rep(NA, level) for (k in 1:nrow(mm)) { for (j in 1:level) ev[, j, k] <- eta[, j, k] / rowSums(eta[, , k]) } for (j in 1:level) { colnames(ev)[j] <- paste("P(Y=", j, ")", sep="") } for (k in 1:nrow(mm)) { probs <- as.matrix(ev[, , k]) temp <- apply(probs, 1, FUN = rmultinom, n = 1, size = 1) temp <- as.matrix(t(temp) %*% (1:nrow(temp))) pv <- apply(temp, 2, as.character) pv <- as.factor(pv) } ev <- ev[, , 1] return(list(ev = ev, pv = pv)) } ) Zelig/R/model-factor-bayes.R0000644000176200001440000002711113754260262015336 0ustar liggesusers#' Bayesian Factor Analysis #' #' @param formula a symbolic representation of the model to be #' estimated, in the form \code{~ Y1 + Y2 + Y3}, where Y1, Y2, and Y3 are variables #' of interest in factor analysis (manifest variables), assumed to be #' normally distributed. The model requires a minimum of three manifest #' variables contained in the #' same dataset. The \code{+} symbol means ``inclusion'' not #' ``addition.'' #' @param factors number of the factors to be fitted (defaults to 2). #' @param model the name of a statistical model to estimate. #' For a list of other supported models and their documentation see: #' \url{http://docs.zeligproject.org/articles/}. #' @param data the name of a data frame containing the variables #' referenced in the formula or a list of multiply imputed data frames #' each having the same variable names and row numbers (created by #' \code{Amelia} or \code{\link{to_zelig_mi}}). #' @param ... additional arguments passed to \code{zelig}, #' relevant for the model to be estimated. #' @param by a factor variable contained in \code{data}. If supplied, #' \code{zelig} will subset #' the data frame based on the levels in the \code{by} variable, and #' estimate a model for each subset. This can save a considerable amount of #' effort. You may also use \code{by} to run models using MatchIt #' subclasses. #' @param cite If is set to 'TRUE' (default), the model citation will be printed #' to the console. #' #' @details #' In addition, \code{zelig()} accepts the following additional arguments for model specification: #' \itemize{ #' \item \code{lambda.constraints}: list containing the equality or #' inequality constraints on the factor loadings. Choose from one of the following forms: #' \item \code{varname = list()}: by default, no constraints are imposed. #' \item \code{varname = list(d, c)}: constrains the dth loading for the #' variable named varname to be equal to c. #' \item \code{varname = list(d, +)}: constrains the dth loading for the variable named varname to be positive; #' \item \code{varname = list(d, -)}: constrains the dth loading for the variable named varname to be negative. #' \item \code{std.var}: defaults to \code{FALSE} (manifest variables are rescaled to #' zero mean, but retain observed variance). If \code{TRUE}, the manifest #' variables are rescaled to be mean zero and unit variance. #' } #' #' In addition, \code{zelig()} accepts the following additional inputs for \code{bayes.factor}: #' \itemize{ #' \item \code{burnin}: number of the initial MCMC iterations to be discarded (defaults to 1,000). #' \item \code{mcmc}: number of the MCMC iterations after burnin (defaults to 20,000). #' \item \code{thin}: thinning interval for the Markov chain. Only every thin-th #' draw from the Markov chain is kept. The value of mcmc must be divisible #' by this value. The default value is 1. #' \item \code{verbose}: defaults to FALSE. If TRUE, the #' progress of the sampler (every 10%10%) is printed to the screen. #' \item \code{seed}: seed for the random number generator. The default is NA which #' corresponds to a random seed 12345. #' \item \code{Lambda.start}: starting values of the factor loading matrix \eqn{\Lambda}, either a #' scalar (all unconstrained loadings are set to that value), or a matrix with #' compatible dimensions. The default is NA, where the start value are set to #' be 0 for unconstrained factor loadings, and 0.5 or - 0.5 for constrained #' factor loadings (depending on the nature of the constraints). #' \item \code{Psi.start}: starting values for the uniquenesses, either a scalar #' (the starting values for all diagonal elements of \eqn{\Psi} are set to be this value), #' or a vector with length equal to the number of manifest variables. In the latter #' case, the starting values of the diagonal elements of \eqn{\Psi} take the values of #' Psi.start. The default value is NA where the starting values of the all the #' uniquenesses are set to be 0.5. #' \item \code{store.lambda}: defaults to TRUE, which stores the posterior draws of the factor loadings. #' \item \code{store.scores}: defaults to FALSE. If TRUE, stores the posterior draws of the #' factor scores. (Storing factor scores may take large amount of memory for a large #' number of draws or observations.) #' } #' #' The model also accepts the following additional arguments to specify prior parameters: #' \itemize{ #' \item \code{l0}: mean of the Normal prior for the factor loadings, either a scalar or a #' matrix with the same dimensions as \eqn{\Lambda}. If a scalar value, that value will be the #' prior mean for all the factor loadings. Defaults to 0. #' \item \code{L0}: precision parameter of the Normal prior for the factor loadings, either #' a scalar or a matrix with the same dimensions as \eqn{\Lambda}. If \code{L0} takes a scalar value, #' then the precision matrix will be a diagonal matrix with the diagonal elements #' set to that value. The default value is 0, which leads to an improper prior. #' \item \code{a0}: the shape parameter of the Inverse Gamma prior for the uniquenesses #' is \code{a0}/2. It can take a scalar value or a vector. The default value is 0.001. #' \item \code{b0}: the scale parameter of the Inverse Gamma prior for the uniquenesses #' is \code{b0}/2. It can take a scalar value or a vector. The default value is 0.001. #' } #' #' Additional parameters avaialable to this model include: #' \itemize{ #' \item \code{weights}: vector of weight values or a name of a variable in the dataset #' by which to weight the model. For more information see: #' \url{http://docs.zeligproject.org/articles/weights.html}. #' } #' #' @return Depending on the class of model selected, \code{zelig} will return #' an object with elements including \code{coefficients}, \code{residuals}, #' and \code{formula} which may be summarized using #' \code{summary(z.out)} or individually extracted using, for example, #' \code{coef(z.out)}. See #' \url{http://docs.zeligproject.org/articles/getters.html} for a list of #' functions to extract model components. You can also extract whole fitted #' model objects using \code{\link{from_zelig_model}}. #' @examples #' \dontrun{ #' data(swiss) #' names(swiss) <- c("Fert", "Agr", "Exam", "Educ", "Cath", "InfMort") #' z.out <- zelig(~ Agr + Exam + Educ + Cath + InfMort, #' model = "factor.bayes", data = swiss, #' factors = 2, verbose = FALSE, #' a0 = 1, b0 = 0.15, burnin = 500, mcmc = 5000) #' #' z.out$geweke.diag() #' z.out <- zelig(~ Agr + Exam + Educ + Cath + InfMort, #' model = "factor.bayes", data = swiss, factors = 2, #' lambda.constraints = #' list(Exam = list(1,"+"), #' Exam = list(2,"-"), #' Educ = c(2, 0), #' InfMort = c(1, 0)), #' verbose = FALSE, a0 = 1, b0 = 0.15, #' burnin = 500, mcmc = 5000) #' #' z.out$geweke.diag() #' z.out$heidel.diag() #' z.out$raftery.diag() #' summary(z.out) #' } #' #' @seealso Vignette: \url{http://docs.zeligproject.org/articles/zelig_factorbayes.html} #' @import methods #' @export Zelig-factor-bayes #' @exportClass Zelig-factor-bayes #' #' @include model-zelig.R zfactorbayes <- setRefClass("Zelig-factor-bayes", contains = c("Zelig")) zfactorbayes$methods( initialize = function() { callSuper() .self$name <- "factor-bayes" .self$year <- 2013 .self$authors <- "Ben Goodrich, Ying Lu" .self$packageauthors <- "Andrew D. Martin, Kevin M. Quinn, and Jong Hee Park" .self$description = "Bayesian Factor Analysis" .self$fn <- quote(MCMCpack::MCMCfactanal) # JSON from parent .self$wrapper <- "factor.bayes" } ) zfactorbayes$methods( zelig = function(formula, factors = 2, burnin = 1000, mcmc = 20000, verbose = 0, ..., data, by = NULL, bootstrap = FALSE) { if(!identical(bootstrap,FALSE)){ stop("Error: The bootstrap is not available for Markov chain Monte Carlo (MCMC) models.") } .self$zelig.call <- match.call(expand.dots = TRUE) .self$model.call <- .self$zelig.call if (missing(verbose)) verbose <- round((mcmc + burnin) / 10) if (factors < 2) stop("Number of factors needs to be at least 2") .self$model.call$verbose <- verbose .self$model.call$x <- formula .self$model.call$factors <- factors callSuper(formula = formula, data = data,..., by = by, bootstrap = FALSE) } ) zfactorbayes$methods( qi = function() { return(NULL) } ) # The following diagnostics are also in Zelig-bayes, which unfortunately Zelig-factor-bayes does not currently inherit. zfactorbayes$methods( geweke.diag = function() { diag <- lapply(.self$zelig.out$z.out, coda::geweke.diag) # Collapse if only one list element for prettier printing if(length(diag)==1){ diag<-diag[[1]] } if(!citation("coda") %in% .self$refs){ .self$refs<-c(.self$refs,citation("coda")) } ref1<-bibentry( bibtype="InCollection", title = "Evaluating the accuracy of sampling-based approaches to calculating posterior moments.", booktitle = "Bayesian Statistics 4", author = person("John", "Geweke"), year = 1992, publisher = "Clarendon Press", address = "Oxford, UK", editor = c(person("JM", "Bernado"), person("JO", "Berger"), person("AP", "Dawid"), person("AFM", "Smith")) ) .self$refs<-c(.self$refs,ref1) return(diag) } ) zfactorbayes$methods( heidel.diag = function() { diag <- lapply(.self$zelig.out$z.out, coda::heidel.diag) # Collapse if only one list element for prettier printing if(length(diag)==1){ diag<-diag[[1]] } if(!citation("coda") %in% .self$refs){ .self$refs<-c(.self$refs,citation("coda")) } ref1<-bibentry( bibtype="Article", title = "Simulation run length control in the presence of an initial transient.", author = c(person("P", "Heidelberger"), person("PD", "Welch")), journal = "Operations Research", volume = 31, year = 1983, pages = "1109--44") .self$refs<-c(.self$refs,ref1) return(diag) } ) zfactorbayes$methods( raftery.diag = function() { diag <- lapply(.self$zelig.out$z.out, coda::raftery.diag) # Collapse if only one list element for prettier printing if(length(diag)==1){ diag<-diag[[1]] } if(!citation("coda") %in% .self$refs){ .self$refs<-c(.self$refs,citation("coda")) } ref1<-bibentry( bibtype="Article", title = "One long run with diagnostics: Implementation strategies for Markov chain Monte Carlo.", author = c(person("Adrian E", "Raftery"), person("Steven M", "Lewis")), journal = "Statistical Science", volume = 31, year = 1992, pages = "1109--44") ref2<-bibentry( bibtype="InCollection", title = "The number of iterations, convergence diagnostics and generic Metropolis algorithms.", booktitle = "Practical Markov Chain Monte Carlo", author = c(person("Adrian E", "Raftery"), person("Steven M", "Lewis")), year = 1995, publisher = "Chapman and Hall", address = "London, UK", editor = c(person("WR", "Gilks"), person("DJ", "Spiegelhalter"), person("S", "Richardson")) ) .self$refs<-c(.self$refs,ref1,ref2) return(diag) } ) Zelig/R/model-binchoice-gee.R0000644000176200001440000000160413754260262015437 0ustar liggesusers#' Object for Binary Choice outcomes in Generalized Estimating Equations #' for inheritance across models in Zelig #' #' @import methods #' @export Zelig-binchoice-gee #' @exportClass Zelig-binchoice-gee #' #' @include model-zelig.R #' @include model-binchoice.R #' @include model-gee.R zbinchoicegee <- setRefClass("Zelig-binchoice-gee", contains = c("Zelig-gee", "Zelig-binchoice")) zbinchoicegee$methods( initialize = function() { callSuper() .self$family <- "binomial" .self$year <- 2011 .self$category <- "continuous" .self$authors <- "Patrick Lam" .self$fn <- quote(geepack::geeglm) # JSON from parent } ) zbinchoicegee$methods( param = function(z.out, method="mvn") { simparam.local <- callSuper(z.out, method=method) return(simparam.local$simparam) # no ancillary parameter } ) Zelig/R/model-tobit.R0000755000176200001440000001724013754260262014105 0ustar liggesusers#' Linear Regression for a Left-Censored Dependent Variable #' @param formula a symbolic representation of the model to be #' estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the #' dependent variable and \code{x1} and \code{x2} are the explanatory #' variables, and \code{y}, \code{x1}, and \code{x2} are contained in the #' same dataset. (You may include more than two explanatory variables, #' of course.) The \code{+} symbol means ``inclusion'' not #' ``addition.'' You may also include interaction terms and main #' effects in the form \code{x1*x2} without computing them in prior #' steps; \code{I(x1*x2)} to include only the interaction term and #' exclude the main effects; and quadratic terms in the form #' \code{I(x1^2)}. #' @param model the name of a statistical model to estimate. #' For a list of other supported models and their documentation see: #' \url{http://docs.zeligproject.org/articles/}. #' @param data the name of a data frame containing the variables #' referenced in the formula or a list of multiply imputed data frames #' each having the same variable names and row numbers (created by #' \code{Amelia} or \code{\link{to_zelig_mi}}). #' @param ... additional arguments passed to \code{zelig}, #' relevant for the model to be estimated. #' @param by a factor variable contained in \code{data}. If supplied, #' \code{zelig} will subset #' the data frame based on the levels in the \code{by} variable, and #' estimate a model for each subset. This can save a considerable amount of #' effort. You may also use \code{by} to run models using MatchIt #' subclasses. #' @param cite If is set to 'TRUE' (default), the model citation will be printed #' to the console. #'@param below (defaults to 0) The point at which the dependent variable is censored from below. #' If any values in the dependent variable are observed to be less than the censoring point, #' it is assumed that that particular observation is censored from below at the observed value. #'@param above (defaults to 0) The point at which the dependent variable is censored from above #' If any values in the dependent variable are observed to be more than the censoring point, #' it is assumed that that particular observation is censored from above at the observed value. #'@param robust defaults to FALSE. If TRUE, \code{zelig()} computes robust standard errors based on #' sandwich estimators and the options selected in cluster. #'@param cluster if robust = TRUE, you may select a variable to define groups of correlated #' observations. Let x3 be a variable that consists of either discrete numeric values, character #' strings, or factors that define strata. Then z.out <- zelig(y ~ x1 + x2, robust = TRUE, #' cluster = "x3", model = "tobit", data = mydata)means that the observations can be correlated #' within the strata defined by the variable x3, and that robust standard errors should be #' calculated according to those clusters. If robust = TRUE but cluster is not specified, #' zelig() assumes that each observation falls into its own cluster. #' #' @details #' Additional parameters avaialable to this model include: #' \itemize{ #' \item \code{weights}: vector of weight values or a name of a variable in the dataset #' by which to weight the model. For more information see: #' \url{http://docs.zeligproject.org/articles/weights.html}. #' \item \code{bootstrap}: logical or numeric. If \code{FALSE} don't use bootstraps to #' robustly estimate uncertainty around model parameters due to sampling error. #' If an integer is supplied, the number of boostraps to run. #' For more information see: #' \url{http://docs.zeligproject.org/articles/bootstraps.html}. #' } #' #' @return Depending on the class of model selected, \code{zelig} will return #' an object with elements including \code{coefficients}, \code{residuals}, #' and \code{formula} which may be summarized using #' \code{summary(z.out)} or individually extracted using, for example, #' \code{coef(z.out)}. See #' \url{http://docs.zeligproject.org/articles/getters.html} for a list of #' functions to extract model components. You can also extract whole fitted #' model objects using \code{\link{from_zelig_model}}. #' #' @examples #' library(Zelig) #' data(tobin) #' z.out <- zelig(durable ~ age + quant, model = "tobit", data = tobin) #' summary(z.out) #' #' @seealso Vignette: \url{http://docs.zeligproject.org/articles/zelig_tobit.html} #' @import methods #' @export Zelig-tobit #' @exportClass Zelig-tobit #' #' @include model-zelig.R ztobit <- setRefClass("Zelig-tobit", contains = "Zelig", fields = list(above = "numeric", below = "numeric")) ztobit$methods( initialize = function() { callSuper() .self$name <- "tobit" .self$authors <- "Kosuke Imai, Gary King, Olivia Lau" .self$packageauthors <- "Christian Kleiber and Achim Zeileis" .self$year <- 2011 .self$description = "Linear regression for Left-Censored Dependent Variable" .self$fn <- quote(AER::tobit) # JSON .self$outcome <- "continous" .self$wrapper <- "tobit" .self$acceptweights <- TRUE } ) ztobit$methods( zelig = function(formula, ..., below = 0, above = Inf, robust = FALSE, data, weights = NULL, by = NULL, bootstrap = FALSE) { .self$zelig.call <- match.call(expand.dots = TRUE) .self$model.call <- .self$zelig.call .self$below <- below .self$above <- above .self$model.call$below <- NULL .self$model.call$above <- NULL .self$model.call$left <- below .self$model.call$right <- above callSuper(formula = formula, data = data, ..., weights = weights, by = by, bootstrap = bootstrap) if(!robust){ fn2 <- function(fc, data) { fc$data <- data return(fc) } robust.model.call <- .self$model.call robust.model.call$robust <- TRUE robust.zelig.out <- .self$data %>% group_by_(.self$by) %>% do(z.out = eval(fn2(robust.model.call, quote(as.data.frame(.))))$var ) .self$test.statistics<- list(robust.se = robust.zelig.out$z.out) } } ) ztobit$methods( param = function(z.out, method="mvn") { if(identical(method,"mvn")){ mu <- c(coef(z.out), log(z.out$scale)) simfull <- mvrnorm(n = .self$num, mu = mu, Sigma = vcov(z.out)) simparam.local <- as.matrix(simfull[, -ncol(simfull)]) simalpha <- exp(as.matrix(simfull[, ncol(simfull)])) simparam.local <- list(simparam = simparam.local, simalpha = simalpha) return(simparam.local) } else if(identical(method,"point")){ return(list(simparam = t(as.matrix(coef(z.out))), simalpha = log(z.out$scale) )) } } ) ztobit$methods( qi = function(simparam, mm) { Coeff <- simparam$simparam %*% t(mm) SD <- simparam$simalpha alpha <- simparam$simalpha lambda <- dnorm(Coeff / SD) / (pnorm(Coeff / SD)) ev <- pnorm(Coeff / SD) * (Coeff + SD * lambda) pv <- ev pv <- matrix(nrow = nrow(ev), ncol = ncol(ev)) for (j in 1:ncol(ev)) { pv[, j] <- rnorm(nrow(ev), mean = ev[, j], sd = SD) pv[, j] <- pmin(pmax(pv[, j], .self$below), .self$above) } return(list(ev = ev, pv = pv)) } ) ztobit$methods( mcfun = function(x, b0=0, b1=1, alpha=1, sim=TRUE){ mu <- b0 + b1 * x ystar <- rnorm(n=length(x), mean=mu, sd=alpha) if(sim){ y <- (ystar>0) * ystar # censoring from below at zero return(y) }else{ y.uncensored.hat.tobit<- mu + dnorm(mu, mean=0, sd=alpha)/pnorm(mu, mean=0, sd=alpha) y.hat.tobit<- y.uncensored.hat.tobit * (1- pnorm(0, mean=mu, sd=alpha) ) # expected value of censored outcome return(y.hat.tobit) } } ) Zelig/R/datasets.R0000644000176200001440000000055213754260262013471 0ustar liggesusers#' Cigarette Consumption Panel Data #' #' @docType data #' @source From Christian Kleiber and Achim Zeileis (2008). Applied #' Econometrics with R. New York: Springer-Verlag. ISBN 978-0-387-77316-2. URL #' #' @keywords datasets #' @md #' @format A data set with 96 observations and 9 variables #' @name CigarettesSW NULL Zelig/R/model-tobit-bayes.R0000644000176200001440000001537513754260262015212 0ustar liggesusers#' Bayesian Tobit Regression #' #' @param formula a symbolic representation of the model to be #' estimated, in the form \code{y ~ x1 + x2}, where \code{y} is the #' dependent variable and \code{x1} and \code{x2} are the explanatory #' variables, and \code{y}, \code{x1}, and \code{x2} are contained in the #' same dataset. (You may include more than two explanatory variables, #' of course.) The \code{+} symbol means ``inclusion'' not #' ``addition.'' You may also include interaction terms and main #' effects in the form \code{x1*x2} without computing them in prior #' steps; \code{I(x1*x2)} to include only the interaction term and #' exclude the main effects; and quadratic terms in the form #' \code{I(x1^2)}. #' @param model the name of a statistical model to estimate. #' For a list of other supported models and their documentation see: #' \url{http://docs.zeligproject.org/articles/}. #' @param data the name of a data frame containing the variables #' referenced in the formula or a list of multiply imputed data frames #' each having the same variable names and row numbers (created by #' \code{Amelia} or \code{\link{to_zelig_mi}}). #' @param ... additional arguments passed to \code{zelig}, #' relevant for the model to be estimated. #' @param by a factor variable contained in \code{data}. If supplied, #' \code{zelig} will subset #' the data frame based on the levels in the \code{by} variable, and #' estimate a model for each subset. This can save a considerable amount of #' effort. You may also use \code{by} to run models using MatchIt #' subclasses. #' @param cite If is set to 'TRUE' (default), the model citation will be printed #' to the console. #' @param below: point at which the dependent variable is censored from below. #' If the dependent variable is only censored from above, set \code{below = -Inf}. #' The default value is 0. #' @param above: point at which the dependent variable is censored from above. #' If the dependent variable is only censored from below, set \code{above = Inf}. #' The default value is \code{Inf}. #' @details #' Additional parameters avaialable to this model include: #' \itemize{ #' \item \code{weights}: vector of weight values or a name of a variable in the dataset #' by which to weight the model. For more information see: #' \url{http://docs.zeligproject.org/articles/weights.html}. #' \item \code{burnin}: number of the initial MCMC iterations to be discarded (defaults to 1,000). #' \item \code{mcmc}: number of the MCMC iterations after burnin (defaults to 10,000). #' \item \code{thin}: thinning interval for the Markov chain. Only every thin-th #' draw from the Markov chain is kept. The value of mcmc must be divisible by this value. #' The default value is 1. #' \item \code{verbose}: defaults to FALSE. If TRUE, the progress of the sampler (every 10\%) #' is printed to the screen. #' \item \code{seed}: seed for the random number generator. The default is \code{NA} which #' corresponds to a random seed of 12345. #' \item \code{beta.start}: starting values for the Markov chain, either a scalar or #' vector with length equal to the number of estimated coefficients. The default is #' \code{NA}, such that the maximum likelihood estimates are used as the starting values. #' } #' Use the following parameters to specify the model's priors: #' \itemize{ #' \item \code{b0}: prior mean for the coefficients, either a numeric vector or a scalar. #' If a scalar value, that value will be the prior mean for all the coefficients. #' The default is 0. #' \item \code{B0}: prior precision parameter for the coefficients, either a square matrix #' (with the dimensions equal to the number of the coefficients) or a scalar. #' If a scalar value, that value times an identity matrix will be the prior precision parameter. #' The default is 0, which leads to an improper prior. #' \item \code{c0}: \code{c0}/2 is the shape parameter for the Inverse Gamma prior on the variance of the #' disturbance terms. #' \item \code{d0}: \code{d0}/2 is the scale parameter for the Inverse Gamma prior on the variance of the #' disturbance terms. #' } #' @return Depending on the class of model selected, \code{zelig} will return #' an object with elements including \code{coefficients}, \code{residuals}, #' and \code{formula} which may be summarized using #' \code{summary(z.out)} or individually extracted using, for example, #' \code{coef(z.out)}. See #' \url{http://docs.zeligproject.org/articles/getters.html} for a list of #' functions to extract model components. You can also extract whole fitted #' model objects using \code{\link{from_zelig_model}}. #' @param below: point at which the dependent variable is censored from below. If the dependent variable is only censored from above, set below = -Inf. The default value is 0. #' @param above: point at which the dependent variable is censored from above. If the dependent variable is only censored from below, set above = Inf. The default value is Inf. #' #' @examples #' data(turnout) #' z.out <- zelig(vote ~ race + educate, model = "tobit.bayes",data = turnout, verbose = FALSE) #' #' @seealso Vignette: \url{http://docs.zeligproject.org/articles/zelig_tobitbayes.html} #' @import methods #' @export Zelig-tobit-bayes #' @exportClass Zelig-tobit-bayes #' #' @include model-zelig.R #' @include model-bayes.R #' @include model-tobit.R ztobitbayes <- setRefClass("Zelig-tobit-bayes", contains = c("Zelig-bayes", "Zelig-tobit")) ztobitbayes$methods( initialize = function() { callSuper() .self$name <- "tobit-bayes" .self$year <- 2013 .self$category <- "dichotomous" .self$authors <- "Ben Goodrich, Ying Lu" .self$description = "Bayesian Tobit Regression for a Censored Dependent Variable" .self$fn <- quote(MCMCpack::MCMCtobit) # JSON from parent .self$wrapper <- "tobit.bayes" } ) ztobitbayes$methods( param = function(z.out) { if (length(.self$below) == 0) .self$below <- 0 if (length(.self$above) == 0) .self$above <- Inf simparam.local <- list() simparam.local$simparam <- z.out[, 1:(ncol(z.out) - 1)] simparam.local$simalpha <- sqrt(z.out[, ncol(z.out)]) return(simparam.local) } ) ztobitbayes$methods( mcfun = function(x, b0=0, b1=1, alpha=1, sim=TRUE){ mu <- b0 + b1 * x ystar <- rnorm(n=length(x), mean=mu, sd=alpha) if(sim){ y <- (ystar>0) * ystar # censoring from below at zero return(y) }else{ y.uncensored.hat.tobit<- mu + dnorm(mu, mean=0, sd=alpha)/pnorm(mu, mean=0, sd=alpha) y.hat.tobit<- y.uncensored.hat.tobit * (1- pnorm(0, mean=mu, sd=alpha) ) # expected value of censored outcome return(y.hat.tobit) } } ) Zelig/NEWS.md0000644000176200001440000002640413764441223012436 0ustar liggesusers> All changes to Zelig are documented here. GitHub issue numbers are given after each change note when relevant. See . External contributors are referenced with their GitHub usernames when applicable. Zelig version 5.1.6 ============================== ## Major changes - All Zelig time series models are deprecated. ## Minor changes - `predit`, `fitted`, `residuals` now accept arguments. #320 Zelig version 5.1.5 ============================== ++++ All Zelig time series models will be deprecated on 1 February 2018 ++++ ## Bug fixes - Resolved an issue where `odds_ratios` standard errors were not correctly returned for `logit` and `relogit` models. Thanks to @retrography. #302 - Zelig 4 compatability wrappers now work for `arima` models. Thanks to @mbsabath. #280 - Resolved an error when only `setx` was called with `arima` models Thanks to @mbsabath. #299 - Resolved an error when `summary` was called after `sim` for `arima` models. #305 - Resolved an error when `sim` is used with differenced first-order autoregressive models. #307 - `arima` models return informative error when `data` is not found. #308 ## Minor - Compatibility with testthat 2.0.0 - Documentation updated to correctly reflect that `tobit` wraps `AER::tobit`. #315 - Package terminology in documentation corrected. #316 Zelig version 5.1-4 ============================== ## Major changes - Speed improvements made to `relogit`. Thanks to @retrography. #88 - Returns `relogit` weighted case control method to that described in King and Langche (2001, eq. 11) and used in the Stata `relogit` implementation. #295 - Odds ratios now returned from `summary` with `relogit` models via the `odds_ratios = TRUE` argument. #302 Zelig version 5.1-3 ============================== ## Major changes - Roxygen documentation improvements. ## Minor changes and bug fixes - `zquantile` with Amelia imputed data now working. #277 - `vcov` now works with `rq` quantile regression models. - More informative error handling for conflicting `timeseries` model arguments. #283 - Resolved and issue with `relogit` that produced a warning when the fitted model object was passed to `predict`. #291 Zelig version 5.1-2 ============================== ## Major changes - !EXPERIMENTAL! interface function `to_zelig` allows users to convert fitted model objects fitted outside of Zelig to a Zelig object. The function is called within the `setx` wrapper if a non-Zelig object is supplied. Currently only works for models fitted with `lm` and many estimated with `glm` and `svyglm`. #189 - `get_se` and `get_pvalue` function wrappers created for `get_se` and `get_pvalue` methods, respectively. #269 - If `combine_coef_se` is given a model estimated without multiply imputed data or bootstraps, an error is no longer returned. Instead a list of the models' untransformed coefficients, standard errors, and p-values is returned. #268 - `summary` for `logit` models now accepts the argument `odds_ratios`. When `TRUE` odds ratio estimates are returned rather than coefficient estimates. Thanks to Adam Obeng. PR/#270. - `setx` and `sim` fail informatively when passed ZeligEI objects. #271 ## Minor changes and bug fixes - Resolved a bug where `weights` were not being passed to `svydesign` in survey models. #258 - Due to limited functionality and instability, zelig survey estimations no return a warning and a link to documentation on how to use `to_survey` via `setx` to bipass `zelig`. #273 - Resolved a bug where `from_zelig_model` would not extract fitted model objects for models estimated using `vglm`. #265 - `get_pvalue` and `get_se` now work for models estimated using `vglm`. #267 - Improved `ivreg`, `mlogit`, and getter (#266) documentation. Zelig version 5.1-1 ============================== ## Minor changes - Average Treatment Effect on the Treated (ATT) vignette added to the online documentation - Corrected vignette URLs. Zelig version 5.1-0 ============================== ## Major changes - Introduce a new model type for instrumental-variable regression: `ivreg` based on the `ivreg` from the AER package. #223 - Use the Formula package for formulas. This will enable a common syntax for multiple equations, though currently in Core Zelig it is only enhances `ivreg`. #241 - `zelig` calls now support `update`ing formulas (#244) and `.` syntax for inserting all variables from `data` on the right-hand side of the formula #87. See also #247. - Arbitrary `log` transformations are now supported in `zelig` calls (exept for `ivreg` regressors). #225 - Arbitrary `as.factor` and `factor` transformations are now supported in `zelig` calls. - Restored quantile regression (`model = "rq"`). Currently only supports one `tau` at a time. #255 - Added `get_qi` wrapper for `get_qi` method. - Added `ATT` wrapper for `ATT` method. - `gee` models can now be estimated with multiply imputed data. #263 ## Minor changes and bug fixes - `zelig` returns an error if `weights` are specified in a model estimated with multiply imputed data. (not possible before, but uninformative error returned) - Code improvement to `factor_coef_combine` so it does not return a warning for model types with more than 1 declared class. - Reorganize README files to meet new CRAN requirements. - Switch `bind_rows` for `rbind_all` in `zquantile` as the latter is depricated. #255 - Depends on the survival package in order to enable `setx` for exponential models without explicitly loading survival. #254 - `relogit` now only accepts one `tau` per call (similar to `quantile`). Fixed to address #257. - Additional unit tests. Zelig version 5.0-17 ============================== ## Major changes - New function `combine_coef_se` takes as input a `zelig` model estimated using multiply imputed data or bootstrapping and returns a list of coefficients, standard errors, z-values, and p-values combined across the estimations. Thanks to @vincentarelbundock for prompting. #229 - The following changes were primarily made to re-established Zelig integration with [WhatIf](https://CRAN.R-project.org/package=WhatIf). #236 + Added `zelig_setx_to_df` for extracted fitted values created by `setx`. + Fitted factor level variable values are returned in a single column (not by parameter level) by `zelig_qi_to_df`. - `setrange` (including `setx` used with a range of fitted values) now creates scenarios based on matches of equal length set ranges. This enables `setx` to work with polynomials, splines, etc. (currently only when these are created outside of the `zelig` call). #238 ## Minor changes and bug fixes - Resolve a bug where appropriate `plot`s were not created for `mlogitbayes`. #206 - Arguments (such as `xlab`) can now be passed to `plot`. #237 - `zelig_qi_to_df` and `qi_slimmer` bug with multinomial response models resolved. #235 - Resolved a bug where `coef`, `coefficients`, `vcov`, `fitted`, and `predict` returned errors. Thanks to @vincentarelbundock for initially reporting. #231 - Reduced number of digits show from `summary` for fitted model objects. Zelig version 5.0-16 ============================== ## Major changes - !! Breaking change !! the `get*` functions (e.g. `getcoef`) now use underscores `_` to delimit words in the function names (e.g. `get_coef`). #214 - Added a number of new "getter" methods for extracting estimation elements: + `get_names` method to return Zelig object field names. Also available via `names`. #216 + `get_residuals` to extract fitted model residuals. Also available via `residuals`. + `get_df_residuals` method to return residual degrees-of-freedom. Also accessible via `df.residuals`. + `get_model_data` method to return the data frame used to estimate the original model. + `get_pvalue` and `get_se` methods to return estimated model p-values and standard errors. Thank you to @vincentarelbundock for contributions. #147 - `zelig_qi_to_df` function for extracting simulated quantities of interest from a Zelig object and returning them as a tidy-formatted data frame. #189 - `setx` returns an error if it is unable to find a supplied variable name. - `setx1` wrapper added to facilitate piped workflows for first differences. - `zelig` can handle independent variables that are transformed using the natural logarithm inside of the call. #225 ## Minor changes and bug fixes - Corrected an issue where `plot` would tend to choose a factor level as the x-axis variable when plotting a range of simulations. #226 - If a factor level variable's fitted value is not specified in `setx` and it is multi-modal, the last factor in the factor list is arbitrarily chosen. This replaces previous behavior where the level was randomly chosen, causing unuseful quantity of interest range plots. #226 - Corrected a bug where `summary` for ranges of `setx` would only show the first scenario. Now all scenarios are shown. #226 - Corrected a bug where the README.md was not included in the CRAN build. - `to_zelig_mi` now can accept a list of data frames. Thanks to @vincentarelbundock. - Internal code improvements. Zelig version 5.0-15 ============================== ## Major changes - Allows users to convert an independent variable to a factor within a `zelig` call using `as.factor`. #213 - `from_zelig_model` function to extract original fitted model objects from `zelig` estimation calls. This is useful for conducting non-Zelig supported post-estimation and easy integration with the texreg and stargazer packages for formatted parameter estimate tables. #189 - Additional MC tests for a wide range of models. #160 ## Minor changes - Solved deep assignment issue that returned a series of warnings on build. #172 ## Bug fixes - Resolves a bug from `set` where `sim` would fail for models that included factor level independent variables. #156 - Fixed an issue with `model-survey` where `ids` was hard coded as `~1`. #144 - Fixed `ATT` bug introduced in 5.0-14. #194 - Fixed `ci.plot` bug with `timeseries` models introduced in 5.0-15. #204 Zelig version 5.0-14 ============================== ## Major changes - `mode` has been deprecated. Please use `Mode`. #152 - The Zelig 4 `sim` wrapper now intelligently looks for fitted values from the reference class object if not supplied via the x argument. - New `to_zelig_mi` utility function for combining multiply imputed data sets for passing to `zelig`. `mi` will also work to enable backwards compatibility. #178 - Initial development on a new testing architecture and more tests for `model-*`, Zelig 4 wrappers, `ci.plot`, and the Zelig workflow. - `graph` method now accepts simulations from `setx` and `setrange`. For the former it uses `qi.plot` and `ci.plot` for the latter. - Improved error messages for Zelig 4 wrappers. - Improved error messages if Zelig methods are supplied with too little information. - `model-arima` now fails if the dependent variable does not vary for one of the cases. ## Minor changes - Minor documentation improvements for Zelig 4 wrappers. - Dynamically generated README.md. - Removed plyr package dependency. - `rbind_all` replaced by `bind_rows` as the former is deprecated by dplyr. - Other internal code improvements Zelig/MD50000644000176200001440000003747513765157646011700 0ustar liggesusers6e868f10bc8e2432ca6d45b852207135 *DESCRIPTION e1271f2559ab23440ab394d7d7888dfc *NAMESPACE 3c6604cf7fa536d5d08941eb69b54295 *NEWS.md 730ab0cfd1a65d32bffc31dc9faa3cea *R/assertions.R d6ef085ccf0851cf45daa5ade58e4666 *R/create-json.R e3856971ba3777ebc380d91f5998f26e *R/datasets.R 8720ccb3fd7c7214a34ede6f2d5c3a1a *R/interface.R 6e804798e6660e0741c6db33769a32ce *R/model-ar.R 05711fae4df16ec699e3b656ef7f4c67 *R/model-arima.R 9ec8819a950c30f1304af690bc072df7 *R/model-bayes.R de52ae95a161be627e87bb004698c03a *R/model-binchoice-gee.R b67bd8ffcdc291f632417c95ad0b9fc5 *R/model-binchoice-survey.R 78abc68d47e75e693a9091758d23c096 *R/model-binchoice.R 94b92af4802d3311dd1dc1f07dc1c211 *R/model-exp.R 2f420918edb49510981c1b8cde437ac0 *R/model-factor-bayes.R 655f967a5ac8fb616c904c3ae7967da1 *R/model-gamma-gee.R f02fe38e7cba69ce094cd7779e71c3a8 *R/model-gamma-survey.R b4eb6d7fea8fdc7a4fa49856c8c8c354 *R/model-gamma.R 7fc360e3cd0dcd3fbc623cc93010adcd *R/model-gee.R 51b8b42079973ac0e635aff6a83fac48 *R/model-glm.R 3ab8a7861cf925231749507ea7d8df8c *R/model-ivreg.R f0081bead3ac50ea4b4297fed17425be *R/model-logit-bayes.R dec59f27c07e98029bfe23399d0474d8 *R/model-logit-gee.R 59fcf9b753323af83423923062877aaf *R/model-logit-survey.R e1015437fcff5a0a6bf33d97d980344d *R/model-logit.R 03c28f3f11a25de113b9e81089fe9e98 *R/model-lognorm.R c5e79fc9667e6c8490634454bdfdf28e *R/model-ls.R ddd102cc0cb8b71c467f344f73e370a4 *R/model-ma.R ad0fddd7110c4cfe943bf8d9daa54c72 *R/model-mlogit-bayes.R 98715b67b8e8e6e3cb8c934a76f231dd *R/model-negbinom.R 53825c4a87aeab87ca1f8c54fefbb380 *R/model-normal-bayes.R 31d961687f0062316580c3d3a07a96c4 *R/model-normal-gee.R 40221bd2f0fce26ffbd2a49b736e7f2e *R/model-normal-survey.R 2ef1d98a65be1cc85ed64a0a33911605 *R/model-normal.R ddfda5f2729e9e811623422b7bbad397 *R/model-oprobit-bayes.R e07877092e4442511bfa634f3e259c74 *R/model-poisson-bayes.R d19822f4e9f239d703f9e2a9834f4ab6 *R/model-poisson-gee.R 2278014d5080dedc64f2e5d12a2044d2 *R/model-poisson-survey.R fd7ec98d8050e4593178f6c61f26331e *R/model-poisson.R e2e4f36d1f52837ca73dd9ae79800c9e *R/model-probit-bayes.R ee3bd7275201e8b64f6564470053122c *R/model-probit-gee.R 203a5584212c675cc8b11e19f5757487 *R/model-probit-survey.R 1429a685e824beb21bad0683a3c5d446 *R/model-probit.R f6cc92aa02b250c2c1eff594a3edf84c *R/model-quantile.R cf83af2578b2ac6daab8a1cd3ab60c0e *R/model-relogit.R a3757b9586b6df589dc4dbb88b547ddf *R/model-survey.R de67af872b2fe1ca071dbdeb794e649c *R/model-timeseries.R cff2612a2388afaef910b090fc75c933 *R/model-tobit-bayes.R 94c33a8d2919a6b0e7be661d946ea807 *R/model-tobit.R 93b036e1e972171320a42d532517c647 *R/model-weibull.R 2e3f3f194a8f941b15643cc10dcb2290 *R/model-zelig.R e9a87c8e51730b022171e92a01fbb4c0 *R/plots.R a9d87f67d645164cd096164d24906c60 *R/utils.R 23e6baa451254a1fe65ee3bfdd8b001d *R/wrappers.R 8060bc87f01b9686f2ea49449a487218 *README.md 39ef73926d0b63476cdddce1806a6413 *data/CigarettesSW.tab.gz d8568ae5389248b670f8c744a6393bc5 *data/MatchIt.url.tab.gz a6f9d73b7928a4b1b3098db3f47e5daa *data/PErisk.txt.gz 92a23a476e24f1cd6d24d0da91400dfd *data/SupremeCourt.txt.gz b7e99eba34328eb8666a65215d295aec *data/Weimar.txt.gz 10c152956b65fb8dd9ec77e5b7e292f0 *data/Zelig.url.tab.gz 0032352d73cb7588e5380d280032f3f0 *data/approval.tab.gz 55d9d1a669d8be91391c84f3fa043d73 *data/bivariate.tab.gz 9d8e26c166e0e37c0db973a83101a6b9 *data/coalition.tab.gz 7f751eba795fe4a5fc05fa59db936639 *data/coalition2.txt.gz 809c9dc00afa3a9a2fac98c6a5beb07a *data/eidat.txt.gz d96e13fe15af9acc7acfe60c5ed49202 *data/free1.tab.gz d96e13fe15af9acc7acfe60c5ed49202 *data/free2.tab.gz f7e30143b828d9579a885df15166c437 *data/friendship.RData ef951783ffa4e6d1c30ba0ae5d826f95 *data/grunfeld.txt.gz 350bdb7fcd6af5111de558dc4d95dbdc *data/hoff.tab.gz 96667c7fa64956e37c98d27da28d6323 *data/homerun.txt.gz 4b5a0ad83503b53d3938ef096f0b49dc *data/immi1.tab.gz ad3aeedcfc3efaf07b97eed891eb54a4 *data/immi2.tab.gz 20e7a626848c89890dd244a1f5f5fe3c *data/immi3.tab.gz c9e7da59ab5939e3ab3a1b13997c6066 *data/immi4.tab.gz c78cb1b6027462372e6554ca9347ec02 *data/immi5.tab.gz 95877625cd68d0528e0e82c44991539c *data/immigration.tab.gz 758ac52b426648bfdfa6cb5890525322 *data/klein.txt.gz 4b90f1abe69813998c0e883ea50d8d1d *data/kmenta.txt.gz a40a04e03f5a6b7c6fb5eb2df4e114e8 *data/macro.tab.gz 80de03b905bf13c6a8f6fc0f4656dc84 *data/mexico.tab.gz b533bad8842a7e90edec8e48fae4344f *data/mid.tab.gz 95428f80b455ff968eaa1f1664de79b7 *data/newpainters.txt.gz 021b1ecd5eb60a3473ae630319248695 *data/sanction.tab.gz 4056a7cc6e8f06f472496c0304828584 *data/seatshare.rda 336854cdacb726631f77466eb046efd7 *data/sna.ex.RData e68f058f062c39262205a8284c04322f *data/swiss.txt.gz 6ac34a147ed09bb7cbc393d35382cd85 *data/tobin.txt.gz e479597b35b8b696e886e90a37946a5a *data/turnout.tab.gz 4ee261cada9146f1cabf2df5066c2e24 *data/voteincome.txt.gz 06ac23110f708842bcbca721a453064b *inst/CITATION d75bbeecea1decdf729aa94849615f96 *inst/JSON/zelig5models.json 5d61fcfa3cf1a472f7513cb543caab6a *man/ATT.Rd 60ece4f6866054b112e8a1adcb7daffe *man/CigarettesSW.Rd 4a9dd790032ca1211119953a6d9e134a *man/MatchIt.url.Rd 6fe2eda530325b23eedb7b92614b3589 *man/Median.Rd a700be4d8663051b436ce61a26c5a94f *man/Mode.Rd 0641d8ba40e205316b2d2fbe0fb5eaf5 *man/PErisk.Rd 58172f8c13fe9864a8ac2e26fbd391de *man/SupremeCourt.Rd fe15364db9b4e80c56722eec238629e7 *man/Weimar.Rd 0ff238e5cc8220d7ca2c5e805a1160c9 *man/Zelig-ar-class.Rd 1dc653a75a63625a5220eeedf1bdf3cc *man/Zelig-arima-class.Rd fe76c142d8d427f6ce4f0818969d3009 *man/Zelig-bayes-class.Rd f00cb4b7c0b1269a0bcf3fcda1ff6c9b *man/Zelig-binchoice-class.Rd adcc9bafd98950ad536552665d2427ac *man/Zelig-binchoice-gee-class.Rd c2b68fcdf0e3ec8ce12a63f8976fde74 *man/Zelig-binchoice-survey-class.Rd 2c49e3d76b99fe03a6d090e0b7d0b0bc *man/Zelig-class.Rd 7d1a81af79893ebe7ece133b62e0041c *man/Zelig-exp-class.Rd 0a394e6fb320a60c74a1ed0e60d19438 *man/Zelig-factor-bayes-class.Rd ee76e603891841729916911b25aa85d3 *man/Zelig-gamma-class.Rd 74a06666c5060176fb6f9e38aa157684 *man/Zelig-gamma-gee-class.Rd 044eba9bcf0a35c24a18a81b31059fc9 *man/Zelig-gamma-survey-class.Rd eaffca91a7034cafa1550859a1144f06 *man/Zelig-gee-class.Rd 99522ba5e30cd464973e277dc394e6e9 *man/Zelig-glm-class.Rd 4eaa504d729b64585812f3cfed91326a *man/Zelig-ivreg-class.Rd a6fca9e9136e0be089c655929e287db5 *man/Zelig-logit-bayes-class.Rd 07cb9206960dc7ffbd803607d54688d9 *man/Zelig-logit-class.Rd 66a6767f7c650c453111f7744b35a9f6 *man/Zelig-logit-gee-class.Rd 0f257151126627b4813b5246b21d3d02 *man/Zelig-logit-survey-class.Rd c5ca7b705ed456ed2a2f2c31c1ee55c9 *man/Zelig-lognorm-class.Rd 0c3c99c2dc3c6a8d8d8a4f8ee0699fb9 *man/Zelig-ls-class.Rd d179021274cfd86f31ae389f241ab194 *man/Zelig-ma-class.Rd 1cfa27d2e89864a934ca181155bb84d9 *man/Zelig-mlogit-bayes-class.Rd 21e83fe7335b4079a4de8f105409f511 *man/Zelig-negbin-class.Rd 9b907186169e71309ae9b7e2e512820d *man/Zelig-normal-bayes-class.Rd 19553e591d7c221459b3564649efc58e *man/Zelig-normal-class.Rd 0bec2a6e58c9da93187e0b27264fd350 *man/Zelig-normal-gee-class.Rd e4099ab1bf5781fa595a56b969c40283 *man/Zelig-normal-survey-class.Rd e158a303d354ed423f9c49ebff315b40 *man/Zelig-oprobit-bayes-class.Rd 13676759d2e1de98df384929e6c9fa16 *man/Zelig-poisson-bayes-class.Rd 966584a067d9b93a91fdd91340831f5c *man/Zelig-poisson-class.Rd dd418034db233d42bc9c5b24125e6d5c *man/Zelig-poisson-gee-class.Rd 9f520635db1caff9670f4376e1574dc7 *man/Zelig-poisson-survey-class.Rd 83d3eee551d8900782e22eadc8141cc5 *man/Zelig-probit-bayes-class.Rd 1f213a14a164a266407c940d42de777d *man/Zelig-probit-class.Rd 8d24a583a287ae56170cb81a6a1e76d8 *man/Zelig-probit-gee-class.Rd 5ecdc1dbea34bb4f4becec49dbfc999a *man/Zelig-probit-survey-class.Rd c2649e01f67d4908255244596f717628 *man/Zelig-quantile-class.Rd 681b3ab38779102514bac9fb9e15cf5e *man/Zelig-relogit-class.Rd 56da214651a7ee0cdf3fa913add41f1f *man/Zelig-survey-class.Rd 9e7eede231c7daf9f16506ed22704e84 *man/Zelig-timeseries-class.Rd 3b4af2c037c7efa0588852f6554a8936 *man/Zelig-tobit-bayes-class.Rd 6d1b0679aa594cace6290e0ef93aa363 *man/Zelig-tobit-class.Rd 68ab46ff4f480ae786df7e3b976e171c *man/Zelig-weibull-class.Rd 1db4de0bb107ccfd6df5890ba8e604b0 *man/Zelig.url.Rd 7e5422c7821d99df3cd21a9e789c5cb6 *man/approval.Rd dd114842e76f6de2d0f9540313bee78a *man/avg.Rd 83d85754bfcbadc14cfe8dc538007d0b *man/bivariate.Rd 70843d4ace4da608950bb13369d8a56d *man/ci.plot.Rd c69d07291df6fedeeb5b5162f3749f2d *man/ci_check.Rd 1433613bc7b1a876c1524924b2ff71dd *man/cluster.formula.Rd 3b01d1373c2b9f311a70f150f8a3e7cf *man/coalition.Rd 11360f284ca3189f573e8087c7d99502 *man/coalition2.Rd f2646a33c52242cb712267e53d1441f1 *man/coef-Zelig-method.Rd d5599f65ad14a0e898a067bc2005ce1e *man/coefficients-Zelig-method.Rd f871c0a614a74e9a818982dce3cc6a76 *man/combine_coef_se.Rd 64573eabf10fd2239d504a53c470e5dc *man/createJSON.Rd 1ae3260160c3f05959844019c5a6a43b *man/df.residual-Zelig-method.Rd 11ad69ed866d12262602fc3b786091d4 *man/eidat.Rd 3b4d131bf2f3bccfc31ccdb969fb18d9 *man/expand_grid_setrange.Rd 0adad4c4df5d949c191191a8761b2782 *man/extract_setrange.Rd 0cd9672aeab780eae4e453a17c6df1ad *man/extract_setx.Rd c17f8c77523cb1c1fb55ee790d4cc8d0 *man/factor_coef_combine.Rd 1db2cb483aded6e6bc2c286452699612 *man/figures/example_plot_ci_plot-1.png 0a38a46e11917808441d7f1c363e3960 *man/figures/example_plot_graph-1.png a682e41f4819805f11956e26e5f5f763 *man/figures/img/zelig_models_thumb.png 3da34554f4fcf4639b761347bd13fabb *man/figures/img/zelig_poster.jpeg 0c6df7a3fd72f6356621bafc6c775f8e *man/figures/zelig.png fbf810bc638e2f3127306171be938dec *man/fitted-Zelig-method.Rd d8e4df6b181afc5e10fee0d774850c90 *man/free1.Rd 788c8364b3a5ff56275ed6f1de9b7790 *man/free2.Rd c060e534333e3a52a0f48d33b65e5542 *man/friendship.Rd e7007cb028b61c22e3d1abd1255fa06d *man/from_zelig_model.Rd 0e2115d8a5e2bf275e88cd0b1bb47711 *man/get_pvalue.Rd 776322d5d31b903b0c957b8865bdd816 *man/get_qi.Rd 08ddb445a5fed950e829c554cbc6b0df *man/get_se.Rd 1f77e073ad9ed30b57064d284fe0f2a6 *man/grunfeld.Rd 2c288905c76033d24c8f7f57b0d65d40 *man/hoff.Rd e0617f81284fe79641536006f3194c57 *man/homerun.Rd 20131069ca801fde8baa331de4b7657e *man/immigration.Rd ada18b99b51f2fe1f05d21bb4467ea94 *man/is_length_not_1.Rd f5886747cb45ffbb208e1a3248a7e923 *man/is_sims_present.Rd 2d32186d242f5154fec6e14ac0b2fe9b *man/is_simsrange.Rd 43daaa8a74c93abffaee91f00851d080 *man/is_simsrange1.Rd 5da0e5bb64d08e3e2013c6c7a740546f *man/is_simsx.Rd 930e1e4dcde7e92157b9d1a72e87b583 *man/is_simsx1.Rd 595dfa8399d64f845e410b12a2930760 *man/is_timeseries.Rd e677acaa7e8a630be72cc43dcda4ec85 *man/is_uninitializedField.Rd 7f7e865ed883582c81773c4ca0f53320 *man/is_varying.Rd f33eb280f46d0812bf91341ade56cfb1 *man/is_zelig.Rd 299de94089823a1f143fcfbcdfa87dd0 *man/is_zeligei.Rd 81c4ba627b9e0c72a52277a18b8baa7a *man/klein.Rd e01f00d574aa52df6ae5c03e836c79b3 *man/kmenta.Rd 58bda9cf87e4f5c413a73aedc14bb159 *man/macro.Rd f9c9396da5c2e9ab849dd470df38c0f5 *man/mexico.Rd cf4104be98d25488ab2e01af44917568 *man/mi.Rd 8c578fbc0e4ecb684033111f6db818ff *man/mid.Rd b09e390b8374144b4b96d4a599330bd4 *man/model_lookup_df.Rd 947f09347bdd1fdb48460117bc19810a *man/names-Zelig-method.Rd d7905236f8793559d3c452facbc3ea4c *man/newpainters.Rd f7416f61d8414811598c4c18bc285000 *man/or_summary.Rd d5e28f4b5801a4b36e5e9d63fbe791b8 *man/p_pull.Rd 62de38b0e8b179c8644af13e227c2d31 *man/plot-Zelig-ANY-method.Rd 5b3b10fd93508b8736b50956f33349a0 *man/predict-Zelig-method.Rd 9c13154f9c4762ef3394e3e15579357f *man/qi.plot.Rd 028f7d8aaf133b1482c5d274214b108b *man/qi_slimmer.Rd 9124537c50e8b70e2c60136fc547f3c4 *man/reduce.Rd 8d1ba087e7cc285397276c1f9c2347a2 *man/relogit.Rd 83f2b4b3932ef63984933d7930a65f90 *man/residuals-Zelig-method.Rd d969ca33e40835b6fd445d624d38b6d6 *man/rm_intercept.Rd 01c04da4f501cd95b1b0baf18056151b *man/rocplot.Rd 685e8fe4738e2aad2ad73d7f2388570b *man/sanction.Rd c3d7c70bb4ef08c0dbd66590a1b3bca4 *man/se_pull.Rd 3a3cf6aabdba4eda08f28d587e164135 *man/seatshare.Rd 6c13acd515be6c74d95ba6f67fceb57e *man/setfactor.Rd e707b0dfbf6163bb6bca159eb730846a *man/setval.Rd 07231854f1db8f76daaaf6e06fc31857 *man/setx.Rd b4644ea355b1fbe38520c1c0044df587 *man/setx1.Rd 1bc9563bee0d9491fdf02fe83d09faa0 *man/sim.Rd cc1db75dab734792f30267dd4519ff63 *man/simacf.Rd 89b3b0b1cbadd5bd66fb30f972d25c17 *man/simulations.plot.Rd 1eab2cf2e0c82ea67d16c8ad05571a9c *man/sna.ex.Rd b1b3ef3ff457b8c6a67840961ce3c6a2 *man/stat.Rd 3b657ac6dfd76e1a9512d28ed3e90a47 *man/statlevel.Rd 4c74eaf4e19bdee82fc01de007681ebf *man/statmat.Rd ec8e4d4d9927610ef656bdfa8c7ae92d *man/strip_package_name.Rd 2efcb14e9cd08fea74b74b937b760016 *man/summary-Zelig-method.Rd c584f7a73ce8ce6e8913efc263435e93 *man/summary.Arima.Rd ca14c12e0087b1815d741b09dba0f5cc *man/swiss.Rd c7f0c57e8ad57b4e6d38ebb815cba9d2 *man/table.levels.Rd d012037d71e3dbd7182d498781091eed *man/to_zelig.Rd d878a8714cf3efcd22ea687fd1037989 *man/to_zelig_mi.Rd a75e0696550ade6ffe2e44144e98d75b *man/tobin.Rd 22a97549418c1978fcf9ea3c509e590a *man/transformer.Rd f7b42178326db13f916c540e911d3864 *man/turnout.Rd 9ffff31fe00b731244b513ffff7fa0aa *man/vcov-Zelig-method.Rd 7db11c580fca316818486d75881e1b73 *man/vcov_gee.Rd 302f94e3f043246539af278a87b2bf68 *man/vcov_rq.Rd 1dfd6a84e8fa3ab76b771b5e5dbce886 *man/voteincome.Rd fc283853003b14de787de5fbe28bf673 *man/zelig.Rd 6571c6e5e3b473327786e118470ac298 *man/zeligACFplot.Rd d0729990a9325ec0cc40e46be0e28bf1 *man/zeligARMAbreakforecaster.Rd 33aacb17c004b260ea9690ca596b9b72 *man/zeligARMAlongrun.Rd e61803a9e7584c3977f6a2d9d4d5e3a7 *man/zeligARMAnextstep.Rd 733a942acdfc526ab88cba0de3cca53f *man/zeligArimaWrapper.Rd 8a7e7ffaf2edd383e3076402c456a26d *man/zelig_mutate.Rd bb36ffe0cc1f23e27d7d5ebf3f452df2 *man/zelig_qi_to_df.Rd fca90c07adc91e4a81adf8202ded266c *man/zelig_setx_to_df.Rd 06970f3d00b4e44cd88cc286a1669191 *tests/testthat.R 33bbc413841f9c2441a339e50ac8e9e1 *tests/testthat/test-amelia.R 39e9e8bc865e139e0265154336cb2ba5 *tests/testthat/test-arima.R de67b02afc8f07c05cbe608b027d6c0f *tests/testthat/test-assertions.R 7a4d0e0a06f8787b721c4266aad8cd94 *tests/testthat/test-bayesdiagnostics.R 152bd88b896ddbdfb62e62fbe1a4da0b *tests/testthat/test-createJSON.R 3cdebc4d9ae6a1a8f24edb4cb649daad *tests/testthat/test-exp.R 2d8ae19a7d1775c15ca897f925310957 *tests/testthat/test-gamma.R e8c6a3549de6c20ba6bbb74ce07e749b *tests/testthat/test-gammasurvey.R db15e482d4b854bc42897f7f420d4f0f *tests/testthat/test-interface.R b4f59c7831c39c44d506ed1515fd47a9 *tests/testthat/test-ivreg.R b40bebb72f2c4b1b6d89f40baa277a73 *tests/testthat/test-logit.R 796b15cf3454e7dba342aab3ce815382 *tests/testthat/test-logitbayes.R cc897ac33adbf2c3946908e29e940812 *tests/testthat/test-logitsurvey.R e61d50bac858ac865638fce2d3368e2c *tests/testthat/test-lognom.R 940f9d6cb91f072636128c2b2537a7ae *tests/testthat/test-ls.R 2d9db560eee83d1fdbab678704439e21 *tests/testthat/test-matchit.R 2ef00fc9d4a5fc5e0d980c369ce977f5 *tests/testthat/test-negbin.R 0cd1256d366d5773334797fe9ca04ce9 *tests/testthat/test-normal-gee.R 6d982c141b7885e04834e3d18cbe9914 *tests/testthat/test-normal.R b2d000230446e73b1dbb9bdaacc345c7 *tests/testthat/test-normalbayes.R 83c1e350ac708f2ff92b3bf8698164f2 *tests/testthat/test-normalsurvey.R cbb8c38f79965b45f6e081d19f8b93d1 *tests/testthat/test-plots.R ceb0a2447b517bdf4db850bd4bead147 *tests/testthat/test-poisson.R 80f9a6b03ff3d65593684c6a48327637 *tests/testthat/test-poissonbayes.R 53342ae909c0dd222e349a811b26deb4 *tests/testthat/test-poissonsurvey.R af5d9e5678536a97b15c8696bf9e32e4 *tests/testthat/test-probit.R 7253a8926dbea18251ee585d4e597588 *tests/testthat/test-probitbayes.R f2b7651530116ab28c1db1d695959e16 *tests/testthat/test-probitsurvey.R 23a9905bc7b09bdd931f727fbc7b581c *tests/testthat/test-qislimmer.R 563035d9a4d1cebe6a72437bc661d201 *tests/testthat/test-quantile.R e3891132bf0287999de91297f4e36f6a *tests/testthat/test-relogit.R 7c04fbe9a2b464b5623eb2b2e4652dbb *tests/testthat/test-survey.R 99190c093bc2b35dd3362eb57140d777 *tests/testthat/test-tobit.R e8b1d1f6618b931ad4c7b1510b952ad2 *tests/testthat/test-tobitbayes.R e1219abb83f991cfb30440c89af46762 *tests/testthat/test-utils.R 5899f0b0f78d3d0d6465caaacb025388 *tests/testthat/test-weibull.R d1cd3bd62d9bf4e8935d35ea3b2a45ac *tests/testthat/test-weights.R 590f47b47c83e232881268465b2545b2 *tests/testthat/test-wrappers.R e18d243a2c79411ebc4ec9d4dacc40c0 *tests/testthat/test-zelig.R Zelig/inst/0000755000176200001440000000000013764471414012314 5ustar liggesusersZelig/inst/CITATION0000644000176200001440000000251213764471414013451 0ustar liggesuserscitHeader("To cite Zelig in publications please use:") if(!exists("meta") || is.null(meta)) meta <- packageDescription("Zelig") year <- sub(".*(2[[:digit:]]{3})-.*", "\\1", meta$Date) vers <- paste("Version", meta$Version) bibentry( bibtype="Manual", title = "Zelig: Everyone's Statistical Software", author = c( person("Christine", "Choirat", email="cchoirat@iq.harvard.edu", role = "aut"), person("James", "Honaker", email="jhonaker@iq.harvard.edu", role = "aut"), person("Kosuke", "Imai", role = "aut"), person("Gary", "King", role = "aut"), person("Olivia", "Lau", role = "aut") ), year = year, note = vers, url = "https://zeligproject.org/") bibentry( bibtype="Article", title = "Toward A Common Framework for Statistical Analysis and Development", author = c( person("Kosuke", "Imai"), person("Gary", "King"), person("Olivia", "Lau") ), journal = "Journal of Computational Graphics and Statistics", volume = 17, number = 4, year = 2008, pages = "892-913", url = "https://gking.harvard.edu/files/abs/z-abs.shtml") Zelig/inst/JSON/0000755000176200001440000000000013754260262013061 5ustar liggesusersZelig/inst/JSON/zelig5models.json0000644000176200001440000004065313754260262016367 0ustar liggesusers{ "zelig5models": { "ls": { "name": ["ls"], "description": ["Least Squares Regression for Continuous Dependent Variables"], "outcome": { "modelingType": ["continous"] }, "explanatory": { "modelingType": ["continuous", "discrete", "nominal", "ordinal", "binary"] }, "vignette.url": ["http://docs.zeligproject.org/articles/zelig_ls.html"], "wrapper": ["ls"], "tree": ["Zelig-ls"] }, "ivreg": { "name": ["ivreg"], "description": ["Instrumental-Variable Regression"], "outcome": { "modelingType": ["continous"] }, "explanatory": { "modelingType": ["continuous", "discrete", "nominal", "ordinal", "binary"] }, "vignette.url": ["http://docs.zeligproject.org/articles/zelig_ivreg.html"], "wrapper": ["ivreg"], "tree": ["Zelig-ivreg"] }, "logit": { "name": ["logit"], "description": ["Logistic Regression for Dichotomous Dependent Variables"], "outcome": { "modelingType": ["binary"] }, "explanatory": { "modelingType": ["continuous", "discrete", "nominal", "ordinal", "binary"] }, "vignette.url": ["http://docs.zeligproject.org/articles/zelig_logit.html"], "wrapper": ["logit"], "tree": ["Zelig-logit", "Zelig-binchoice", "Zelig-glm"] }, "probit": { "name": ["probit"], "description": ["Probit Regression for Dichotomous Dependent Variables"], "outcome": { "modelingType": ["binary"] }, "explanatory": { "modelingType": ["continuous", "discrete", "nominal", "ordinal", "binary"] }, "vignette.url": ["http://docs.zeligproject.org/articles/zelig_probit.html"], "wrapper": ["probit"], "tree": ["Zelig-probit", "Zelig-binchoice", "Zelig-glm"] }, "poisson": { "name": ["poisson"], "description": ["Poisson Regression for Event Count Dependent Variables"], "outcome": { "modelingType": ["discrete"] }, "explanatory": { "modelingType": ["continuous", "discrete", "nominal", "ordinal", "binary"] }, "vignette.url": ["http://docs.zeligproject.org/articles/zelig_poisson.html"], "wrapper": ["poisson"], "tree": ["Zelig-poisson", "Zelig-glm"] }, "normal": { "name": ["normal"], "description": ["Normal Regression for Continuous Dependent Variables"], "outcome": { "modelingType": ["continuous"] }, "explanatory": { "modelingType": ["continuous", "discrete", "nominal", "ordinal", "binary"] }, "vignette.url": ["http://docs.zeligproject.org/articles/zelig_normal.html"], "wrapper": ["normal"], "tree": ["Zelig-normal", "Zelig-glm"] }, "gamma": { "name": ["gamma"], "description": ["Gamma Regression for Continuous, Positive Dependent Variables"], "outcome": { "modelingType": ["continous"] }, "explanatory": { "modelingType": ["continuous", "discrete", "nominal", "ordinal", "binary"] }, "vignette.url": ["http://docs.zeligproject.org/articles/zelig_gamma.html"], "wrapper": ["gamma"], "tree": ["Zelig-gamma", "Zelig-glm"] }, "negbin": { "name": ["negbin"], "description": ["Negative Binomial Regression for Event Count Dependent Variables"], "outcome": { "modelingType": ["discrete"] }, "explanatory": { "modelingType": ["continuous", "discrete", "nominal", "ordinal", "binary"] }, "vignette.url": ["http://docs.zeligproject.org/articles/zelig_negbin.html"], "wrapper": ["negbin"], "tree": ["Zelig-negbin"] }, "exp": { "name": ["exp"], "description": ["Exponential Regression for Duration Dependent Variables"], "outcome": { "modelingType": ["continous"] }, "explanatory": { "modelingType": ["continuous", "discrete", "nominal", "ordinal", "binary"] }, "vignette.url": ["http://docs.zeligproject.org/articles/zelig_exp.html"], "wrapper": ["exp"], "tree": ["Zelig-exp"] }, "lognorm": { "name": ["lognorm"], "description": ["Log-Normal Regression for Duration Dependent Variables"], "outcome": { "modelingType": ["discrete"] }, "explanatory": { "modelingType": ["continuous", "discrete", "nominal", "ordinal", "binary"] }, "vignette.url": ["http://docs.zeligproject.org/articles/zelig_lognorm.html"], "wrapper": ["lognorm"], "tree": ["Zelig-lognorm"] }, "tobit": { "name": ["tobit"], "description": ["Linear regression for Left-Censored Dependent Variable"], "outcome": { "modelingType": ["continous"] }, "explanatory": { "modelingType": ["continuous", "discrete", "nominal", "ordinal", "binary"] }, "vignette.url": ["http://docs.zeligproject.org/articles/zelig_tobit.html"], "wrapper": ["tobit"], "tree": ["Zelig-tobit"] }, "quantile": { "name": ["quantile"], "description": ["Quantile Regression for Continuous Dependent Variables"], "outcome": { "modelingType": ["continuous"] }, "explanatory": { "modelingType": ["continuous", "discrete", "nominal", "ordinal", "binary"] }, "vignette.url": ["http://docs.zeligproject.org/articles/zelig_quantile.html"], "wrapper": ["rq"], "tree": ["Zelig-quantile"] }, "relogit": { "name": ["relogit"], "description": ["Rare Events Logistic Regression for Dichotomous Dependent Variables"], "outcome": { "modelingType": [""] }, "explanatory": { "modelingType": ["continuous", "discrete", "nominal", "ordinal", "binary"] }, "vignette.url": ["http://docs.zeligproject.org/articles/zelig_relogit.html"], "wrapper": ["relogit"], "tree": ["Zelig-relogit"] }, "logitgee": { "name": ["logit-gee"], "description": ["General Estimating Equation for Logistic Regression"], "outcome": { "modelingType": [""] }, "explanatory": { "modelingType": ["continuous", "discrete", "nominal", "ordinal", "binary"] }, "vignette.url": ["http://docs.zeligproject.org/articles/zelig_logitgee.html"], "wrapper": ["logit.gee"], "tree": ["Zelig-logit-gee", "Zelig-binchoice-gee", "Zelig-gee", "Zelig-binchoice"] }, "probitgee": { "name": ["probit-gee"], "description": ["General Estimating Equation for Probit Regression"], "outcome": { "modelingType": [""] }, "explanatory": { "modelingType": ["continuous", "discrete", "nominal", "ordinal", "binary"] }, "vignette.url": ["http://docs.zeligproject.org/articles/zelig_probitgee.html"], "wrapper": ["probit.gee"], "tree": ["Zelig-probit-gee", "Zelig-binchoice-gee", "Zelig-gee", "Zelig-binchoice"] }, "gammagee": { "name": ["gamma-gee"], "description": ["General Estimating Equation for Gamma Regression"], "outcome": { "modelingType": [""] }, "explanatory": { "modelingType": ["continuous", "discrete", "nominal", "ordinal", "binary"] }, "vignette.url": ["http://docs.zeligproject.org/articles/zelig_gammagee.html"], "wrapper": ["gamma.gee"], "tree": ["Zelig-gamma-gee", "Zelig-gee", "Zelig-gamma"] }, "normalgee": { "name": ["normal-gee"], "description": ["General Estimating Equation for Normal Regression"], "outcome": { "modelingType": [""] }, "explanatory": { "modelingType": ["continuous", "discrete", "nominal", "ordinal", "binary"] }, "vignette.url": ["http://docs.zeligproject.org/articles/zelig_normalgee.html"], "wrapper": ["normal.gee"], "tree": ["Zelig-normal-gee", "Zelig-gee", "Zelig-normal"] }, "poissongee": { "name": ["poisson-gee"], "description": ["General Estimating Equation for Poisson Regression"], "outcome": { "modelingType": [""] }, "explanatory": { "modelingType": ["continuous", "discrete", "nominal", "ordinal", "binary"] }, "vignette.url": ["http://docs.zeligproject.org/articles/zelig_poissongee.html"], "wrapper": ["poisson.gee"], "tree": ["Zelig-poisson-gee", "Zelig-gee", "Zelig-poisson"] }, "factorbayes": { "name": ["factor-bayes"], "description": ["Bayesian Factor Analysis"], "outcome": { "modelingType": [""] }, "explanatory": { "modelingType": ["continuous", "discrete", "nominal", "ordinal", "binary"] }, "vignette.url": ["http://docs.zeligproject.org/articles/zelig_factorbayes.html"], "wrapper": ["factor.bayes"], "tree": ["Zelig-factor-bayes"] }, "logitbayes": { "name": ["logit-bayes"], "description": ["Bayesian Logistic Regression for Dichotomous Dependent Variables"], "outcome": { "modelingType": [""] }, "explanatory": { "modelingType": ["continuous", "discrete", "nominal", "ordinal", "binary"] }, "vignette.url": ["http://docs.zeligproject.org/articles/zelig_logitbayes.html"], "wrapper": ["logit.bayes"], "tree": ["Zelig-logit-bayes", "Zelig-bayes", "Zelig-logit"] }, "mlogitbayes": { "name": ["mlogit-bayes"], "description": ["Bayesian Multinomial Logistic Regression for Dependent Variables with Unordered Categorical Values"], "outcome": { "modelingType": [""] }, "explanatory": { "modelingType": ["continuous", "discrete", "nominal", "ordinal", "binary"] }, "vignette.url": ["http://docs.zeligproject.org/articles/zelig_mlogitbayes.html"], "wrapper": ["mlogit.bayes"], "tree": ["Zelig-mlogit-bayes", "Zelig-bayes"] }, "normalbayes": { "name": ["normal-bayes"], "description": ["Bayesian Normal Linear Regression"], "outcome": { "modelingType": [""] }, "explanatory": { "modelingType": ["continuous", "discrete", "nominal", "ordinal", "binary"] }, "vignette.url": ["http://docs.zeligproject.org/articles/zelig_normalbayes.html"], "wrapper": ["normal.bayes"], "tree": ["Zelig-normal-bayes", "Zelig-bayes", "Zelig-normal"] }, "oprobitbayes": { "name": ["oprobit-bayes"], "description": ["Bayesian Probit Regression for Dichotomous Dependent Variables"], "outcome": { "modelingType": [""] }, "explanatory": { "modelingType": ["continuous", "discrete", "nominal", "ordinal", "binary"] }, "vignette.url": ["http://docs.zeligproject.org/articles/zelig_oprobitbayes.html"], "wrapper": ["oprobit.bayes"], "tree": ["Zelig-oprobit-bayes", "Zelig-bayes"] }, "poissonbayes": { "name": ["poisson-bayes"], "description": ["Bayesian Poisson Regression"], "outcome": { "modelingType": [""] }, "explanatory": { "modelingType": ["continuous", "discrete", "nominal", "ordinal", "binary"] }, "vignette.url": ["http://docs.zeligproject.org/articles/zelig_poissonbayes.html"], "wrapper": ["poisson.bayes"], "tree": ["Zelig-poisson-bayes", "Zelig-bayes", "Zelig-poisson"] }, "probitbayes": { "name": ["probit-bayes"], "description": ["Bayesian Probit Regression for Dichotomous Dependent Variables"], "outcome": { "modelingType": [""] }, "explanatory": { "modelingType": ["continuous", "discrete", "nominal", "ordinal", "binary"] }, "vignette.url": ["http://docs.zeligproject.org/articles/zelig_probitbayes.html"], "wrapper": ["probit.bayes"], "tree": ["Zelig-probit-bayes", "Zelig-bayes", "Zelig-probit"] }, "tobitbayes": { "name": ["tobit-bayes"], "description": ["Bayesian Tobit Regression for a Censored Dependent Variable"], "outcome": { "modelingType": [""] }, "explanatory": { "modelingType": ["continuous", "discrete", "nominal", "ordinal", "binary"] }, "vignette.url": ["http://docs.zeligproject.org/articles/zelig_tobitbayes.html"], "wrapper": ["tobit.bayes"], "tree": ["Zelig-tobit-bayes", "Zelig-bayes", "Zelig-tobit"] }, "weibull": { "name": ["weibull"], "description": ["Weibull Regression for Duration Dependent Variables"], "outcome": { "modelingType": ["bounded"] }, "explanatory": { "modelingType": ["continuous", "discrete", "nominal", "ordinal", "binary"] }, "vignette.url": ["http://docs.zeligproject.org/articles/zelig_weibull.html"], "wrapper": ["weibull"], "tree": ["Zelig-weibull"] }, "logitsurvey": { "name": ["logit-survey"], "description": ["Logistic Regression with Survey Weights"], "outcome": { "modelingType": [""] }, "explanatory": { "modelingType": ["continuous", "discrete", "nominal", "ordinal", "binary"] }, "vignette.url": ["http://docs.zeligproject.org/articles/zelig_logit-survey.html"], "wrapper": ["logit.survey"], "tree": ["Zelig-logit-survey", "Zelig-binchoice-survey", "Zelig-survey", "Zelig-binchoice"] }, "probitsurvey": { "name": ["probit-survey"], "description": ["Probit Regression with Survey Weights"], "outcome": { "modelingType": [""] }, "explanatory": { "modelingType": ["continuous", "discrete", "nominal", "ordinal", "binary"] }, "vignette.url": ["http://docs.zeligproject.org/articles/zelig_probit-survey.html"], "wrapper": ["probit.survey"], "tree": ["Zelig-probit-survey", "Zelig-binchoice-survey", "Zelig-survey", "Zelig-binchoice"] }, "normalsurvey": { "name": ["normal-survey"], "description": ["Normal Regression for Continuous Dependent Variables with Survey Weights"], "outcome": { "modelingType": ["continuous"] }, "explanatory": { "modelingType": ["continuous", "discrete", "nominal", "ordinal", "binary"] }, "vignette.url": ["http://docs.zeligproject.org/articles/zelig_normal-survey.html"], "wrapper": ["normal.survey"], "tree": ["Zelig-normal-survey", "Zelig-survey"] }, "gammasurvey": { "name": ["gamma-survey"], "description": ["Gamma Regression with Survey Weights"], "outcome": { "modelingType": [""] }, "explanatory": { "modelingType": ["continuous", "discrete", "nominal", "ordinal", "binary"] }, "vignette.url": ["http://docs.zeligproject.org/articles/zelig_gamma-survey.html"], "wrapper": ["gamma.survey"], "tree": ["Zelig-gamma-survey", "Zelig-survey", "Zelig-gamma"] }, "poissonsurvey": { "name": ["poisson-survey"], "description": ["Poisson Regression with Survey Weights"], "outcome": { "modelingType": [""] }, "explanatory": { "modelingType": ["continuous", "discrete", "nominal", "ordinal", "binary"] }, "vignette.url": ["http://docs.zeligproject.org/articles/zelig_poisson-survey.html"], "wrapper": ["poisson.survey"], "tree": ["Zelig-poisson-survey", "Zelig-survey", "Zelig-poisson"] }, "arima": { "name": ["arima"], "description": ["Autoregressive Moving-Average Models for Time-Series Data"], "outcome": { "modelingType": ["continuous"] }, "explanatory": { "modelingType": ["continuous", "discrete", "nominal", "ordinal", "binary"] }, "vignette.url": ["http://docs.zeligproject.org/articles/zelig_arima.html"], "wrapper": ["arima"], "tree": ["Zelig-arima", "Zelig-timeseries"] }, "ma": { "name": ["ma"], "description": ["Time-Series Model with Moving Average"], "outcome": { "modelingType": ["continuous"] }, "explanatory": { "modelingType": ["continuous", "discrete", "nominal", "ordinal", "binary"] }, "vignette.url": ["http://docs.zeligproject.org/articles/zelig_ma.html"], "wrapper": ["ma"], "tree": ["Zelig-ma", "Zelig-timeseries"] }, "ar": { "name": ["ar"], "description": ["Time-Series Model with Autoregressive Disturbance"], "outcome": { "modelingType": ["continuous"] }, "explanatory": { "modelingType": ["continuous", "discrete", "nominal", "ordinal", "binary"] }, "vignette.url": ["http://docs.zeligproject.org/articles/zelig_ar.html"], "wrapper": ["ar"], "tree": ["Zelig-ar", "Zelig-timeseries"] } } }