hdr.boxplot.2d.rd

来自「r软件 另一软件 包 计算核估计 必须先安装r软件」· RD 代码 · 共 49 行

RD
49
字号
\name{hdr.boxplot.2d}
\alias{hdr.boxplot.2d}
\title{Bivariate Highest Density Regions}
\description{
Calculates and plots highest density regions in two dimensions, including the
bivariate HDR boxplot.}
\usage{
hdr.boxplot.2d(x, y, prob=c(0.01,0.50), h, show.points = FALSE, 
    xlab="", ylab="",  kde.package=c("ash","ks"), ...)
}
\arguments{
  \item{x}{Numeric vector}
  \item{y}{Numeric vector of same length as \code{x}.}
  \item{prob}{Probability coverage required for HDRs}
  \item{h}{Pair of bandwidths passed to either \code{\link[ash]{ash2}} or \code{\link[ks]{kde}}. If missing,
    a reasonable default is used.}
  \item{show.points}{If TRUE, will plot points over the top of contours.}
  \item{xlab}{Label for x-axis.}
  \item{ylab}{Label for y-axis.}
  \item{kde.package}{Package to be used in calculating the kernel density estimate.}
  \item{\dots}{Other arguments to be passed to plot.}
}

\details{The density is estimated using kernel density estimation. Either \code{\link[ash]{ash2}} or \code{\link[ks]{kde}} is used to 
do the calculations. Then Hyndman's (1996) density quantile algorithm is used to compute
the HDRs.}

\references{Hyndman, R.J. (1996) Computing and graphing highest density regions
\emph{American Statistician}, \bold{50}, 120-126.}

\author{Rob Hyndman}

\value{Some information about the HDRs is returned. See code for details.}


\seealso{\code{\link{hdr.boxplot}}}

\examples{
x <- c(rnorm(200,0,1),rnorm(200,4,1))
y <- c(rnorm(200,0,1),rnorm(200,4,1))
par(mfrow=c(1,2))
plot(x,y)
hdr.boxplot.2d(x,y)
}

\keyword{smooth}
\keyword{distribution}
\keyword{hplot}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?