summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCoprDistGit <copr-devel@lists.fedorahosted.org>2021-02-21 21:23:42 +0000
committerCoprDistGit <copr-devel@lists.fedorahosted.org>2021-02-21 21:23:42 +0000
commit46bfd0845c34b5313c6ae782ec9aca4dfb39ff47 (patch)
tree85e15b2ec2bf6612556ab640b4a54ed834ec152c
parent7fcc8cb6007bec2edd945d775c3e4afe89913660 (diff)
automatic import of R-CRAN-EMSS
-rw-r--r--.gitignore1
-rw-r--r--R-CRAN-EMSS.spec52
-rw-r--r--sources1
3 files changed, 54 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..e4a7eb3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/EMSS_1.0.2.tar.gz
diff --git a/R-CRAN-EMSS.spec b/R-CRAN-EMSS.spec
new file mode 100644
index 0000000..00f6b4c
--- /dev/null
+++ b/R-CRAN-EMSS.spec
@@ -0,0 +1,52 @@
+%global packname EMSS
+%global packver 1.0.2
+%global rlibdir /usr/local/lib/R/library
+
+Name: R-CRAN-%{packname}
+Version: 1.0.2
+Release: 1%{?dist}%{?buildtag}
+Summary: Some EM-Type Estimation Methods for the Heckman Selection Model
+
+License: GPL-2
+URL: https://cran.r-project.org/package=%{packname}
+Source0: %{url}&version=%{packver}#/%{packname}_%{packver}.tar.gz
+
+
+BuildRequires: R-devel >= 2.10
+Requires: R-core >= 2.10
+BuildArch: noarch
+BuildRequires: R-CRAN-sampleSelection
+BuildRequires: R-CRAN-mvtnorm
+Requires: R-CRAN-sampleSelection
+Requires: R-CRAN-mvtnorm
+
+%description
+Some EM-type algorithms to estimate parameters for the well-known Heckman
+selection model are provided in the package. Such algorithms are as
+follow: ECM(Expectation/Conditional Maximization), ECM(NR)(the
+Newton-Raphson method is adapted to the ECM) and
+ECME(Expectation/Conditional Maximization Either). Since the algorithms
+are based on the EM algorithm, they also have EM's main advantages,
+namely, stability and ease of implementation. Further details and
+explanations of the algorithms can be found in Zhao et al. (2020) <doi:
+10.1016/j.csda.2020.106930>.
+
+%prep
+%setup -q -c -n %{packname}
+
+find -type f -executable -exec grep -Iq . {} \; -exec sed -i -e '$a\' {} \;
+[ -d %{packname}/src ] && find %{packname}/src -type f -exec \
+ sed -i 's@/usr/bin/strip@/usr/bin/true@g' {} \; || true
+
+%build
+
+%install
+
+mkdir -p %{buildroot}%{rlibdir}
+%{_bindir}/R CMD INSTALL -l %{buildroot}%{rlibdir} %{packname}
+test -d %{packname}/src && (cd %{packname}/src; rm -f *.o *.so)
+rm -f %{buildroot}%{rlibdir}/R.css
+find %{buildroot}%{rlibdir} -type f -exec sed -i "s@%{buildroot}@@g" {} \;
+
+%files
+%{rlibdir}/%{packname}
diff --git a/sources b/sources
new file mode 100644
index 0000000..da59f23
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+adcf55566136c09d2604e8496b41c16a EMSS_1.0.2.tar.gz