[r-cran-matchit] 26/45: Import Upstream version 2.4-16

Andreas Tille tille at debian.org
Fri Oct 20 06:17:21 UTC 2017


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository r-cran-matchit.

commit da12eb9daa41283d79b76f4c0235998655ee110b
Author: Andreas Tille <tille at debian.org>
Date:   Fri Oct 20 07:41:06 2017 +0200

    Import Upstream version 2.4-16
---
 DESCRIPTION                |  26 ++++++++++++++------------
 R/distance2mahalanobis.R   |   7 +++----
 R/load.first.R             |   1 -
 R/match.data.R             |   8 +++++++-
 R/matchit.R                |  29 +++++++++++++++++++++++++++--
 R/matchit2cem.R            |   2 +-
 R/matchit2exact.R          |   2 +-
 R/matchit2full.R           |   2 +-
 R/matchit2genetic.R        |   2 +-
 R/matchit2nearest.R        |  19 ++++++++++++++++---
 R/matchit2optimal.R        |   2 +-
 R/matchit2subclass.R       |   2 +-
 R/plot.matchit.R           |   6 ++++++
 R/print.matchit.R          |  10 +---------
 R/summary.matchit.R        |  25 +++++++------------------
 inst/doc/face_off.jpg      | Bin 0 -> 8958 bytes
 inst/doc/index.shtml       |  22 +++++++++-------------
 inst/doc/matchit.log       |  24 ++++++++++++------------
 inst/doc/matchit.pdf       | Bin 661603 -> 662741 bytes
 inst/doc/matchit.tex       |   8 ++++++++
 inst/doc/matchit2zelig.tex |   8 ++++----
 inst/doc/matchitref.tex    |   4 ++++
 man/matchit.Rd             |   1 +
 23 files changed, 125 insertions(+), 85 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index bc7d8e1..9402d8b 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,20 +1,22 @@
 Package: MatchIt
-Version: 2.4-13
-Date: 2009-10-25
+Version: 2.4-16
+Date: 2011-01-08
 Title: MatchIt
-Author: Daniel Ho <daniel.e.ho at gmail.com>,
-        Elizabeth Stuart <stuart at stat.harvard.edu>,
-        Kosuke Imai <kimai at Princeton.Edu>, 
+Author: Daniel Ho <daniel.e.ho at gmail.com>, Elizabeth Stuart
+        <stuart at stat.harvard.edu>, Kosuke Imai <kimai at Princeton.Edu>,
         Gary King <king at harvard.edu>
 Maintainer: Kosuke Imai <kimai at Princeton.Edu>
 Depends: R (>= 2.7), MASS
-Description: MatchIt preprocesses data by selecting approximate matched samples
-  of the treated and control groups with similar covariate
-  distributions, drawing on a large variety of matching methods.
-  After preprocessing data with MatchIt, whatever standard parametric
-  technique one might have used without preprocessing can be used, but
-  the results will be far less model dependent.
+Description: MatchIt preprocesses data by selecting approximate matched
+        samples of the treated and control groups with similar
+        covariate distributions, drawing on a large variety of matching
+        methods. After preprocessing data with MatchIt, whatever
+        standard parametric technique one might have used without
+        preprocessing can be used, but the results will be far less
+        model dependent.
 License: GPL (>= 2)
 URL: http://gking.harvard.edu/matchit/
 Suggests: cem, optmatch, Matching, WhatIf, nnet, rpart, mgcv
-Packaged: 2009-10-25 16:24:22 UTC; rbuild
+Packaged: 2011-01-09 03:10:36 UTC; rbuild
+Repository: CRAN
+Date/Publication: 2011-01-10 07:46:05
diff --git a/R/distance2mahalanobis.R b/R/distance2mahalanobis.R
index 3e20bc0..d0ef2b6 100644
--- a/R/distance2mahalanobis.R
+++ b/R/distance2mahalanobis.R
@@ -1,9 +1,8 @@
 distance2mahalanobis <- function(formula, data, ...) {
   X <- model.matrix(formula, data)
-  # Take intercept column out
-  X <- X[,-1]
-  Sigma <- var(X)
+  ## Placeholder where real work is done on a unit by unit basis
+  distance <- rep(1, nrow(X))
   return(list(model = NULL,
-              distance = mahalanobis(X, colMeans(X), cov(X))))
+              distance = distance))
 }
 
