Skip to content

Commit

Permalink
bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
bgctw committed Jan 4, 2021
1 parent ae29c40 commit 85bae53
Show file tree
Hide file tree
Showing 21 changed files with 607 additions and 608 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: logitnorm
Title: Functions for the Logitnormal Distribution
Version: 0.8.37
Version: 0.8.38
Author: Thomas Wutzler
Maintainer: Thomas Wutzler <[email protected]>
Description: Density, distribution, quantile and random generation function for the logitnormal distribution. Estimation of the mode and the first two moments. Estimation of distribution parameters.
Expand Down
4 changes: 2 additions & 2 deletions R/logitnorm.R
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ qlogitnorm <- function(
}

twCoefLogitnormN <- function(
### Estimating coefficients from a vector of quantiles and perentiles (non-vectorized).
### Estimating coefficients from a vector of quantiles and percentiles (non-vectorized).
quant ##<< the quantile values
,perc = c(0.5,0.975) ##<< the probabilities for which the quantiles were specified
, method = "BFGS" ##<< method of optimization (see \code{\link{optim}})
Expand Down Expand Up @@ -385,7 +385,7 @@ twCoefLogitnormE <- function(
attr(res,"resOptim") <- resOptim
res
### named numeric matrix with estimated parameters of the logitnormal
### distrubtion.
### distribution.
### colnames: \code{c("mu","sigma")}
}
#mtrace(coefLogitnorm)
Expand Down
112 changes: 56 additions & 56 deletions README.Rmd
Original file line number Diff line number Diff line change
@@ -1,56 +1,56 @@
---
output: github_document
---

<!--
README.md is generated from README.Rmd. Please edit that file
knitr::knit("README.Rmd")
-->


```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "tools/README-"
)
```

[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/logitnorm)](http://cran.r-project.org/package=logitnorm)
[![Travis-CI Build Status](https://travis-ci.org/bgctw/logitnorm.svg?branch=master)](https://travis-ci.org/bgctw/logitnorm)


## Overview

`logitnorm` package provides support for the univariate
[logit-normal
distribution](https://en.wikipedia.org/wiki/Logit-normal_distribution). In
addition to the usual random, density, percential, and quantile function, it
helps with estimating distribution parameters from observations statistics.

## Installation

```{r, eval = FALSE}
# From CRAN
install.packages("logitnorm")
# Or the the development version from GitHub:
# install.packages("devtools")
devtools::install_github("bgctw/logitnorm")
```

## Usage

See the package vignette for an introduction.

A simple example estimates distribution parameters from observation
statistics of mode 0.7 and upper quantile 0.9. Next, the density is
computed and plotted across a range of quantiles.

```{r example}
(theta <- twCoefLogitnormMLE(0.7,0.9))
x <- seq(0,1, length.out=81)
d <- dlogitnorm(x, mu=theta[1,"mu"], sigma=theta[1,"sigma"])
plot(d~x,type="l")
abline(v=c(0.7,0.9), col="grey")
```
---
output: github_document
---

<!--
README.md is generated from README.Rmd. Please edit that file
knitr::knit("README.Rmd")
-->


```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "tools/README-"
)
```

[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/logitnorm)](http://cran.r-project.org/package=logitnorm)
[![Travis-CI Build Status](https://travis-ci.org/bgctw/logitnorm.svg?branch=master)](https://travis-ci.org/bgctw/logitnorm)


## Overview

`logitnorm` package provides support for the univariate
[logit-normal
distribution](https://en.wikipedia.org/wiki/Logit-normal_distribution). In
addition to the usual random, density, percentile, and quantile function, it
helps with estimating distribution parameters from observations statistics.

## Installation

```{r, eval = FALSE}
# From CRAN
install.packages("logitnorm")
# Or the the development version from GitHub:
# install.packages("devtools")
devtools::install_github("bgctw/logitnorm")
```

## Usage

See the package vignette for an introduction.

A simple example estimates distribution parameters from observation
statistics of mode 0.7 and upper quantile 0.9. Next, the density is
computed and plotted across a range of quantiles.

```{r example}
(theta <- twCoefLogitnormMLE(0.7,0.9))
x <- seq(0,1, length.out=81)
d <- dlogitnorm(x, mu=theta[1,"mu"], sigma=theta[1,"sigma"])
plot(d~x,type="l")
abline(v=c(0.7,0.9), col="grey")
```
112 changes: 56 additions & 56 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,56 +1,56 @@
---
output: github_document
---

<!--
README.md is generated from README.Rmd. Please edit that file
knitr::knit("README.Rmd")
-->




[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/logitnorm)](http://cran.r-project.org/package=logitnorm)
[![Travis-CI Build Status](https://travis-ci.org/bgctw/logitnorm.svg?branch=master)](https://travis-ci.org/bgctw/logitnorm)


## Overview

`logitnorm` package provides support for the univariate
[logit-normal
distribution](https://en.wikipedia.org/wiki/Logit-normal_distribution). In
addition to the usual random, density, percential, and quantile function, it
helps with estimating distribution parameters from observations statistics.

## Installation


```r
# From CRAN
install.packages("logitnorm")

# Or the the development version from GitHub:
# install.packages("devtools")
devtools::install_github("bgctw/logitnorm")
```

## Usage

See the package vignette for an introduction.

A simple example estimates distribution parameters from observation
statistics of mode 0.7 and upper quantile 0.9. Next, the density is
computed and plotted across a range of quantiles.


```r
(theta <- twCoefLogitnormMLE(0.7,0.9))
#> mu sigma
#> [1,] 0.7608886 0.464783
x <- seq(0,1, length.out=81)
d <- dlogitnorm(x, mu=theta[1,"mu"], sigma=theta[1,"sigma"])
plot(d~x,type="l")
abline(v=c(0.7,0.9), col="grey")
```

![plot of chunk example](tools/README-example-1.png)
---
output: github_document
---

<!--
README.md is generated from README.Rmd. Please edit that file
knitr::knit("README.Rmd")
-->




[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/logitnorm)](http://cran.r-project.org/package=logitnorm)
[![Travis-CI Build Status](https://travis-ci.org/bgctw/logitnorm.svg?branch=master)](https://travis-ci.org/bgctw/logitnorm)


## Overview

`logitnorm` package provides support for the univariate
[logit-normal
distribution](https://en.wikipedia.org/wiki/Logit-normal_distribution). In
addition to the usual random, density, percentile, and quantile function, it
helps with estimating distribution parameters from observations statistics.

## Installation


```r
# From CRAN
install.packages("logitnorm")

# Or the the development version from GitHub:
# install.packages("devtools")
devtools::install_github("bgctw/logitnorm")
```

## Usage

See the package vignette for an introduction.

A simple example estimates distribution parameters from observation
statistics of mode 0.7 and upper quantile 0.9. Next, the density is
computed and plotted across a range of quantiles.


```r
(theta <- twCoefLogitnormMLE(0.7,0.9))
#> Error in twCoefLogitnormMLE(0.7, 0.9): could not find function "twCoefLogitnormMLE"
x <- seq(0,1, length.out=81)
d <- dlogitnorm(x, mu=theta[1,"mu"], sigma=theta[1,"sigma"])
#> Error in dlogitnorm(x, mu = theta[1, "mu"], sigma = theta[1, "sigma"]): could not find function "dlogitnorm"
plot(d~x,type="l")
#> Error in eval(predvars, data, env): object 'd' not found
abline(v=c(0.7,0.9), col="grey")
#> Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...): plot.new has not been called yet
```
7 changes: 3 additions & 4 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
## Note
Improved consistency with other R distribution methods.
Added random seeds to tests to avoid accidental failing.

## Test environments
* local R 3.4.4 on Mint17 64bit
* Ubuntu 14.04.5 LTS (on travis-ci), 3.5.0
* win-builder (devel and release)
* local R 4.0.3 on Mint 20 64bit
* r-hub.io

## R CMD check results
There were no ERRORs nor WARNINGs nor NOTEs
Expand Down
68 changes: 34 additions & 34 deletions man/dlogitnorm.Rd
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
\name{dlogitnorm}
\alias{dlogitnorm}
\title{dlogitnorm}
\description{Density function of logitnormal distribution }
\usage{dlogitnorm(x, mu = 0, sigma = 1, log = FALSE,
...)}
\arguments{
\item{x}{vector of quantiles}
\item{mu}{distribution parameters}
\item{sigma}{
}
\item{log}{if TRUE, the log-density is returned}
\item{\dots}{further arguments passed to \code{\link{dnorm}}: \code{mean},
and \code{sd} for mu and sigma respectively. }
}
\details{\describe{\item{Logitnorm distribution}{
\itemize{
\item{density function: dlogitnorm }
\item{distribution function: \code{\link{plogitnorm}} }
\item{quantile function: \code{\link{qlogitnorm}} }
\item{random generation function: \code{\link{rlogitnorm}} }
}
}}

The function is only defined in interval (0,1), but the density
returns 0 outside the support region.}


\author{Thomas Wutzler}



\seealso{\code{\link{logitnorm}}}

\name{dlogitnorm}
\alias{dlogitnorm}
\title{dlogitnorm}
\description{Density function of logitnormal distribution }
\usage{dlogitnorm(x, mu = 0, sigma = 1, log = FALSE,
...)}
\arguments{
\item{x}{vector of quantiles}
\item{mu}{distribution parameters}
\item{sigma}{
}
\item{log}{if TRUE, the log-density is returned}
\item{\dots}{further arguments passed to \code{\link{dnorm}}: \code{mean},
and \code{sd} for mu and sigma respectively. }
}
\details{\describe{\item{Logitnorm distribution}{
\itemize{
\item{density function: dlogitnorm }
\item{distribution function: \code{\link{plogitnorm}} }
\item{quantile function: \code{\link{qlogitnorm}} }
\item{random generation function: \code{\link{rlogitnorm}} }
}
}}

The function is only defined in interval (0,1), but the density
returns 0 outside the support region.}


\author{Thomas Wutzler}



\seealso{\code{\link{logitnorm}}}

44 changes: 22 additions & 22 deletions man/invlogit.Rd
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
\name{invlogit}
\alias{invlogit}
\title{invlogit}
\description{Transforming (-Inf,Inf) to original scale (0,1)}
\usage{invlogit(q, ...)}
\arguments{
\item{q}{
}
\item{\dots}{
}
}
\details{function \eqn{f(z) = \frac{e^{z}}{e^{z} + 1} \! = \frac{1}{1 + e^{-z}} \!}}


\author{Thomas Wutzler}



\seealso{\code{\link{logit}}

\code{\link{logitnorm}}}

\name{invlogit}
\alias{invlogit}
\title{invlogit}
\description{Transforming (-Inf,Inf) to original scale (0,1)}
\usage{invlogit(q, ...)}
\arguments{
\item{q}{
}
\item{\dots}{
}
}
\details{function \eqn{f(z) = \frac{e^{z}}{e^{z} + 1} \! = \frac{1}{1 + e^{-z}} \!}}


\author{Thomas Wutzler}



\seealso{\code{\link{logit}}

\code{\link{logitnorm}}}

Loading

0 comments on commit 85bae53

Please sign in to comment.