[r-cran-eco] 14/30: Import Upstream version 3.1-4

Andreas Tille tille at debian.org
Thu Sep 7 07:20:59 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-eco.

commit d7788af282df69f645e91b4db0b02d2f443c470c
Author: Andreas Tille <tille at debian.org>
Date:   Thu Sep 7 08:59:28 2017 +0200

    Import Upstream version 3.1-4
---
 DESCRIPTION          | 42 ++++++++++++++++++++++--------------------
 NAMESPACE            |  3 ++-
 R/Qfun.R             | 21 +++++++++++++++++++++
 man/Qfun.Rd          | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 man/eco.Rd           |  9 ++++++---
 man/ecoML.Rd         |  9 ++++++---
 man/ecoNP.Rd         |  9 ++++++---
 man/summary.eco.Rd   |  6 ++++--
 man/summary.ecoML.Rd |  7 +++++--
 man/summary.ecoNP.Rd |  6 ++++--
 10 files changed, 124 insertions(+), 36 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index 7e4362d..bb381b8 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,27 +1,29 @@
 Package: eco
-Version: 3.1-2
-Date: 2009-1-29
+Version: 3.1-4
+Date: 2009-07-12
 Title: R Package for Ecological Inference in 2x2 Tables
-Author: Kosuke Imai <kimai at princeton.edu>,
-        Ying Lu <ying.lu at colorado.edu>,
-	Aaron Strauss <abstraus at Princeton.EDU>.
-Maintainer: Ying Lu <ying.lu at colorado.edu>
+Author: Kosuke Imai <kimai at princeton.edu>, Ying Lu <yl46 at nyu.edu>,
+        Aaron Strauss <abstraus at Princeton.EDU>.
+Maintainer: Ying Lu <yl46 at nyu.edu>
 Depends: R (>= 2.0), MASS
 Description: eco is a publicly available R package that implements the
-  Bayesian and likelihood methods proposed in Imai, Lu, and Strauss 
-  (2008) for ecological inference in $2 \times 2$ tables as
-  well as the method of bounds introduced by Duncan and Davis (1953). 
-  The package fits both parametric and nonparametric models using 
-  either the Expectation-Maximization algorithms (for likelihood
-  models) or the Markov chain Monte Carlo algorithms (for Bayesian 
-  models).  For all models, the individual-level data can be directly 
-  incorporated into the estimation whenever such data are available. 
-  Along with in-sample and out-of-sample predictions, the package also 
-  provides a functionality which allows one to quantify the effect of data
-  aggregation on parameter estimation and hypothesis testing under the
-  parametric likelihood models.
+        Bayesian and likelihood methods proposed in Imai, Lu, and
+        Strauss (2008) for ecological inference in $2 \times 2$ tables
+        as well as the method of bounds introduced by Duncan and Davis
+        (1953). The package fits both parametric and nonparametric
+        models using either the Expectation-Maximization algorithms
+        (for likelihood models) or the Markov chain Monte Carlo
+        algorithms (for Bayesian models).  For all models, the
+        individual-level data can be directly incorporated into the
+        estimation whenever such data are available. Along with
+        in-sample and out-of-sample predictions, the package also
+        provides a functionality which allows one to quantify the
+        effect of data aggregation on parameter estimation and
+        hypothesis testing under the parametric likelihood models.
 LazyLoad: yes
 LazyData: yes
 License: GPL (>= 2)
-URL: http://imai.princeton.edu/research/eco.html
-Packaged: Fri Jan 30 21:40:39 2009; kimai
+URL: http://imai.princeton.edu/software/eco.html
+Packaged: 2009-07-13 01:26:09 UTC; ying
+Repository: CRAN
+Date/Publication: 2009-07-18 15:41:13
diff --git a/NAMESPACE b/NAMESPACE
index 501ff0f..3911b0d 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -15,7 +15,8 @@ export(eco,
        predict.eco,
        predict.ecoX,
        predict.ecoNP,
-       predict.ecoNPX)
+       predict.ecoNPX,
+       Qfun)
 
 S3method(varcov, eco)
 S3method(varcov, ecoNP)
