Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Revision 9829a5182483d64b64779c302eea58781cc356b0 authored by Asad Hasan on 25 August 2014, 00:00:00 UTC, committed by Gabor Csardi on 25 August 2014, 00:00:00 UTC
version 0.9
0 parent
  • Files
  • Changes
  • b713208
  • /
  • man
  • /
  • bayesGLM.Rd
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • revision
  • directory
  • content
revision badge
swh:1:rev:9829a5182483d64b64779c302eea58781cc356b0
directory badge
swh:1:dir:33d0e019667189eb9f0f9cf186d39144290a288c
content badge
swh:1:cnt:4e5d40dea77227be0d32974376df6f343078979a

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • revision
  • directory
  • content
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
bayesGLM.Rd
\name{bayesGLM}
\alias{glmfgh}

\title{Bayesian Regression of Generalized Linear Models}

\description{
  A closure which generates a function, gradient, Hessian evaluator using for log-likelihood functions of 4 types of GLMs. 
}

\usage{
glmfgh(N, K, glmtype = "logistic", X=NULL, y=NULL) 
}

\arguments{
    \item{N}{Number of observations.}
    \item{K}{Number of variables.}
    \item{glmtype}{Must be one of \code{logistic}, \code{poisson}, \code{geometric}, \code{exponential}. }
    \item{X}{Data matrix of the explanatory variable, must have \code{N} rows and \code{K} cols. If \code{NULL} then simulated data is used.}
    \item{y}{Vector having the dependent variable (response) corresponging to \code{X}}
}

\value{
  A function suitable for use in \code{sns.run} as a function, gradient, Hessian evaluator.
}

\note{
GLMs are distributions where a linear expression replaces the parameter in some 'base' distributions. A general Hessian expander framework relying on the 'Log-concavity invariance theorem' given in \code{Appendix A} of the preprint \code{Mahani and Sharabiani (2013)} is used to generate the Hessian and gradient given those of a base distribution.

\code{expand.1par.R} has the Hessian and gradient expander code for probability distributions derived from any one paramter base distributions. The derived distributions are guaranteed to be log-concave if the base distribution is log-concave as shown in the referred paper.  
}

\references{
 Mahani, Alireza S. and Sharabiani, Mansour T.S. (2013)
 \emph{Metropolis-Hastings Sampling Using Multivariate Gaussian Tangents}
 \url{http://arxiv.org/pdf/1308.0657v1.pdf}
}


\examples{
 \dontrun{
  # Evaluator for Logistic log-likelihood, gradient, Hessian
  fghEval <- glmfgh(N=100, K=2, glmtype="logistic")
 }
}
The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API