{% set version = "0.7.0" %}
{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}

package:
  name: r-brglm2
  version: {{ version|replace("-", "_") }}

source:
  url:
    - {{ cran_mirror }}/src/contrib/brglm2_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/brglm2/brglm2_{{ version }}.tar.gz
  sha256: dc331bd8ad1223f5a9125b2e82d2862fc8e8dfc91397f79e9fb689b33d28b601

build:
  merge_build_host: true  # [win]
  number: 0
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ posix }}zip               # [win]
  host:
    - r-base
    - r-mass
    - r-matrix
    - r-enrichwith
    - r-lpsolveapi
    - r-nnet
    - r-numderiv
  run:
    - r-base
    - r-mass
    - r-matrix
    - r-enrichwith
    - r-lpsolveapi
    - r-nnet
    - r-numderiv

test:
  commands:
    - $R -e "library('brglm2')"           # [not win]
    - "\"%R%\" -e \"library('brglm2')\""  # [win]

about:
  home: https://github.com/ikosmidis/brglm2
  license: GPL-3.0-only
  summary: Estimation and inference from generalized linear models based on various methods for bias reduction and maximum penalized likelihood with powers of the Jeffreys prior as penalty. The 'brglmFit' fitting method can achieve reduction of estimation bias by solving either the mean bias-reducing adjusted score equations
    in Firth (1993) <doi:10.1093/biomet/80.1.27> and Kosmidis and Firth (2009) <doi:10.1093/biomet/asp055>, or the median bias-reduction adjusted score equations in Kenne et al. (2016) <arXiv:1604.04768>, or through the direct subtraction of an estimate of the bias of the maximum likelihood estimator from the maximum likelihood
    estimates as in Cordeiro and McCullagh (1991) <http://www.jstor.org/stable/2345592>. See Kosmidis et al (2019) <doi:10.1007/s11222-019-09860-6> for more details. Estimation in all cases takes place via a quasi Fisher scoring algorithm, and S3 methods for the construction of of confidence intervals for the reduced-bias
    estimates are provided. In the special case of generalized linear models for binomial and multinomial responses (both ordinal and nominal), the adjusted score approaches return estimates with improved frequentist properties, that are also always finite, even in cases where the maximum likelihood estimates are infinite
    (e.g. complete and quasi-complete separation). 'brglm2' also provides pre-fit and post-fit methods for detecting separation and infinite maximum likelihood estimates in binomial response generalized linear models.
  license_family: GPL3
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3

extra:
  recipe-maintainers:
    - conda-forge/r
    - taylorreiter

# Package: brglm2
# Title: Bias Reduction in Generalized Linear Models
# Version: 0.6.0
# Authors@R: c(person(given = "Ioannis", family = "Kosmidis", role = c("aut", "cre"), email = "ioannis.kosmidis@warwick.ac.uk", comment = c(ORCID = "0000-0003-1556-0302")), person(given = "Kjell", family = "Konis", role = "ctb", email = "kjell.konis@me.com"), person(given = c("Euloge", "Clovis"), family = c("Kenne Pagui"), role = "ctb", email = "kenne@stat.unipd.it"), person(given = "Nicola", family = "Sartori", role = "ctb", email = "sartori@stat.unipd.it"))
# Description: Estimation and inference from generalized linear models based on various methods for bias reduction and maximum penalized likelihood with powers of the Jeffreys prior as penalty. The 'brglmFit' fitting method can achieve reduction of estimation bias by solving either the mean bias-reducing adjusted score equations in Firth (1993) <doi:10.1093/biomet/80.1.27> and Kosmidis and Firth (2009) <doi:10.1093/biomet/asp055>, or the median bias-reduction adjusted score equations in Kenne et al. (2016) <arXiv:1604.04768>, or through the direct subtraction of an estimate of the bias of the maximum likelihood estimator from the maximum likelihood estimates as in Cordeiro and McCullagh (1991) <http://www.jstor.org/stable/2345592>. See Kosmidis et al (2019) <doi:10.1007/s11222-019-09860-6> for more details. Estimation in all cases takes place via a quasi Fisher scoring algorithm, and S3 methods for the construction of of confidence intervals for the reduced-bias estimates are provided. In the special case of generalized linear models for binomial and multinomial responses (both ordinal and nominal), the adjusted score approaches return estimates with improved frequentist properties, that are also always finite, even in cases where the maximum likelihood estimates are infinite (e.g. complete and quasi-complete separation). 'brglm2' also provides pre-fit and post-fit methods for detecting separation and infinite maximum likelihood estimates in binomial response generalized linear models.
# URL: https://github.com/ikosmidis/brglm2
# BugReports: https://github.com/ikosmidis/brglm2/issues
# Depends: R (>= 3.3.0)
# Imports: MASS, stats, Matrix, graphics, nnet, enrichwith, lpSolveAPI, numDeriv
# License: GPL-3
# Encoding: UTF-8
# LazyData: true
# RoxygenNote: 6.1.1
# Suggests: testthat, knitr, rmarkdown, covr
# VignetteBuilder: knitr
# NeedsCompilation: yes
# Packaged: 2019-11-08 11:13:06 UTC; yiannis
# Author: Ioannis Kosmidis [aut, cre] (<https://orcid.org/0000-0003-1556-0302>), Kjell Konis [ctb], Euloge Clovis Kenne Pagui [ctb], Nicola Sartori [ctb]
# Maintainer: Ioannis Kosmidis <ioannis.kosmidis@warwick.ac.uk>
# Repository: CRAN
# Date/Publication: 2019-11-08 12:00:05 UTC
