Skip to content

Commit

Permalink
Document argument n of rlogitnorm
Browse files Browse the repository at this point in the history
  • Loading branch information
bgctw committed Jul 30, 2018
1 parent 5ffdefa commit 456ccf3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- Density returns 0 instead of NAN outside (0,1)
- Changed first argument name of dlogitnorm from q to x
- Document argument n of rlogitnorm

# logitnorm 0.8.36
Remove the library call to MASS.
Expand Down
6 changes: 4 additions & 2 deletions R/logitnorm.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ invlogit <- function(

rlogitnorm <- function(
### Random number generation for logitnormal distribution
mu = 0, sigma = 1, ##<< distribution parameters
n, ##<< number of observations
mu = 0, ##<< distribution parameter
sigma = 1, ##<< distribution parameter
... ##<< arguments to \code{\link{rnorm}}
){
##seealso<< \code{\link{logitnorm}}
plogis( rnorm(mean = mu,sd = sigma,...) )
plogis( rnorm(n = n, mean = mu, sd = sigma, ...) )
}

plogitnorm <- function(
Expand Down
8 changes: 4 additions & 4 deletions man/rlogitnorm.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
\alias{rlogitnorm}
\title{rlogitnorm}
\description{Random number generation for logitnormal distribution}
\usage{rlogitnorm(mu = 0, sigma = 1, ...)}
\usage{rlogitnorm(n, mu = 0, sigma = 1, ...)}
\arguments{
\item{mu}{distribution parameters}
\item{sigma}{
}
\item{n}{number of observations}
\item{mu}{distribution parameter}
\item{sigma}{distribution parameter}
\item{\dots}{arguments to \code{\link{rnorm}}}
}

Expand Down

0 comments on commit 456ccf3

Please sign in to comment.