[r-cran-matchit] 12/45: Import Upstream version 2.2-7

Andreas Tille tille at debian.org
Fri Oct 20 06:17:19 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 35c4c7c46494d2f09563994643eac0f09706c407
Author: Andreas Tille <tille at debian.org>
Date:   Fri Oct 20 07:40:53 2017 +0200

    Import Upstream version 2.2-7
---
 DESCRIPTION    | 6 +++---
 R/matchit.R    | 5 +++++
 man/lalonde.Rd | 2 +-
 man/matchit.Rd | 4 ++--
 4 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index b103d41..1c315ca 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,6 +1,6 @@
 Package: MatchIt
-Version: 2.2-5
-Date: 2005-12-07
+Version: 2.2-7
+Date: 2006-04-11
 Title: MatchIt: Nonparametric Preprocessing for Parametric Casual Inference
 Author: Daniel Ho <daniel.e.ho at gmail.com>,
         Kosuke Imai <kimai at Princeton.Edu>, 
@@ -18,4 +18,4 @@ LazyLoad: yes
 LazyData: yes
 License: GPL version 2 or newer
 URL: http://gking.harvard.edu/matchit
-Packaged: Wed Dec  7 09:39:20 2005; kimai
+Packaged: Wed Apr 12 20:25:56 2006; kimai
diff --git a/R/matchit.R b/R/matchit.R
index 3e91ffa..5096285 100644
--- a/R/matchit.R
+++ b/R/matchit.R
@@ -7,6 +7,8 @@ matchit <- function(formula, data, method = "nearest", distance = "logit",
   if(is.null(data)) stop("Dataframe must be specified",call.=FALSE)
   if(!is.data.frame(data)){
     stop("Data must be a dataframe",call.=FALSE)}
+  if(sum(is.na(data))>0)
+    stop("Missing values exist in the data")
   
   ## check inputs
   if (!is.numeric(distance)) {
@@ -44,7 +46,10 @@ matchit <- function(formula, data, method = "nearest", distance = "logit",
     discarded <- discard(treat, out1$distance, discard, X)
     if (reestimate) {
       distance.options$data <- data[!discarded,]
+      tmp <- out1
       out1 <- do.call(fn1, distance.options)
+      tmp$distance[!discarded] <- out1$distance
+      out1$distance <- tmp$distance
     }
     distance <- out1$distance
   }
diff --git a/man/lalonde.Rd b/man/lalonde.Rd
index c086551..1df0821 100644
--- a/man/lalonde.Rd
+++ b/man/lalonde.Rd
@@ -8,7 +8,7 @@ Work Demonstration (NSW) and the comparison sample from the Current Population S
 This data was previously analyzed extensively by Lalonde (1986) and Dehejia and Wahba (1999).  
 The full dataset is available at \url{http://www.columbia.edu/~rd247/nswdata.html}. }
 
-\usage{data(incomedata)}
+\usage{data(lalonde)}
 
 \format{ A data frame with 313 observations (185 treated, 429 control).  There are 10 variables
 measured for each individual.  "treat" is the treatment assignment (1=treated, 0=control).  
diff --git a/man/matchit.Rd b/man/matchit.Rd
index dbba8c6..2d39262 100644
--- a/man/matchit.Rd
+++ b/man/matchit.Rd
@@ -51,8 +51,8 @@ numerically using \code{summary(matchitobject)}.
     must be contained in the same data frame, which is specified as
     \code{data} (see below).  All of the usual R syntax for formula
     works. For example, \code{x1:x2} represents the first order
-    interaction term between \code{x1} and \code{x2}, and \code{I(x1 \^\
-      2)} represents the square term of \code{x1}. See \code{help(formula)}
+    interaction term between \code{x1} and \code{x2}, and \code{I(x1^2)}
+represents the square term of \code{x1}. See \code{help(formula)}
     for details.
   }
   \item{data}{This argument specifies the data frame containing the

-- 
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