Last data update: 2014.03.03

R: Kappa Distribution
KAPPAR Documentation

Kappa Distribution

Description

Density, distribution function, quantile function and random generation for the kappa distribution with shape and scale parameters equal to shape and scale, respectively.

Usage

dkappa(x,shape=1,scale=1,log=FALSE)
pkappa(q,shape=1,scale=1,lower.tail=TRUE,log.p=FALSE)
qkappa(p,shape=1,scale=1,lower.tail=TRUE,log.p=FALSE)
rkappa(n,shape=1,scale=1)

Arguments

x,q

vector of quantiles.

p

vector of probabilities.

n

number of observations.

shape

shape parameter.

scale

scale parameter.

log,log.p

logical; if TRUE, probabilities p are given as log(p).

lower.tail

logical; if TRUE (default), probabilities are P[X <= x],otherwise, P[X > x].

Details

If X is a random variable distributed according to a kappa distribution, it has density
f(x) = shape/scale*(shape+(x/scale)^shape)^(-(shape+1)/shape)

Value

dkappa gives the density, pkappa gives the distribution function, qkappa gives the quantile function, and rkappa generates random deviates.

Examples

x <- rkappa(1000,12,10)
hist(x,freq=FALSE,col='gray',border='white')
curve(dkappa(x,12,10),add=TRUE,col='red4',lwd=2)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(FAdist)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/FAdist/KAPPA.Rd_%03d_medium.png", width=480, height=480)
> ### Name: KAPPA
> ### Title: Kappa Distribution
> ### Aliases: dkappa pkappa qkappa rkappa
> ### Keywords: distribution
> 
> ### ** Examples
> 
> x <- rkappa(1000,12,10)
> hist(x,freq=FALSE,col='gray',border='white')
> curve(dkappa(x,12,10),add=TRUE,col='red4',lwd=2)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>