diff --git a/R/Qfun.R b/R/Qfun.R
new file mode 100644
index 0000000..a6905ab
--- /dev/null
+++ b/R/Qfun.R
@@ -0,0 +1,21 @@
+Qfun <- function(theta, suff.stat, n) {
+  mu<-rep(0,2)
+  Sigma<-matrix(0, 2,2)
+  Suff1<-rep(0,2)
+  Suff2<-matrix(0,2,2)
+  
+  mu <- theta[1:2]
+  Sigma[1,1]<-theta[3]
+  Sigma[2,2]<-theta[4]
+  Sigma[1,2]<-Sigma[2,1]<-theta[5]*sqrt(Sigma[1,1]*Sigma[2,2])
+
+  Suff1 <- n*suff.stat[1:2]
+  Suff2[1,1]<-n*suff.stat[3]
+  Suff2[2,2]<-n*suff.stat[4]
+  Suff2[1,2]<-n*suff.stat[5]
+ 
+  invSigma<-solve(Sigma)
+
+  return(-0.5*n*log(det(Sigma))-0.5*sum(diag(invSigma%*%(Suff2-mu%*%t(Suff1)-Suff1%*%t(mu)+n*mu%*%t(mu)))))
+
+}
diff --git a/man/Qfun.Rd b/man/Qfun.Rd
new file mode 100644
index 0000000..34255d9
--- /dev/null
+++ b/man/Qfun.Rd
@@ -0,0 +1,48 @@
+\name{Qfun}
+
+\alias{Qfun}
+
+\title{Fitting the Parametric Bayesian Model of Ecological Inference in
+  2x2 Tables}
+
+\description{ 
+  \code{Qfun} returns the complete log-likelihood 
+that is used to calculate the fraction of missing information.}
+
+\usage{
+Qfun(theta, suff.stat, n)
+}
+
+\arguments{
+  \item{theta}{A vector that contains the MLE \eqn{E(W_1)},\eqn{E(W_2)},
+    \eqn{var(W_1)},\eqn{var(W_2)}, and \eqn{cov(W_1,W_2)}. Typically it is
+the element \code{theta.em} of an object of class \code{ecoML}.}
+  \item{suff.stat}{A vector of sufficient statistics of \eqn{E(W_1)},
+\eqn{E(W_2)}, \eqn{var(W_1)},\eqn{var(W_2)}, and \eqn{cov(W_1,W_2)}.}
+\item{n}{A integer representing the sample size.}
+}
+\author{
+  Kosuke Imai, Department of Politics, Princeton University,
+  \email{kimai at Princeton.Edu}, \url{http://imai.princeton.edu};
+  Ying Lu, Department of Humanities and Social Sciences in the 
+Professions, Steinhardt School of Culture, Education and Human 
+Development, New York University, 
+  \email{yl46 at Nyu.Edu}
+  Aaron Strauss, Department of Politics, Princeton University,
+ \email{abstraus at Princeton.Edu}.
+  }
+
+  \references{
+  Imai, Kosuke, Ying Lu and Aaron Strauss. (Forthcoming).
+  \dQuote{eco: R Package for Ecological Inference in 2x2 Tables}
+  Journal of Statistical Software, available at
+  \url{http://imai.princeton.edu/research/eco.html}
+
+  Imai, Kosuke, Ying Lu and Aaron Strauss. (2008). \dQuote{Bayesian and
+    Likelihood Inference for 2 x 2 Ecological Tables: An Incomplete Data
+    Approach} Political Analysis, Vol. 16, No. 1 (Winter), pp. 41-69. available at 
+  \url{http://imai.princeton.edu/research/eiall.html}
+}
+
+\seealso{\code{ecoML}}
+\keyword{models}
diff --git a/man/eco.Rd b/man/eco.Rd
index b2926d8..edc0b27 100644
--- a/man/eco.Rd
+++ b/man/eco.Rd
@@ -34,7 +34,8 @@ eco(formula, data = parent.frame(), N = NULL, supplement = NULL,
     \code{eco} is called. 
   }
   \item{N}{An optional variable representing the size of the unit; e.g.,
-    the total number of voters.}
+    the total number of voters. \code{N} needs to be a vector of same length 
+    as \code{Y} and \code{X} or a scalar. }
   \item{supplement}{An optional matrix of supplemental data. The matrix
     has two columns, which contain additional individual-level data such
     as survey data for \eqn{W_1} and \eqn{W_2}, respectively.  If
@@ -200,8 +201,10 @@ summary(out1)
 \author{
   Kosuke Imai, Department of Politics, Princeton University,
   \email{kimai at Princeton.Edu}, \url{http://imai.princeton.edu};
-  Ying Lu, Department of Sociology, University of Colorado at Boulder, 
-  \email{ying.lu at Colorado.Edu}
+  Ying Lu, Department of Humanities and Social Sciences in the 
+Professions, Steinhardt School of Culture, Education and Human 
+Development, New York University, 
+  \email{yl46 at Nyu.Edu}
   }
 
   \references{
diff --git a/man/ecoML.Rd b/man/ecoML.Rd
index f4c2b10..eae5fed 100644
--- a/man/ecoML.Rd
+++ b/man/ecoML.Rd
@@ -40,7 +40,8 @@
     \code{ecoML} is called. 
   }
   \item{N}{An optional variable representing the size of the unit; e.g.,
-    the total number of voters.
+    the total number of voters.  \code{N} needs to be a vector of same length 
+    as \code{Y} and \code{X} or a scalar.
   }
   \item{supplement}{An optional matrix of supplemental data. The matrix
     has two columns, which contain additional individual-level data such
@@ -229,8 +230,10 @@ surv <- 1:600
 \author{
   Kosuke Imai, Department of Politics, Princeton University,
   \email{kimai at Princeton.Edu}, \url{http://imai.princeton.edu};
-  Ying Lu, Department of Sociology, University of Colorado at Boulder, 
-  \email{ying.lu at Colorado.Edu};
+ Ying Lu, Department of Humanities and Social Sciences in the
+Professions, Steinhardt School of Culture, Education and Human
+Development, New York University,
+  \email{yl46 at Nyu.Edu};
   Aaron Strauss, Department of Politics, Princeton University,
  \email{abstraus at Princeton.Edu}.
 }
diff --git a/man/ecoNP.Rd b/man/ecoNP.Rd
index 43a400d..b390f96 100644
--- a/man/ecoNP.Rd
+++ b/man/ecoNP.Rd
@@ -35,7 +35,8 @@ ecoNP(formula, data = parent.frame(), N = NULL, supplement = NULL,
     \code{ecoNP} is called. 
   }  
   \item{N}{An optional variable representing the size of the unit; e.g.,
-    the total number of voters.}
+    the total number of voters. \code{N} needs to be a vector of same length 
+    as \code{Y} and \code{X} or a scalar.}
   \item{supplement}{An optional matrix of supplemental data. The matrix
     has two columns, which contain additional individual-level data such
     as survey data for \eqn{W_1} and \eqn{W_2}, respectively.  If
@@ -196,8 +197,10 @@ summary(pres1)
 \author{
   Kosuke Imai, Department of Politics, Princeton University,
   \email{kimai at Princeton.Edu}, \url{http://imai.princeton.edu};
-  Ying Lu, Department of Sociology, University of Colorado at Boulder, 
-  \email{ying.lu at Colorado.Edu}
+ Ying Lu, Department of Humanities and Social Sciences in the
+Professions, Steinhardt School of Culture, Education and Human
+Development, New York University,
+  \email{yl46 at Nyu.Edu}
 }
 
 \references{
diff --git a/man/summary.eco.Rd b/man/summary.eco.Rd
index 4df760e..42c9ecc 100644
--- a/man/summary.eco.Rd
+++ b/man/summary.eco.Rd
@@ -66,8 +66,10 @@
 \author{
   Kosuke Imai, Department of Politics, Princeton University,
   \email{kimai at Princeton.Edu}, \url{http://imai.princeton.edu};
-  Ying Lu, Department of Sociology, University of Colorado at Boulder, 
-  \email{ying.lu at Colorado.Edu}
+ Ying Lu, Department of Humanities and Social Sciences in the
+Professions, Steinhardt School of Culture, Education and Human
+Development, New York University,
+  \email{yl46 at Nyu.Edu}
   }
 
 \keyword{methods}
diff --git a/man/summary.ecoML.Rd b/man/summary.ecoML.Rd
index 4770496..c8dafe1 100644
--- a/man/summary.ecoML.Rd
+++ b/man/summary.ecoML.Rd
@@ -80,8 +80,11 @@
 \author{
   Kosuke Imai, Department of Politics, Princeton University,
   \email{kimai at Princeton.Edu}, \url{http://imai.princeton.edu};
-  Ying Lu, Department of Sociology, University of Colorado at Boulder, 
-  \email{ying.lu at Colorado.Edu}; Aaron Strauss, Department of Politics,
+ Ying Lu, Department of Humanities and Social Sciences in the
+Professions, Steinhardt School of Culture, Education and Human
+Development, New York University,
+  \email{yl46 at Nyu.Edu};
+Aaron Strauss, Department of Politics,
   Princeton University, \email{abstraus at Princeton.Edu}
   }
 
diff --git a/man/summary.ecoNP.Rd b/man/summary.ecoNP.Rd
index 0e39f83..18166aa 100644
--- a/man/summary.ecoNP.Rd
+++ b/man/summary.ecoNP.Rd
@@ -64,8 +64,10 @@ Ecological Inference in 2x2 Tables }
 \author{
   Kosuke Imai, Department of Politics, Princeton University,
   \email{kimai at Princeton.Edu}, \url{http://imai.princeton.edu};
-  Ying Lu, Department of Sociology, University of Colorado at Boulder, 
-  \email{ying.lu at Colorado.Edu}
+ Ying Lu, Department of Humanities and Social Sciences in the
+Professions, Steinhardt School of Culture, Education and Human
+Development, New York University,
+  \email{yl46 at Nyu.Edu}
 }
 
 \keyword{methods}

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



More information about the debian-science-commits mailing list