diff --git a/R/load.first.R b/R/load.first.R
index 4d67543..6363283 100644
--- a/R/load.first.R
+++ b/R/load.first.R
@@ -6,5 +6,4 @@
   cat("##  Please refer to http://gking.harvard.edu/matchit for full documentation \n",
       "##  or help.matchit() for help with commands supported by MatchIt.\n##\n",
       sep="")
-  options(digits = 4)
 }
diff --git a/R/match.data.R b/R/match.data.R
index 2228657..0cef1ba 100644
--- a/R/match.data.R
+++ b/R/match.data.R
@@ -1,6 +1,12 @@
 match.data <- function(object, group = "all", distance = "distance",
                        weights = "weights", subclass = "subclass") {
-  data <- eval(object$call$data)
+
+  if (!is.null(object$model)) {
+    env <- attributes(terms(object$model))$.Environment
+  } else {
+    env <- parent.frame()
+  }
+  data <- eval(object$call$data, envir = env)
   treat <- object$treat
   wt <- object$weights
   vars <- names(data)
diff --git a/R/matchit.R b/R/matchit.R
index 2747883..a931192 100644
--- a/R/matchit.R
+++ b/R/matchit.R
@@ -26,6 +26,9 @@ matchit <- function(formula, data, method = "nearest", distance = "logit",
     if (!exists(fn1))
       stop(distance, "not supported.")
   }
+  if (is.numeric(distance)) {
+    	fn1 <- "distance2user"
+  }
   fn2 <- paste("matchit2", method, sep = "")
   if (!exists(fn2))
     stop(method, "not supported.")
@@ -63,9 +66,21 @@ matchit <- function(formula, data, method = "nearest", distance = "logit",
     distance <- out1$distance
   }
 
+  ## full mahalanobis matching
+  if(fn1=="distance2mahalanobis"){
+    is.full.mahalanobis <- TRUE
+  } else {is.full.mahalanobis <- FALSE}
+
   ## matching!
-  out2 <- do.call(fn2, list(treat, X, data, distance=distance, discarded, ...)) 
-  
+  out2 <- do.call(fn2, list(treat, X, data, distance=distance, discarded,
+                            is.full.mahalanobis=is.full.mahalanobis, ...)) 
+
+  ## no distance for full mahalanobis matching
+  if(fn1=="distance2mahalanobis"){
+    distance[1:length(distance)] <- NA
+    class(out2) <- c("matchit.mahalanobis","matchit")
+  } 
+
   ## putting all the results together
   out2$call <- mcall
   out2$model <- out1$model
@@ -76,6 +91,16 @@ matchit <- function(formula, data, method = "nearest", distance = "logit",
   }
   out2$distance <- distance
   out2$discarded <- discarded
+
+  ## basic summary
+  nn <- matrix(0, ncol=2, nrow=4)
+  nn[1,] <- c(sum(out2$treat==0), sum(out2$treat==1))
+  nn[2,] <- c(sum(out2$treat==0 & out2$weights>0), sum(out2$treat==1 & out2$weights>0))
+  nn[3,] <- c(sum(out2$treat==0 & out2$weights==0 & out2$discarded==0), sum(out2$treat==1 & out2$weights==0 & out2$discarded==0))
+  nn[4,] <- c(sum(out2$treat==0 & out2$weights==0 & out2$discarded==1), sum(out2$treat==1 & out2$weights==0 & out2$discarded==1))
+  dimnames(nn) <- list(c("All","Matched","Unmatched","Discarded"),
+                       c("Control","Treated"))
+  out2$nn <- nn
   
   return(out2)
 }
diff --git a/R/matchit2cem.R b/R/matchit2cem.R
index 6b7dee4..3e18ff9 100644
--- a/R/matchit2cem.R
+++ b/R/matchit2cem.R
@@ -8,7 +8,7 @@
 # matrix is returned since matches are not unique within
 # strata. 
 #
