| Title: | S4 Classes for Elliptically Contoured Distributions |
|---|---|
| Description: | Distribution (S4-)classes for elliptically contoured distributions (based on package 'distr'). |
| Authors: | Peter Ruckdeschel [aut, cre, cph] |
| Maintainer: | Peter Ruckdeschel <[email protected]> |
| License: | LGPL-3 |
| Version: | 2.8.4 |
| Built: | 2026-05-21 17:01:31 UTC |
| Source: | https://github.com/r-forge/distr |
distrEllipse provides infrastructure / (S4-)classes for elliptically contoured distributions (based on package distr).
| Package: | distrEllipse |
| Version: | 2.8.4 |
| Date: | 2025-01-11 |
| Depends: | R(>= 3.4), methods, graphics, mvtnorm, setRNG(>= 2006.2-1), distr(>= 2.8.0),distrEx(>= 2.8.0), distrSim(>= 2.2) |
| Suggests: | distrMod(>= 2.8.0), distrTEst(>= 2.2) |
| Imports: | startupmsg(>= 1.0.0), stats |
| ByteCompile: | yes |
| License: | LGPL-3 |
| URL: | https://distr.r-forge.r-project.org/ |
| VCS/SVNRevision: | 1497 |
################################### Distribution Classes ################################### [*]: there is a generating function with the same name "Distribution" (from distr) |>"MultivariateDistribution" (from distrEx) |>|>"MultivarMixingDistribution" [*] |>|>"SphericalDistribution" [*] |>|>|>|>"EllipticalDistribution" [*] |>|>|>|>"MVNormDistribution" [*] "DistrList" (from distr) |>"MultivarDistrList" [*/class union of "MVDistrList", "UnivarDistrList"] |>|>"MVDistrList" |>"UnivarDistrList" (from distr) [*]
plot-methods Methods for Function plot
(for SphericalDistribution)
show-methods Methods for Function show
(for Simulation/Contsimulation)
distrEllipseoptions Functions to change the global variables of the
package 'distrEllipse'
All slots are inspected / modified by corresponding accessors / -replacement functions.
You may suppress the start-up banner/message completely by setting options("StartupBanner"="off")
somewhere before loading this package by library or require in your R-code / R-session.
If option "StartupBanner" is not defined (default) or setting
options("StartupBanner"=NULL) or options("StartupBanner"="complete")
the complete start-up banner is displayed.
For any other value of option "StartupBanner" (i.e., not in c(NULL,"off","complete"))
only the version information is displayed.
The same can be achieved by wrapping the library or require call into
either suppressStartupMessages() or
onlytypeStartupMessages(.,atypes="version").
Note: The first two numbers of package versions do not necessarily reflect package-individual development, but rather are chosen for the distrXXX family as a whole in order to ease updating "depends" information.
You may suppress the start-up banner/message completely by setting options("StartupBanner"="off")
somewhere before loading this package by library or require in your R-code / R-session.
If option "StartupBanner" is not defined (default) or setting
options("StartupBanner"=NULL) or options("StartupBanner"="complete")
the complete start-up banner is displayed.
For any other value of option "StartupBanner" (i.e., not in c(NULL,"off","complete"))
only the version information is displayed.
As for general packageStartupMessage's, you may also suppress all
the start-up banner by wrapping the library or require
call into suppressPackageStartupMessages() from
startupmsg-version 0.5 on.
Global options controlling the plots and summaries of Dataclass and Simulation/Contsimulation
objects may be inspected / set by distrEllipseoptions()
and getdistrEllipseOption().
Peter Ruckdeschel [email protected],
Maintainer: Peter Ruckdeschel [email protected]
P. Ruckdeschel, M. Kohl, T. Stabla, F. Camphausen (2006):
S4 Classes for Distributions, R News, 6(2), 2-6.
https://CRAN.R-project.org/doc/Rnews/Rnews_2006-2.pdf
A vignette for packages distr, distrSim, distrTEst, distrEx,
distrTeach, distrMod, and distrEllipse
is included into the mere documentation package distrDoc and may be called by
require("distrDoc");vignette("distr").
A homepage to this package is available under
https://distr.r-forge.r-project.org/.
Functions which are no longer provided in distrEllipse due to clashes with S3-method inheritance.
From version 2.7 on, former versions of S4-methods
rRd, dRd, pRd, qRd, and plotRd of style
<name>.rd are defunct due to clashes with S3-method inheritance.
More specifically, this concerns the following methods:
signature(object = "SphericalDistribution"): wrapped access method for
slot r of slot radDistr.
signature(object = "SphericalDistribution"): wrapped access method for
slot d of slot radDistr.
signature(object = "SphericalDistribution"): wrapped access method for
slot p of slot radDistr.
signature(object = "SphericalDistribution"): wrapped access method for
slot q of slot radDistr.
signature(x = "SphericalDistribution"): utility; calls plot
for slot radDistr.
Provides information on the (intended) masking of and (non-intended) masking by other other functions in package distrEllipse
distrEllipseMASK(library = NULL)distrEllipseMASK(library = NULL)
library |
a character vector with path names of R libraries, or |
no value is returned
Peter Ruckdeschel [email protected]
## IGNORE_RDIFF_BEGIN distrEllipseMASK() ## IGNORE_RDIFF_END## IGNORE_RDIFF_BEGIN distrEllipseMASK() ## IGNORE_RDIFF_END
With distrEllipseoptions and getdistrEllipseOption you may
inspect and change the global variables used by package distrEllipse.
distrEllipseoptions(...) getdistrEllipseOption(x)distrEllipseoptions(...) getdistrEllipseOption(x)
... |
any options can be defined, using name = value or by passing a list of such tagged values. |
x |
a character string holding an option name. |
Invoking distrEllipseoptions() with no arguments returns a list with the current values of the options.
To access the value of a single option, one should use getdistrEllipseOption("WarningSim"), e.g., rather than
distrEllipseoptions("WarningSim") which is a list of length one.
distrEllipseoptions() returns a list of the global options of distrEllipse. distrEllipseoptions("Nsim") returns the global option Nsim as a list of length 1. distrEllipseoptions("Nsim" = 3000) sets the value of the global option Nsim to 3000.
getdistrEllipseOption("Nsim") the current value set for option Nsim.
Nsimfor plotting: number of (simulated) points to be plotted.
withEDfor plotting: logical; shall principal axes of the contour ellipsoid be plot in (for each panel)?
lwd.Edfor plotting: line width of principal axes (for each panel).
col.Edfor plotting: color of principal axes (for each panel).
withMeanfor plotting: logical; shall mean be plot in (for each panel)?
cex.meanfor plotting: size of the mean symbol (for each panel).
pch.meanfor plotting: mean symbol (for each panel).
col.meanfor plotting: color of the mean symbol (for each panel).
Peter Ruckdeschel [email protected]
distrEllipseoptions("Nsim") # returns the value of Nsim, by default = 5 currentDistrOptions <- distrEllipseoptions() distrEllipseoptions(Nsim = 6000) distrEllipseoptions("Nsim") getdistrEllipseOption("Nsim") distrEllipseoptions(c("Nsim","withED"))distrEllipseoptions("Nsim") # returns the value of Nsim, by default = 5 currentDistrOptions <- distrEllipseoptions() distrEllipseoptions(Nsim = 6000) distrEllipseoptions("Nsim") getdistrEllipseOption("Nsim") distrEllipseoptions(c("Nsim","withED"))
Generates an object of class "EllipticalDistribution".
EllipticalDistribution(radDistr = sqrt(Chisq(df = length(loc))), loc = c(0,0), scale = diag(length(loc)), p = NULL, q = NULL)EllipticalDistribution(radDistr = sqrt(Chisq(df = length(loc))), loc = c(0,0), scale = diag(length(loc)), p = NULL, q = NULL)
radDistr |
an object of class |
loc |
real number: location / center of the elliptical distribution. |
scale |
a square matrix (with |
p |
optional: |
q |
optional: |
Object of class "EllipticalDistribution"
Peter Ruckdeschel [email protected]
E0 <- EllipticalDistribution() plot(E0) E1 <- diag(1,2)%*%E0+c(1,2) plot(E1) E(E1) var(E1)E0 <- EllipticalDistribution() plot(E0) E1 <- diag(1,2)%*%E0+c(1,2) plot(E1) E(E1) var(E1)
Class EllipticalDistribution implements general elliptically symmetric
distributions, i.e. starting from a spherically distribution realized as an
object S of class SphericalDistribution, this is the
distribution of an affine linear transformation AS+b.
Objects could in principle be created by calls to new, but more
frequently you would create them via the generating function
EllipticalDistribution.
imgObject of class "Reals".
paramObject of class "EllipticalParameter".
rfunction with argument n; random number generator
doptional function; in case it exists: the density of the distribution
poptional function; in case it is non-null:
the cdf of the distribution evaluated on rectangles, i.e. if a random
variable X is distributed according to an object of class
"EllipticalDistribution",
for q a matrix of dimension p(object)(q)
returns, for each of the n columns
.
qoptional function; in case it is non-null:
the quantile of the distribution evaluated on rectangles, i.e. if a random
variable X is distributed according to an object of class
"EllipticalDistribution",
for p a vector of length , returns, for each of the
n components the infinimal number such that
.
radDistran object of class UnivariateDistribution with positive
support, i.e. p(radDistr)(0)==0; the radial distribution.
.withArithlogical: used internally to issue warnings as to interpretation of arithmetics
.withSimlogical: used internally to issue warnings as to accuracy
.logExactlogical: used internally to flag the case where there are explicit formulae for the log version of density, cdf, and quantile function
.lowerExactlogical: used internally to flag the case where there are explicit formulae for the lower tail version of cdf and quantile function
Symmetryobject of class "EllipticalSymmetry" about
center loc; used internally to avoid unnecessary calculations.
Class "SphericalDistribution", directly.
Class "MultivariateDistribution", by class "SphericalDistribution".
Class "Distribution", by class "MultivariateDistribution".
signature(object = "EllipticalDistribution"): wrapped access method for
slot location of slot param.
signature(x = "EllipticalDistribution"): wrapped access method for
slot scale of slot param.
signature(object = "EllipticalDistribution"): wrapped replace method for
slot location of slot param.
signature(x = "EllipticalDistribution"): wrapped replace method for
slot scale of slot param.
signature(object = "EllipticalDistribution", fun = "missing", cond = "missing"):
expectation of an elliptically symmetric distribution; exact.
signature(object = "EllipticalDistribution", fun = "function", cond = "missing"):
expectation of an elliptically symmetric distribution; by simulation.
signature(x = "EllipticalDistribution"):
expectation of an elliptically symmetric distribution; exact.
+signature(e1 = "EllipticalDistribution", e2 = "numeric"):
affine linear transformation; exact.
-signature(e1 = "EllipticalDistribution", e2 = "numeric"):
affine linear transformation; exact.
*signature(e1 = "EllipticalDistribution", e2 = "numeric"):
affine linear transformation; exact.
%*%signature(e1 = "numeric", e2 = "EllipticalDistribution"):
affine linear transformation; exact.
signature(from = "EllipticalDistribution", to = "UnivariateDistribution"):
create a UnivariateDistribution object from a (one-dimensional)
elliptically symmetric distribution.
signature(from = "UnivariateDistribution", to = "EllipticalDistribution"):
create a EllipticalDistribution object from a (symmetric)
univariate distribution.
Peter Ruckdeschel [email protected]
new("EllipticalDistribution") ## better use EllipticalDistribution()new("EllipticalDistribution") ## better use EllipticalDistribution()
The class of the parameter of Elliptical distributions.
Objects can be created by calls of the form new("EllipticalParameter", ...).
locnumeric; center / location of the distribution.
scale matrix; the scale matrix; the number of rows of this
matrix must be the same as the length of location.
namedefault name is “parameter of a Elliptical distribution”.
Class "Parameter", directly.
Class "OptionalParameter", by class "Parameter".
signature(object = "EllipticalParameter"): access method for
slot location.
signature(x = "EllipticalParameter"): access method for
slot scale.
signature(object = "EllipticalParameter"): replace method for
slot location.
signature(object = "EllipticalParameter"): replace method for
slot scale.
Peter Ruckdeschel [email protected]
EllipticalDistribution-class, Parameter-class
new("EllipticalParameter")new("EllipticalParameter")
Generates an object of class "MultivarDistrList".
MultivarDistrList(..., Dlist)MultivarDistrList(..., Dlist)
... |
Objects of class |
Dlist |
an optional list or object of class |
Object of class "MVDistrList" or of
class "UnivarDistrList", hence of class union "MultivarDistrList"
Peter Ruckdeschel [email protected]
DistrList-class, MultivarDistrList-class,
MultivarDistrList
(DL1 <- MultivarDistrList(Norm(), Exp(), Pois())) (DL2 <- MultivarDistrList(MVNorm(), EllipticalDistribution(radDistr=Exp(), loc=c(1,2), scale=diag(c(3,1))),MVt()))(DL1 <- MultivarDistrList(Norm(), Exp(), Pois())) (DL2 <- MultivarDistrList(MVNorm(), EllipticalDistribution(radDistr=Exp(), loc=c(1,2), scale=diag(c(3,1))),MVt()))
Create a list of multivariate distributions
Objects can be created by calls of the form new("MVDistrList", ...).
More frequently they are created via the generating function
MultivarDistrList.
.Data:Object of class "list".
A list of multivariate distributions of the same dimension.
Class "DistrList", directly.
Class "list", by class "DistrList".
Class "vector", by class "DistrList".
signature(from = "MultivariateDistribution", to = "MultivarDistrList"):
create a MultivarDistrList object from a univariate distribution
dim of the range space.
synonym to dimension.
In fact, class "MultivarDistrList" is an inbetween class between
class "DistrList" and class "UnivarDistrList", which is
a case for setIs, but we would have to modify the metadata
information in package distr to realize this. So we introduce
a new (sister) class "MVDistrList" which implements strictly
lists of multivariate distributions, and which together with
"UnivarDistrList" is a subclass of the common class union
class "MultivarDistrList".
Peter Ruckdeschel [email protected]
MultivarDistrList, DistrList-class,
MultivariateDistribution-class
(DL1 <- MultivarDistrList(Norm(), Exp(), Pois())) (DL2 <- MultivarDistrList(MVNorm(), EllipticalDistribution(radDistr=Exp(), loc=c(1,2), scale=diag(c(3,1))),MVt()))(DL1 <- MultivarDistrList(Norm(), Exp(), Pois())) (DL2 <- MultivarDistrList(MVNorm(), EllipticalDistribution(radDistr=Exp(), loc=c(1,2), scale=diag(c(3,1))),MVt()))
Generates an object of class "MultivarMixingDistribution".
MultivarMixingDistribution(..., Dlist, mixCoeff )MultivarMixingDistribution(..., Dlist, mixCoeff )
... |
Objects of class |
Dlist |
an optional list or object of class |
mixCoeff |
Objects of class |
If mixCoeff is missing, all elements in ...
are equally weighted.
Object of class "MultivarMixingDistribution", or if
argument withSimplify is TRUE and the resulting
object would have one mixing component with probability (almost) 1,
MultivarMixingDistribution will return this component.
Peter Ruckdeschel [email protected]
MultivarMixingDistribution-class
mylist <- MultivarMixingDistribution(Binom(3,.3), Dirac(2), Norm(), mixCoeff=c(1/4,1/5,11/20))mylist <- MultivarMixingDistribution(Binom(3,.3), Dirac(2), Norm(), mixCoeff=c(1/4,1/5,11/20))
MultivarMixingDistribution-class is a class to formalize
multivariate mixing distributions; it is a subclass to
class MultivariateDistribution.
Objects can be created by calls of the form
new("MultivarMixingDistribution", ...).
More frequently they are created via the generating function
MultivarMixingDistribution.
mixCoeffObject of class "numeric": a vector of
probabilities for the mixing components.
mixDistrObject of class "MultivarDistrList": a list of
multivariate distributions containing the mixing components; must be of same
length as mixCoeff.
imgObject of class "Reals": the space of the image of this distribution which has dimension 1
and the name "Real Space"
paramObject of class "Parameter": the parameter of this distribution, having only the
slot name "Parameter of a discrete distribution"
rObject of class "function": generates random numbers
dfixed to NULL
pObject of class "OptionalFunction": if non-null cumulative distribution function
qObject of class "OptionalFunction": if non-null quantile function
.withArithlogical: used internally to issue warnings as to interpretation of arithmetics
.withSimlogical: used internally to issue warnings as to accuracy
.logExactlogical: used internally to flag the case where there are explicit formulae for the log version of density, cdf, and quantile function
.lowerExactlogical: used internally to flag the case where there are explicit formulae for the lower tail version of cdf and quantile function
Symmetryobject of class "DistributionSymmetry";
used internally to avoid unnecessary calculations.
Class "MultivariateDistribution"
class "Distribution" by class "MultivariateDistribution".
signature(object = "MultivarMixingDistribution") prints the object
signature(object = "MultivarMixingDistribution") replaces the corresponding slot
signature(object = "MultivarMixingDistribution") returns the corresponding slot
signature(object = "MultivarMixingDistribution") replaces the corresponding slot
signature(object = "MultivarMixingDistribution") returns the corresponding slot
signature(object = "MultivarMixingDistribution") returns the corresponding slot
signature(object = "MultivarMixingDistribution") returns the corresponding slot
signature(object = "Distribution"): returns slot
.logExact if existing; else tries to convert the object to a newer
version of its class by conv2NewVersion and
returns the corresponding slot of the converted object.
signature(object = "Distribution"): returns slot
.lowerExact if existing; else tries to convert the object to a
newer version of its class by conv2NewVersion and
returns the corresponding slot of the converted object.
returns slot Symmetry if existing; else
tries to convert the object to a
newer version of its class by conv2NewVersion and
returns the corresponding slot of the converted object.
signature(x = "MultivarMixingDistribution", y = "missing"):
plot for an spherically symmetric distribution; see plot-methods.
corresponding expectation — see E.
dim of the range space.
synonym to dimension.
signature(object = "MultivarMixingDistribution"):
show method for spherically symmetric distributions.
signature(object = "MultivarMixingDistribution"):
showobj method for spherically symmetric distributions.
Peter Ruckdeschel [email protected]
Parameter-class,
MultivariateDistribution-class,
LatticeDistribution-class,
AbscontDistribution-class,
simplifyD-methods,
flat.mix
mylist <- MultivarMixingDistribution(Binom(3,.3), Dirac(2), Norm(), mixCoeff=c(1/4,1/5,11/20)) mylist2 <- MultivarMixingDistribution(Binom(3,.3), mylist, mixCoeff=c(.3,.7)) mylist2 p(mylist)(0.3) mixDistr(mylist2) E(mylist) var(mylist) ##multivariate E1 <- diag(1,2)%*%EllipticalDistribution(radDistr=Gammad())+c(1,2) mylistD <- MultivarMixingDistribution(MVNorm(), E1, MVt(), mixCoeff=c(1/4,1/5,11/20)) mylistD2 <- MultivarMixingDistribution(E1+c(-2,2), mylistD, mixCoeff=c(.3,.7)) mylistD2 p(mylistD) mixDistr(mylistD2) E(mylistD2) var(mylistD2)mylist <- MultivarMixingDistribution(Binom(3,.3), Dirac(2), Norm(), mixCoeff=c(1/4,1/5,11/20)) mylist2 <- MultivarMixingDistribution(Binom(3,.3), mylist, mixCoeff=c(.3,.7)) mylist2 p(mylist)(0.3) mixDistr(mylist2) E(mylist) var(mylist) ##multivariate E1 <- diag(1,2)%*%EllipticalDistribution(radDistr=Gammad())+c(1,2) mylistD <- MultivarMixingDistribution(MVNorm(), E1, MVt(), mixCoeff=c(1/4,1/5,11/20)) mylistD2 <- MultivarMixingDistribution(E1+c(-2,2), mylistD, mixCoeff=c(.3,.7)) mylistD2 p(mylistD) mixDistr(mylistD2) E(mylistD2) var(mylistD2)
Generates an object of class "MVNormDistribution".
MVNorm(loc=c(0,0), scale = diag(length(loc)))MVNorm(loc=c(0,0), scale = diag(length(loc)))
loc |
real number: location / center of the elliptical distribution. |
scale |
a square matrix (with |
Object of class "MVNormDistribution"
Peter Ruckdeschel [email protected]
E0 <- MVNorm() plot(E0) E1 <- diag(1,2)%*%E0+c(1,2) plot(E1) E(E1) var(E1)E0 <- MVNorm() plot(E0) E1 <- diag(1,2)%*%E0+c(1,2) plot(E1) E(E1) var(E1)
Class MVNormDistribution implements a general multivariate distribution
using code from package mvtnorm. For details to this implementation confer
to the references given in this package.
Objects could in principle be created by calls to new, but more
frequently you would create them via the generating function
MVNormDistribution.
img:Object of class "Reals".
param:Object of class "MVtParameter".
r:function with argument n; random number generator
d: the density of this distribution, pmvnorm
p:the (vectorized) function pmvnorm.
q:the (vectorized) function qmvnorm.
radDistr:the distribution sqrt(Chisq(df=dim0))
.withArith:FALSE
.withSim:FALSE
.logExact:TRUE
.lowerExact:TRUE
Symmetry:object of class "EllipticalSymmetry" about
center loc; used internally to avoid unnecessary calculations.
Class "EllipticalDistribution", directly.
Class "SphericalDistribution", by class "EllipticalDistribution".
Class "MultivariateDistribution", by class "SphericalDistribution".
Class "Distribution", by class "MultivariateDistribution".
signature(object = "MVNormDistribution"): wrapped access method for
slot sigma of slot param.
signature(object = "MVNormDistribution"): wrapped access method for
slot location of slot param.
Peter Ruckdeschel [email protected]
Package mvtnorm
new("MVNormDistribution") ## better use generating function MVNormDistribution()new("MVNormDistribution") ## better use generating function MVNormDistribution()
The class of the parameter of MVNorm distributions.
Objects can be created by calls of the form new("MVNormParameter", ...).
loc:numeric; center / location of the distribution.
scale: matrix; the scale matrix; the number of rows of this
matrix must be the same as the length of location.
name:default name is “parameter of a Elliptical distribution”.
Class "EllipticalParameter", directly.
Class "Parameter", by class "EllipticalParameter".
Class "OptionalParameter", by class "Parameter".
signature(object = "MVNormParameter"): access method for
slot location.
signature(x = "MVNormParameter"): utility function; returns
S%*%t(S)
for S=scale(x).
Peter Ruckdeschel [email protected]
MVNormDistribution-class, Parameter-class
new("MVNormParameter")new("MVNormParameter")
Generates an object of class "MvtDistribution".
MVt(loc = c(0,0), scale = diag(length(loc)), df = 1, ncp = 0)MVt(loc = c(0,0), scale = diag(length(loc)), df = 1, ncp = 0)
loc |
real number: location / center of the elliptical distribution. |
scale |
a square matrix (with |
df |
integer; degrees of freedom |
ncp |
positive real number; non-centrality parameter |
Object of class "MvtDistribution"
Peter Ruckdeschel [email protected]
E0 <- MVt() plot(E0) E1 <- diag(1,2)%*%E0+c(1,2) plot(E1) E(E1) var(E1)E0 <- MVt() plot(E0) E1 <- diag(1,2)%*%E0+c(1,2) plot(E1) E(E1) var(E1)
Class MVtDistribution implements multivariate t distributions using
code from package mvtnorm. For details to this implementation confer
to the references given in this package.
Objects could in principle be created by calls to new, but more
frequently you would create them via the generating function
MVtDistribution.
img:Object of class "Reals".
param:Object of class "MVtParameter".
r:function with argument n; random number generator
d: the density of this distribution, dmvt
p:the (vectorized) function pmvt.
q:the (vectorized) function qmvt.
radDistr:an object of class AbscontDistribution
with density
.withArith:FALSE
.withSim:FALSE
.logExact:TRUE
.lowerExact:TRUE
Symmetry:object of class "EllipticalSymmetry" about
center loc; used internally to avoid unnecessary calculations.
Class "EllipticalDistribution", directly.
Class "SphericalDistribution", by class "EllipticalDistribution".
Class "MultivariateDistribution", by class "SphericalDistribution".
Class "Distribution", by class "MultivariateDistribution".
signature(object = "MVtDistribution"): wrapped access method for
slot sigma of slot param.
signature(object = "MVtDistribution"): wrapped access method for
slot ncp of slot param.
signature(x = "MVtDistribution"): wrapped access method for
slot scale of slot param.
Peter Ruckdeschel [email protected]
Package mvtnorm
new("MVtDistribution") ## better use generating function MVtDistribution()new("MVtDistribution") ## better use generating function MVtDistribution()
The class of the parameter of MVt distributions.
Objects can be created by calls of the form new("MVtParameter", ...).
loc:numeric; center / location of the distribution.
scale: matrix; the scale matrix; the number of rows of this
matrix must be the same as the length of location.
df:integer; the degrees of freedom.
ncp:positive real; the non-centrality parameter.
name:default name is “parameter of a Elliptical distribution”.
Class "Parameter", directly.
Class "OptionalParameter", by class "Parameter".
signature(object = "MVnormParameter"): access method for
slot location.
signature(x = "MVnormParameter"): utility function; returns
S%*%t(S)
for S=scale(x).
signature(object = "MVnormParameter"): access method for
slot ncp.
signature(x = "MVnormParameter"): access method for slot
df.
Peter Ruckdeschel [email protected]
MVtDistribution-class, Parameter-class
new("MVtParameter")new("MVtParameter")
plot-methods
plot(x, y, ...) ## S4 method for signature 'SphericalDistribution,missing' plot(x, Nsim = getdistrEllipseOption("Nsim"), ..., withED = getdistrEllipseOption("withED"), lwd.Ed = getdistrEllipseOption("lwd.Ed"), col.Ed = getdistrEllipseOption("col.Ed"), withMean = getdistrEllipseOption("withMean"), cex.mean = getdistrEllipseOption("cex.mean"), pch.mean = getdistrEllipseOption("pch.mean"), col.mean = getdistrEllipseOption("col.mean")) ## S4 method for signature 'MultivarMixingDistribution,missing' plot(x, Nsim = getdistrEllipseOption("Nsim"), ..., withED = getdistrEllipseOption("withED"), lwd.Ed = getdistrEllipseOption("lwd.Ed"), col.Ed = getdistrEllipseOption("col.Ed"), withMean = getdistrEllipseOption("withMean"), cex.mean = getdistrEllipseOption("cex.mean"), pch.mean = getdistrEllipseOption("pch.mean"), col.mean = getdistrEllipseOption("col.mean"))plot(x, y, ...) ## S4 method for signature 'SphericalDistribution,missing' plot(x, Nsim = getdistrEllipseOption("Nsim"), ..., withED = getdistrEllipseOption("withED"), lwd.Ed = getdistrEllipseOption("lwd.Ed"), col.Ed = getdistrEllipseOption("col.Ed"), withMean = getdistrEllipseOption("withMean"), cex.mean = getdistrEllipseOption("cex.mean"), pch.mean = getdistrEllipseOption("pch.mean"), col.mean = getdistrEllipseOption("col.mean")) ## S4 method for signature 'MultivarMixingDistribution,missing' plot(x, Nsim = getdistrEllipseOption("Nsim"), ..., withED = getdistrEllipseOption("withED"), lwd.Ed = getdistrEllipseOption("lwd.Ed"), col.Ed = getdistrEllipseOption("col.Ed"), withMean = getdistrEllipseOption("withMean"), cex.mean = getdistrEllipseOption("cex.mean"), pch.mean = getdistrEllipseOption("pch.mean"), col.mean = getdistrEllipseOption("col.mean"))
x |
object of class
|
y |
missing |
Nsim |
number of (simulated) points to be plotted. |
withED |
logical; shall principal axes of the contour ellipsoid be plot in (for each panel)? |
lwd.Ed |
line width of principal axes (for each panel). |
col.Ed |
color of principal axes (for each panel). |
withMean |
logical; shall mean be plot in (for each panel)? |
cex.mean |
size of the mean symbol (for each panel). |
pch.mean |
mean symbol (for each panel). |
col.mean |
color of the mean symbol (for each panel). |
... |
addtional arguments for |
Using pairs, plots all pairs of coordinates of the object, using simulated
values.
Any parameters of pairs may be passed on to this particular
plot method.
pairs,
plot
plot.default,
plot.stepfun, par
E0 <- matrix(c(2,1,1,4),2,2)%*%EllipticalDistribution()+c(2,1) E1 <- matrix(c(3,2,2,4),2,2)%*%EllipticalDistribution(radDistr = exp(Binom(10,.8))) plot(E0) plot(E1, withED=FALSE, Nsim=5000) mylist <- MultivarMixingDistribution(E0,E1, mixCoeff=c(1/4,3/4)) plot(mylist)E0 <- matrix(c(2,1,1,4),2,2)%*%EllipticalDistribution()+c(2,1) E1 <- matrix(c(3,2,2,4),2,2)%*%EllipticalDistribution(radDistr = exp(Binom(10,.8))) plot(E0) plot(E1, withED=FALSE, Nsim=5000) mylist <- MultivarMixingDistribution(E0,E1, mixCoeff=c(1/4,3/4)) plot(mylist)
Generates an object of class "SphericalDistribution".
SphericalDistribution(radDistr = sqrt(Chisq(df=dim)), dim = 2, p = NULL, q = NULL)SphericalDistribution(radDistr = sqrt(Chisq(df=dim)), dim = 2, p = NULL, q = NULL)
radDistr |
an object of class |
dim |
positive integer: dimension of the distribution. |
p |
optional: |
q |
optional: |
Object of class "SphericalDistribution"
Peter Ruckdeschel [email protected]
E0 <- SphericalDistribution() plot(E0) E1 <- diag(1,2)%*%E0+c(1,2) plot(E1) E(E1) var(E1)E0 <- SphericalDistribution() plot(E0) E1 <- diag(1,2)%*%E0+c(1,2) plot(E1) E(E1) var(E1)
Class SphericalDistribution implements general spherically symmetric
distributions, i.e. starting from a random variable L distributed
according to a univariate distribution radDistr with positive support
serving as radial distribution, and an independent random variable U distributed
uniformly on the dim dimensional sphere, this is the
distribution of LU.
Objects could in principle be created by calls to new, but more
frequently you would create them via the generating function
SphericalDistribution.
imgObject of class "Reals".
paramObject of class "SphericalParameter".
rfunction with argument n; random number generator
doptional function; in case it exists: the density of the distribution
poptional function; in case it is non-null:
the cdf of the distribution evaluated on rectangles, i.e. if a random
variable X is distributed according to an object of class
"SphericalDistribution",
for q a matrix of dimension p(object)(q)
returns, for each of the n columns
.
qoptional function; in case it is non-null:
the quantile of the distribution evaluated on rectangles, i.e. if a random
variable X is distributed according to an object of class
"SphericalDistribution",
for p a vector of length , returns, for each of the
n components the infinimal number such that
.
radDistran object of class UnivariateDistribution with positive
support, i.e. p(radDistr)(0)==0; the radial distribution.
.withArithlogical: used internally to issue warnings as to interpretation of arithmetics
.withSimlogical: used internally to issue warnings as to accuracy
.logExactlogical: used internally to flag the case where there are explicit formulae for the log version of density, cdf, and quantile function
.lowerExactlogical: used internally to flag the case where there are explicit formulae for the lower tail version of cdf and quantile function
Symmetryobject of class "SphericalSymmetry" about
center loc; used internally to avoid unnecessary calculations.
Class "MultivariateDistribution", directly.
Class "Distribution", by class "MultivariateDistribution".
signature(object = "SphericalDistribution"): returns
the dimension of the distribution.
signature(object = "SphericalDistribution"): synonym to
dimension.
signature(object = "SphericalDistribution"): helper
function to have the same interface as class "EllipticalDistribution";
always returns 0 (in the respective dimension).
signature(object = "SphericalDistribution"): helper
function to have the same interface as class "EllipticalDistribution";
always returns the unit matrix (in the respective dimension).
signature(object = "SphericalDistribution"): access method for
slot radDistr.
signature(object = "SphericalDistribution"): wrapped access method for
slot r of slot radDistr. From version 2.7 on, replaces defunct
r.Rd to avoid clashes with S3-method inheritance.
signature(object = "SphericalDistribution"): wrapped access method for
slot d of slot radDistr. From version 2.7 on, replaces defunct
d.Rd to avoid clashes with S3-method inheritance.
signature(object = "SphericalDistribution"): wrapped access method for
slot p of slot radDistr. From version 2.7 on, replaces defunct
p.Rd to avoid clashes with S3-method inheritance.
signature(object = "SphericalDistribution"): wrapped access method for
slot q of slot radDistr. From version 2.7 on, replaces defunct
q.Rd to avoid clashes with S3-method inheritance.
signature(x = "SphericalDistribution"): utility; calls plot
for slot radDistr. From version 2.6 on, replaces deprecated
plot.Rd to avoid clashes with S3-method inheritance.
signature(x = "SphericalDistribution", y = "missing"):
plot for an spherically symmetric distribution; see plot-methods.
signature(object = "SphericalDistribution"):
show method for spherically symmetric distributions.
signature(object = "SphericalDistribution"):
showobj method for spherically symmetric distributions.
signature(object = "SphericalDistribution", fun = "missing", cond = "missing"):
expectation of an elliptically symmetric distribution; exact.
signature(x = "SphericalDistribution"):
expectation of an elliptically symmetric distribution; exact.
signature(from = "SphericalDistribution", to = "EllipticalDistribution"):
create a EllipticalDistribution object from a spherically symmetric
distribution.
+signature(e1 = "SphericalDistribution", e2 = "numeric"):
affine linear transformation; exact.
-signature(e1 = "SphericalDistribution", e2 = "numeric"):
affine linear transformation; exact.
-signature(e1 = "SphericalDistribution", e2 = "missing"):
affine linear transformation; exact.
*signature(e1 = "SphericalDistribution", e2 = "numeric"):
affine linear transformation; exact.
+signature(e1 = "numeric", e2 = "SphericalDistribution"):
affine linear transformation; exact.
-signature(e1 = "numeric", e2 = "SphericalDistribution"):
affine linear transformation; exact.
*signature(e1 = "numeric", e2 = "SphericalDistribution"):
affine linear transformation; exact.
%*%signature(e1 = "numeric", e2 = "SphericalDistribution"):
affine linear transformation; exact.
Peter Ruckdeschel [email protected]
new("SphericalDistribution") ## better use SphericalDistribution()new("SphericalDistribution") ## better use SphericalDistribution()