-matchit2cem <- function(treat, X, data, distance, discarded,
+matchit2cem <- function(treat, X, data, distance, discarded, is.full.mahalanobis,
                             ratio = 1, verbose = FALSE, k2k.method=NULL, ...) {
 
   
diff --git a/R/matchit2exact.R b/R/matchit2exact.R
index 8ccb445..8480de5 100644
--- a/R/matchit2exact.R
+++ b/R/matchit2exact.R
@@ -1,4 +1,4 @@
-matchit2exact <- function(treat, X, data, distance, discarded, verbose=FALSE, ...){
+matchit2exact <- function(treat, X, data, distance, discarded, is.full.mahalanobis, verbose=FALSE, ...){
 
    if(verbose)
     cat("Exact matching... \n")
diff --git a/R/matchit2full.R b/R/matchit2full.R
index 896c7b9..ff13912 100644
--- a/R/matchit2full.R
+++ b/R/matchit2full.R
@@ -1,4 +1,4 @@
-matchit2full <- function(treat, X, data, distance, discarded,
+matchit2full <- function(treat, X, data, distance, discarded, is.full.mahalanobis,
                          verbose=FALSE, ...) { 
   if (!("optmatch" %in% .packages(all = TRUE)))
     install.packages("optmatch")
diff --git a/R/matchit2genetic.R b/R/matchit2genetic.R
index 1b11283..62fe06b 100644
--- a/R/matchit2genetic.R
+++ b/R/matchit2genetic.R
@@ -1,4 +1,4 @@
-matchit2genetic <- function(treat, X, data, distance, discarded,
+matchit2genetic <- function(treat, X, data, distance, discarded, is.full.mahalanobis,
                             ratio = 1, verbose = FALSE, ...) {
   #if (!("rgenoud" %in% .packages(all = TRUE)))
   #  install.packages("rgenoud")
diff --git a/R/matchit2nearest.R b/R/matchit2nearest.R
index dc873a4..0ef1421 100644
--- a/R/matchit2nearest.R
+++ b/R/matchit2nearest.R
@@ -2,7 +2,8 @@ matchit2nearest <-  function(treat, X, data, distance, discarded,
                              ratio=1, replace = FALSE, m.order = "largest",  
                              caliper = 0, calclosest = FALSE,
                              mahvars = NULL, exact = NULL,
-                             subclass=NULL, verbose=FALSE, sub.by=NULL, ...){  
+                             subclass=NULL, verbose=FALSE, sub.by=NULL,
+                             is.full.mahalanobis,...){  
 
  if(verbose)
     cat("Nearest neighbor matching... \n")
@@ -30,7 +31,19 @@ matchit2nearest <-  function(treat, X, data, distance, discarded,
   #mahvars & caliper
   if (!is.null(mahvars) & caliper[1]==0){
     warning("No caliper size specified for Mahalanobis matching.  Caliper=.25 used.",call. = FALSE);caliper=.25}
-
+ #when mahalanobis distance is used for all covars
+ if(is.full.mahalanobis){
+   mahvars <- X
+   Sigma <- var(X)
+   ## Note: caliper irrelevant, but triggers mahalanobis matching
+   caliper <- .25
+   ## no subclass with full mahalanobis
+   if(!is.null(subclass)){
+     warning("No subclassification with pure Mahalanobis distance.",call. = FALSE)
+     subclass <- NULL
+   }
+ }
+ 
   # Sample sizes, labels
   n <- length(treat)
   n0 <- length(treat[treat==0])
@@ -76,7 +89,7 @@ matchit2nearest <-  function(treat, X, data, distance, discarded,
   sd.cal <- caliper*sqrt(var(distance[in.sample==1]))
   
   ## Var-covar matrix for Mahalanobis (currently set for full sample)
-  if (!is.null(mahvars)) {
+  if (!is.null(mahvars) & !is.full.mahalanobis) {
     if(!sum(mahvars%in%names(data))==length(mahvars)) {
 	    warning("Mahvars not contained in data.  Mahalanobis matching not done.",call.=FALSE)
 	    mahvars=NULL
diff --git a/R/matchit2optimal.R b/R/matchit2optimal.R
index 68e27ae..f94652c 100644
--- a/R/matchit2optimal.R
+++ b/R/matchit2optimal.R
@@ -1,4 +1,4 @@
-matchit2optimal <- function(treat, X, data, distance, discarded,
+matchit2optimal <- function(treat, X, data, distance, discarded, is.full.mahalanobis, 
                             ratio = 1, verbose=FALSE, ...) {
 
   if (!("optmatch" %in% .packages(all = TRUE)))
diff --git a/R/matchit2subclass.R b/R/matchit2subclass.R
index 30fea01..fae5fe2 100644
--- a/R/matchit2subclass.R
+++ b/R/matchit2subclass.R
@@ -1,4 +1,4 @@
-matchit2subclass <- function(treat, X, data, distance, discarded,
+matchit2subclass <- function(treat, X, data, distance, discarded, is.full.mahalanobis,
                              match.matrix=NULL, subclass=6, sub.by="treat",
                              verbose = FALSE){
 
diff --git a/R/plot.matchit.R b/R/plot.matchit.R
index 53e1ecb..775502a 100644
--- a/R/plot.matchit.R
+++ b/R/plot.matchit.R
@@ -10,8 +10,14 @@ plot.matchit <- function(x, discrete.cutoff=5, type="QQ",
                    numdraws=numdraws, interactive=interactive,
                    which.xs = which.xs, ...)
   } else if(type=="jitter"){
+    if("matchit.mahalanobis" %in% class(x)){
+      stop("Not appropriate for pure Mahalanobis matching.  No plots generated.")
+    }
     jitter.pscore(x, interactive=interactive,...)
   } else if(type=="hist"){
+    if("matchit.mahalanobis" %in% class(x)){
+      stop("Not appropriate for pure Mahalanobis matching.  No plots generated.")
+    }
     hist.pscore(x,...)
   } else {
     stop("Invalid type")
diff --git a/R/print.matchit.R b/R/print.matchit.R
index 38f2ffb..acc80d9 100644
--- a/R/print.matchit.R
+++ b/R/print.matchit.R
@@ -10,15 +10,7 @@ print.matchit <- function(x, digits = getOption("digits"), ...){
   #  nn <- rbind(table(x$treat),
   #              table(x$weights>0,x$treat)[2:1,])
 
-  nn <- matrix(0, ncol=2, nrow=4)
-  nn[1,] <- c(sum(x$treat==0), sum(x$treat==1))
-  nn[2,] <- c(sum(x$treat==0 & x$weights>0), sum(x$treat==1 & x$weights>0))
-  nn[3,] <- c(sum(x$treat==0 & x$weights==0 & x$discarded==0), sum(x$treat==1 & x$weights==0 & x$discarded==0))
-  nn[4,] <- c(sum(x$treat==0 & x$weights==0 & x$discarded==1), sum(x$treat==1 & x$weights==0 & x$discarded==1))
-
-  dimnames(nn) <- list(c("All","Matched","Unmatched","Discarded"),
-                       c("Control","Treated"))
-  print.table(nn, ...)
+  print.table(x$nn, ...)
   invisible(x)
   cat("\n")
 }
diff --git a/R/summary.matchit.R b/R/summary.matchit.R
index 73d2974..5ca9137 100644
--- a/R/summary.matchit.R
+++ b/R/summary.matchit.R
@@ -13,7 +13,12 @@ summary.matchit <- function(object, interactions = FALSE,
         }
   }
 
-  XX <- cbind(distance=object$distance,X)
+  ## No distance output for pure Mahalanobis
+  if("matchit.mahalanobis"%in%class(object)){
+    XX <- X 
+  } else{
+    XX <- cbind(distance=object$distance,X)
+  }
   if (!is.null(addlvariables)) XX <- cbind(XX, addlvariables)
 
   treat <- object$treat
@@ -69,24 +74,8 @@ summary.matchit <- function(object, interactions = FALSE,
   else
     names(reduction) <- c("Mean Diff.", "eQQ Med","eQQ Mean", "eQQ Max")
     
-  ## Sample sizes
-  nn <- matrix(0, ncol=2, nrow=4)
-  nn[1,] <- c(sum(object$treat==0), sum(object$treat==1))
-  nn[2,] <- c(sum(object$treat==0 & object$weights>0),
-              sum(object$treat==1 & object$weights>0))
-  nn[3,] <- c(sum(object$treat==0 & object$weights==0 & object$discarded==0),
-              sum(object$treat==1 & object$weights==0 & object$discarded==0))
-  nn[4,] <- c(sum(object$treat==0 & object$weights==0 & object$discarded==1),
-              sum(object$treat==1 & object$weights==0 & object$discarded==1))
-
-  dimnames(nn) <- list(c("All","Matched","Unmatched","Discarded"),
-                       c("Control","Treated"))
-
-  #nn <- rbind(table(object$treat),
-  #            table(object$weights!=0,object$treat)[2:1,])
-
   ## output
-  res <- list(call=object$call, nn = nn, sum.all = sum.all,
+  res <- list(call=object$call, nn = object$nn, sum.all = sum.all,
               sum.matched = sum.matched, reduction = reduction)
   class(res) <- "summary.matchit"
   return(res)
diff --git a/inst/doc/face_off.jpg b/inst/doc/face_off.jpg
new file mode 100644
index 0000000..8cf9060
Binary files /dev/null and b/inst/doc/face_off.jpg differ
diff --git a/inst/doc/index.shtml b/inst/doc/index.shtml
index ed50dfd..6fb77bc 100755
--- a/inst/doc/index.shtml
+++ b/inst/doc/index.shtml
@@ -3,9 +3,7 @@
 <title>MatchIt Software Website</title>
 <script language='Javascript' src='/gking.js'></script></HEAD>
 
-<BODY><script language="Javascript">displayHeader()</script>
-
-<h1>MatchIt: Nonparametric Preprocessing for Parametric Causal Inference</h1>
+<BODY><script language="Javascript">displayHeader('MatchIt: Nonparametric Preprocessing for Parametric Causal Inference')</script>
 
 <p><a href="http://people.iq.harvard.edu/~dho/" target="gkingext">Daniel Ho</a>,
 <a href="http://www.princeton.edu/~kimai/" target="gkingext">Kosuke Imai</a>, 
@@ -16,16 +14,14 @@
 work better."
 
 <!-- rbuild: replace 'Version:' '</b>' version -->
-<p><b>Version:2.4-13</b>
+<p><b>Version:2.4-16</b>
 
   <table width="90%" border="0" cellpadding="10">
     <tr>
-	  <td><img src="face_off.jpg"></a></td>
-
-<!-- width="285" height="425"> -->
+	  <td valign='top'><img src="face_off.jpg" width="200"></td>
 
       <td valign="top"><br>MatchIt implements the suggestions of <a
-      href="/files/abs/matchp-abs.shtml">Ho, Imai, King, and Stuart
+      href="http://gking.harvard.edu/files/abs/matchp-abs.shtml">Ho, Imai, King, and Stuart
       (2007)</a> for improving parametric statistical
       models by
       preprocessing data with nonparametric matching methods. MatchIt
@@ -39,11 +35,11 @@ work better."
       substantially more robustness and less sensitivity to modeling
       assumptions. MatchIt is an <a
       href="http://www.r-project.org" target="gkingext">R</a> program, and also works
-      seamlessly with <a href="/zelig/">Zelig</a>.
+      seamlessly with <a href="http://gking.harvard.edu/zelig/">Zelig</a>.
 
 <ul>
-        <li>Documentation: <a href="docs/">HTML</a> or <a
-href="/matchit/docs/matchit.pdf">PDF</a> 
+        <li>Documentation: <a href="http://gking.harvard.edu/matchit/docs/">HTML</a> or <a
+href="http://gking.harvard.edu/matchit/docs/matchit.pdf">PDF</a> 
         <li><a
 href="http://gking.harvard.edu/matchit/docs/Installing_M_SMALL_ATC.html">Installation
 and Downloads</a>
@@ -57,7 +53,7 @@ target="gkingext">Browse/Search Archives</a>
 </ul>
 
 We're pleased to report that the <a
-href="/files/abs/matchp-abs.shtml">article</a> on which MatchIt is
+href="http://gking.harvard.edu/files/abs/matchp-abs.shtml">article</a> on which MatchIt is
 based won the <em>Warren Miller Prize</em> for the best paper in
 <em>Political Analysis</em> that year and, separately, has been named a
     <em>Fast Breaking Paper</em> by Thomson Reuters' ScienceWatch, for
@@ -66,7 +62,7 @@ based won the <em>Warren Miller Prize</em> for the best paper in
     total citations across the social sciences in the last two years.
     (You may be interested in this interview: <a
   href="http://sciencewatch.com/dr/fbp/2008/08octfbp/08octfbpHoET/">HTML</a> |
-    <a href="/files/fbp08.pdf">PDF</a>)
+    <a href="http://gking.harvard.edu/files/fbp08.pdf">PDF</a>)
 
 </td>      
     </tr>
diff --git a/inst/doc/matchit.log b/inst/doc/matchit.log
index 2e80d9f..6ee93e4 100644
--- a/inst/doc/matchit.log
+++ b/inst/doc/matchit.log
@@ -1,4 +1,4 @@
-This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) (format=pdflatex 2009.9.1)  25 OCT 2009 12:23
+This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) (format=pdflatex 2009.9.1)  8 JAN 2011 22:10
 entering extended mode
 **matchit
 (./matchit.tex
@@ -549,14 +549,14 @@ Overfull \hbox (55.12024pt too wide) in paragraph at lines 8--8
 standardize = FALSE, ...)[] 
  []
 
-
+[28]
 Overfull \hbox (6.94044pt too wide) in paragraph at lines 15--20
 \OT1/cmr/m/n/12 and only the co-vari-ates them-selves when \OT1/cmtt/m/n/12 int
 eractions = FALSE\OT1/cmr/m/n/12 , (DE-FAULT = \OT1/cmtt/m/n/12 FALSE\OT1/cmr/m
 /n/12 ). 
  []
 
-[28] [29]
+[29]
 Overfull \hbox (8.04178pt too wide) in paragraph at lines 78--82
 \OT1/cmr/m/n/12 vari-ates $\OML/cmm/m/it/12 X$ \OT1/cmr/m/n/12 and their in-ter
 -ac-tions, where \OT1/cmtt/m/n/12 Means Treated$\OT1/cmr/m/n/12 = \OML/cmm/m/it
@@ -595,14 +595,14 @@ Package hyperref Warning: Token not allowed in a PDFDocEncoded string:
 [37]) [38]
 Chapter 6.
 
-Overfull \hbox (0.1057pt too wide) in paragraph at lines 122--124
+Overfull \hbox (0.1057pt too wide) in paragraph at lines 130--132
 []\OT1/cmr/bx/n/12 2.4-7 \OT1/cmr/m/n/12 (Au-gust 4, 2008): Fixed mi-nor bug in
  sub-clas-si-fi-ca-tion (thanks to Ben Domingue) 
  []
 
 [39
 
-] [40] (./matchit.bbl
+] [40] [41] (./matchit.bbl
 Underfull \hbox (badness 3029) in paragraph at lines 22--25
 []\OT1/cmr/m/n/12 Diamond, A. and Sekhon, J. (2005), ``Ge-netic Match-ing for E
 s-ti-mat-ing Causal
@@ -614,29 +614,29 @@ Underfull \hbox (badness 8189) in paragraph at lines 22--25
 al Stud-ies,''
  []
 
-[41
+[42
 
 
 ])
 
 Package natbib Warning: There were undefined citations.
 
-[42] (./matchit.aux)
+[43] (./matchit.aux)
 
 LaTeX Font Warning: Some font shapes were not available, defaults substituted.
 
  ) 
 Here is how much of TeX's memory you used:
- 4502 strings out of 94500
- 57548 string characters out of 1176767
+ 4503 strings out of 94500
+ 57555 string characters out of 1176767
  114271 words of memory out of 1000000
  7417 multiletter control sequences out of 10000+50000
  19072 words of font info for 74 fonts, out of 500000 for 2000
  580 hyphenation exceptions out of 1000
  34i,11n,41p,920b,349s stack positions out of 1500i,500n,5000p,200000b,5000s
 PDF statistics:
- 724 PDF objects out of 300000
- 152 named destinations out of 131072
+ 728 PDF objects out of 300000
+ 153 named destinations out of 131072
  528 words of extra memory for PDF output out of 65536
 </usr/share/texmf/fonts/type1/bluesky/cm/cmsy6.pfb></usr/share/texmf/fonts/ty
 pe1/bluesky/cm/cmmi6.pfb></usr/share/texmf/fonts/type1/bluesky/cm/cmr6.pfb></us
@@ -650,4 +650,4 @@ xmf/fonts/type1/bluesky/cm/cmtt10.pfb></usr/share/texmf/fonts/type1/bluesky/cm/
 cmr8.pfb></usr/share/texmf/fonts/type1/bluesky/cm/cmr10.pfb></usr/share/texmf/f
 onts/type1/bluesky/cm/cmr12.pfb></usr/share/texmf/fonts/type1/bluesky/cm/cmr17.
 pfb></usr/share/texmf/fonts/type1/bluesky/cm/cmcsc10.pfb>
-Output written on matchit.pdf (43 pages, 661603 bytes).
+Output written on matchit.pdf (44 pages, 662741 bytes).
diff --git a/inst/doc/matchit.pdf b/inst/doc/matchit.pdf
index 297615b..fc4d61a 100644
Binary files a/inst/doc/matchit.pdf and b/inst/doc/matchit.pdf differ
diff --git a/inst/doc/matchit.tex b/inst/doc/matchit.tex
index 2553982..eaffd18 100644
--- a/inst/doc/matchit.tex
+++ b/inst/doc/matchit.tex
@@ -115,6 +115,14 @@ or most simply via \hlink{Zelig}{http://gking.harvard.edu/zelig} in R.
 \chapter{What's New?}
 
 \begin{itemize}
+\item \textbf{2.4-16} (January 8, 2011): a bug fix for user defined distance.
+\item \textbf{2.4-15} (December 11, 2010): a bug fix in the
+  mahalanobis matching.
+\item \textbf{2.4-14} (August 12, 2010): a bug fix in {\tt
+    match.data()} so that it can be called within a function (thanks
+  to Ajay Shah, George Baah, and Ben Dominique); \MatchIt now does not
+  specify digits for printing (thanks to Chris Hane); A summary table
+  of matched data is now stored in the output (thanks to George Baah)
 \item \textbf{2.4-11} (June 25, 2009): More flexible inputs in
   plotting.
 \item \textbf{2.4-10} (February 2, 2009): Minor documentation fixes
diff --git a/inst/doc/matchit2zelig.tex b/inst/doc/matchit2zelig.tex
index ef2f1fc..011e7b2 100644
--- a/inst/doc/matchit2zelig.tex
+++ b/inst/doc/matchit2zelig.tex
@@ -60,14 +60,14 @@ Zelig's other two commands.  Thus, we can set the explanatory
 variables at their means (the default) and change the treatment
 variable from a 0 to a 1:
 \begin{verbatim}
-> x.out0 <- setx(z.out0, treat=0)
-> x1.out0 <- setx(z.out0, treat=1)
+> x.out <- setx(z.out, treat=0)
+> x1.out <- setx(z.out, treat=1)
 \end{verbatim}
 and finally compute the resulting estimates of the causal effects and
 examine a summary:
 \begin{verbatim}
-> s.out0 <- sim(z.out1, x = x.out1)
-> summary(s.out0)
+> s.out <- sim(z.out, x = x.out, x1 = x1.out)
+> summary(s.out)
 \end{verbatim}
 
 \subsection{Examples}
diff --git a/inst/doc/matchitref.tex b/inst/doc/matchitref.tex
index 4f3c30a..c17701a 100644
--- a/inst/doc/matchitref.tex
+++ b/inst/doc/matchitref.tex
@@ -380,6 +380,10 @@ output object contains the following elements:\footnote{When
   measure (the right-hand side of \texttt{formula}).  When applicable,
   \texttt{X} is augmented by covariates contained in \texttt{mahvars}
   and \texttt{exact}.
+
+\item \texttt{nn}: A basic summary table of matched data (e.g., the
+  number of matched units)
+
 \end{itemize}
 
 
diff --git a/man/matchit.Rd b/man/matchit.Rd
index 2e9b0f5..9b47584 100644
--- a/man/matchit.Rd
+++ b/man/matchit.Rd
@@ -137,6 +137,7 @@ represents the square term of \code{x1}. See \code{help(formula)}
     \code{data} (the left-hand side of \code{formula}).}
   \item{X}{The covariates used for estimating the
     distance measure (the right-hand side of \code{formula}).}
+  \item{nn}{A basic summary table of matched data (e.g., the number of matched units)}
 }
 
 \seealso{Please use \code{help.matchit} to access the matchit reference

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/r-cran-matchit.git



More information about the debian-science-commits mailing list