[Distr-commits] r859 - branches/distr-2.4/pkg/distrRmetrics branches/distr-2.4/pkg/distrRmetrics/R branches/distr-2.4/pkg/distrRmetrics/man branches/distr-2.5/pkg/distrRmetrics branches/distr-2.5/pkg/distrRmetrics/R branches/distr-2.5/pkg/distrRmetrics/man pkg pkg/distrRmetrics pkg/distrRmetrics/R pkg/distrRmetrics/inst pkg/distrRmetrics/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jan 15 16:03:33 CET 2013


Author: ruckdeschel
Date: 2013-01-15 16:03:32 +0100 (Tue, 15 Jan 2013)
New Revision: 859

Added:
   branches/distr-2.4/pkg/distrRmetrics/man/0distrRmetrics-package.Rd
   branches/distr-2.4/pkg/distrRmetrics/man/SNorm-class.Rd
   branches/distr-2.4/pkg/distrRmetrics/man/SNorm.Rd
   branches/distr-2.4/pkg/distrRmetrics/man/SNormParameter-class.Rd
   branches/distr-2.4/pkg/distrRmetrics/man/SSTd-class.Rd
   branches/distr-2.4/pkg/distrRmetrics/man/SSTd.Rd
   branches/distr-2.4/pkg/distrRmetrics/man/SSTdParameter-class.Rd
   branches/distr-2.4/pkg/distrRmetrics/man/STd.Rd
   branches/distr-2.5/pkg/distrRmetrics/man/0distrRmetrics-package.Rd
   branches/distr-2.5/pkg/distrRmetrics/man/SNorm-class.Rd
   branches/distr-2.5/pkg/distrRmetrics/man/SNorm.Rd
   branches/distr-2.5/pkg/distrRmetrics/man/SNormParameter-class.Rd
   branches/distr-2.5/pkg/distrRmetrics/man/SSTd-class.Rd
   branches/distr-2.5/pkg/distrRmetrics/man/SSTd.Rd
   branches/distr-2.5/pkg/distrRmetrics/man/SSTdParameter-class.Rd
   branches/distr-2.5/pkg/distrRmetrics/man/STd.Rd
   pkg/distrRmetrics/
   pkg/distrRmetrics/DESCRIPTION
   pkg/distrRmetrics/NAMESPACE
   pkg/distrRmetrics/R/
   pkg/distrRmetrics/R/AllClasses.R
   pkg/distrRmetrics/R/AllGenerics.R
   pkg/distrRmetrics/R/fGarchDistr.R
   pkg/distrRmetrics/inst/
   pkg/distrRmetrics/inst/CITATION
   pkg/distrRmetrics/inst/NEWS
   pkg/distrRmetrics/inst/TOBEDONE
   pkg/distrRmetrics/man/
   pkg/distrRmetrics/man/0distrRmetrics-package.Rd
   pkg/distrRmetrics/man/SNorm-class.Rd
   pkg/distrRmetrics/man/SNorm.Rd
   pkg/distrRmetrics/man/SNormParameter-class.Rd
   pkg/distrRmetrics/man/SSTd-class.Rd
   pkg/distrRmetrics/man/SSTd.Rd
   pkg/distrRmetrics/man/SSTdParameter-class.Rd
   pkg/distrRmetrics/man/STd.Rd
Modified:
   branches/distr-2.4/pkg/distrRmetrics/DESCRIPTION
   branches/distr-2.4/pkg/distrRmetrics/NAMESPACE
   branches/distr-2.4/pkg/distrRmetrics/R/AllClasses.R
   branches/distr-2.4/pkg/distrRmetrics/R/fGarchDistr.R
   branches/distr-2.5/pkg/distrRmetrics/DESCRIPTION
   branches/distr-2.5/pkg/distrRmetrics/NAMESPACE
   branches/distr-2.5/pkg/distrRmetrics/R/AllClasses.R
   branches/distr-2.5/pkg/distrRmetrics/R/fGarchDistr.R
Log:
distrRmetrics: completed debugging; now checks warning-free and can be released

Modified: branches/distr-2.4/pkg/distrRmetrics/DESCRIPTION
===================================================================
--- branches/distr-2.4/pkg/distrRmetrics/DESCRIPTION	2013-01-15 11:46:19 UTC (rev 858)
+++ branches/distr-2.4/pkg/distrRmetrics/DESCRIPTION	2013-01-15 15:03:32 UTC (rev 859)
@@ -1,6 +1,6 @@
 Package: distrRmetrics
 Version: 2.4
-Date: 2012-09-13
+Date: 2013-01-14
 Title: Package distr classes for distributions from Rmetrics
 Depends: R(>= 2.6.0), methods, startupmsg, distr(>= 2.4), fBasics(>= 270.73), fGarch(>= 270.73)
 Suggests: distrEx(>= 2.4), distrMod(>= 2.4)

Modified: branches/distr-2.4/pkg/distrRmetrics/NAMESPACE
===================================================================
--- branches/distr-2.4/pkg/distrRmetrics/NAMESPACE	2013-01-15 11:46:19 UTC (rev 858)
+++ branches/distr-2.4/pkg/distrRmetrics/NAMESPACE	2013-01-15 15:03:32 UTC (rev 859)
@@ -5,6 +5,6 @@
 import("fGarch")
 
 exportClasses("SNormParameter", "SSTdParameter", "SNorm", "SSTd")
-export("SNorm", "SSTd")
+export("SNorm", "SSTd", "STd")
 exportMethods("xi","mean","sd","nu")
 exportMethods("xi<-","mean<-","sd<-","nu<-")

Modified: branches/distr-2.4/pkg/distrRmetrics/R/AllClasses.R
===================================================================
--- branches/distr-2.4/pkg/distrRmetrics/R/AllClasses.R	2013-01-15 11:46:19 UTC (rev 858)
+++ branches/distr-2.4/pkg/distrRmetrics/R/AllClasses.R	2013-01-15 15:03:32 UTC (rev 859)
@@ -1,10 +1,8 @@
 
-
 .onAttach <- function(library, pkg)
 {
 buildStartupMessage(pkg = "distrRMetrics", "",  library = library,
                     packageHelp = TRUE, 
-# MANUAL = "http://www.uni-bayreuth.de/departments/math/org/mathe7/DISTR/distr.pdf",
                     VIGNETTE = gettext(
 "Package \"distrDoc\" provides a vignette to this package as well as to several extension packages; try vignette(\"distr\")."
                                       )
@@ -15,10 +13,10 @@
 
 ## Class: SkewNormParameter
 setClass("SNormParameter",
-          representation = representation(mean = "numeric", sd = "vector", xi="numeric"),
-          prototype = prototype(mean = 0, sd = 1, xi=1.5, name =
-                      gettext("Parameter of a Skewed Normal distribution")
-                      ), 
+          representation = representation(xi="numeric"),
+          prototype = prototype(name =
+                      gettext("Parameter of a Skewed Normal distribution"),
+                       xi=1.5),
           contains = "UniNormParameter"
           )
 
@@ -50,6 +48,8 @@
                           return(qsnorm(p0,mean=0,sd=1,xi=1.5))
                           },
                       param = new("SNormParameter"),
+                     .withArith = FALSE,
+                     .withSim = FALSE,
                      .logExact = FALSE,
                      .lowerExact = FALSE),
           contains = "AbscontDistribution"
@@ -75,6 +75,8 @@
                           return(qsstd(p0,mean=0,sd=1,nu=5,xi=1.5))
                           },
                       param = new("SSTdParameter"),
+                     .withArith = FALSE,
+                     .withSim = FALSE,
                      .logExact = FALSE,
                      .lowerExact = FALSE
                       ),

Modified: branches/distr-2.4/pkg/distrRmetrics/R/fGarchDistr.R
===================================================================
--- branches/distr-2.4/pkg/distrRmetrics/R/fGarchDistr.R	2013-01-15 11:46:19 UTC (rev 858)
+++ branches/distr-2.4/pkg/distrRmetrics/R/fGarchDistr.R	2013-01-15 15:03:32 UTC (rev 859)
@@ -1,68 +1,83 @@
 SNorm <- function(mean=0, sd=1, xi=1.5){
+  if(!length(mean)==1L) stop("Parameter 'mean' must be of length 1.")
+  if(!length(sd)==1L) stop("Parameter 'sd' must be of length 1.")
+  if(!length(xi)==1L) stop("Parameter 'xi' must be of length 1.")
+  if(xi<0) stop("Parameter 'xi' must be positive.")
+  if(sd<0) stop("Parameter 'sd' must be positive.")
   m0 <- mean; sd0 <- sd; xi0 <- xi
-  new("SNorm",r=function(n)rsnorm(n,mean=m0,sd=sd0,xi=xi0),
-                      d=function(x, log=FALSE){
-                          d0 <- dsnorm(x,mean=m0,sd=sd0,xi=xi0)
-                          return(if(log) log(d0) else d0)
-                          },
-                      p=function(q, lower.tail=TRUE, log.p=FALSE){
-                          p00 <- psnorm(q,mean=m0,sd=sd0,xi=xi0)
-                          p0  <- if(lower.tail) p00 else 1-p00
-                          return(if(log.p) log(p0) else p0)
-                          },
-                      q=function(p, lower.tail=TRUE, log.p=FALSE){
-                          p00 <- if(log.p) exp(p) else p
+  rfn <- substitute({rsnorm(n,mean=m0s,sd=sd0s,xi=xi0s)},
+                     list(m0s=m0,sd0s=sd0,xi0s=xi0))
+  dfn <- substitute({d0 <- dsnorm(x,mean=m0s,sd=sd0s,xi=xi0s)
+                     return(if(log) log(d0) else d0)},
+                     list(m0s=m0,sd0s=sd0,xi0s=xi0))
+  pfn <- substitute({ p00 <- psnorm(q,mean=m0s,sd=sd0s,xi=xi0s)
+                      p0  <- if(lower.tail) p00 else 1-p00
+                      return(if(log.p) log(p0) else p0)},
+                     list(m0s=m0,sd0s=sd0,xi0s=xi0))
+  qfn <- substitute({p00 <- if(log.p) exp(p) else p
                           p0 <- if(lower.tail) p00 else 1-p00
-                          return(qsnorm(p0,mean=m0,sd=sd0,xi=xi0))
-                          },
-                      param = new("SNormParameter", mean=m0,sd=sd0,xi=xi0))
+                          return(qsnorm(p0,mean=m0s,sd=sd0s,xi=xi0s))},
+                     list(m0s=m0,sd0s=sd0,xi0s=xi0))
+  rF <- function(n){}; body(rF) <- rfn
+  dF <- function(x, log=FALSE){}; body(dF) <- dfn
+  pF <- function(q, lower.tail=TRUE, log.p=FALSE){}; body(pF) <- pfn
+  qF <- function(p, lower.tail=TRUE, log.p=FALSE){}; body(qF) <- qfn
+  new("SNorm",r = rF, d = dF, p = pF, q = qF,
+       param = new("SNormParameter", mean = m0,sd = sd0,xi = xi0))
 }
-STd <- function(mean=0, sd=1, nu=5)
-  Td(ncp=0,df=nu,location=mean,scale=sqrt((nu-2)/nu)*sd0)
-
+STd <- function(mean=0, sd=1, nu=5){
+  if(!length(mean)==1L) stop("Parameter 'mean' must be of length 1.")
+  if(!length(sd)==1L) stop("Parameter 'sd' must be of length 1.")
+  if(!length(nu)==1L) stop("Parameter 'nu' must be of length 1.")
+  if(sd<0) stop("Parameter 'sd' must be positive.")
+  if(nu<=2L) stop("Parameter 'nu' must be larger than 2.")
+  sqrt((nu-2)/nu)*sd*Td(ncp=0,df=nu)+mean
+}
 SSTd <- function(mean=0, sd=1, nu=5, xi=1.5){
+  if(!length(mean)==1L) stop("Parameter 'mean' must be of length 1.")
+  if(!length(sd)==1L) stop("Parameter 'sd' must be of length 1.")
+  if(!length(nu)==1L) stop("Parameter 'nu' must be of length 1.")
+  if(!length(xi)==1L) stop("Parameter 'xi' must be of length 1.")
+  if(xi<0) stop("Parameter 'xi' must be positive.")
+  if(sd<0) stop("Parameter 'sd' must be positive.")
+  if(nu<=2L) stop("Parameter 'nu' must be larger than 2.")
   m0 <- mean; sd0 <- sd; nu0 <- nu; xi0 <- xi
-  new("SSTd",r=function(n)rsstd(n,mean=m0,sd=sd0,nu=nu0,xi=xi0),
-                      d=function(x, log=FALSE){
-                          d0 <- dsstd(x,mean=m0,sd=sd0,nu=nu0,xi=xi0)
-                          return(if(log) log(d0) else d0)
-                          },
-                      p=function(q, lower.tail=TRUE, log.p=FALSE){
-                          p00 <- psstd(q,mean=m0,sd=sd0,nu=nu0,xi=xi0)
-                          p0  <- if(lower.tail) p00 else 1-p00
-                          return(if(log.p) log(p0) else p0)
-                          },
-                      q=function(p, lower.tail=TRUE, log.p=FALSE){
-                          p00 <- if(log.p) exp(p) else p
+  rfn <- substitute({rsstd(n,mean=m0s,sd=sd0s,nu=nu0s, xi=xi0s)},
+                     list(m0s=m0,sd0s=sd0,xi0s=xi0,nu0s=nu0))
+  dfn <- substitute({d0 <- dsstd(x,mean=m0s,sd=sd0s,xi=xi0s, nu=nu0s)
+                     return(if(log) log(d0) else d0)},
+                     list(m0s=m0,sd0s=sd0,xi0s=xi0,nu0s=nu0))
+  pfn <- substitute({ p00 <- psstd(q,mean=m0s,sd=sd0s,xi=xi0s, nu=nu0s)
+                      p0  <- if(lower.tail) p00 else 1-p00
+                      return(if(log.p) log(p0) else p0)},
+                     list(m0s=m0,sd0s=sd0,xi0s=xi0,nu0s=nu0))
+  qfn <- substitute({p00 <- if(log.p) exp(p) else p
                           p0 <- if(lower.tail) p00 else 1-p00
-                          return(qsstd(p0,mean=m0,sd=sd0,nu=nu0,xi=xi0))
-                          },
-                      param = new("SSTdParameter", mean=m0,sd=sd0,nu=nu0,xi=xi0),
-                      )
+                          return(qsstd(p0,mean=m0s,sd=sd0s,xi=xi0s, nu=nu0s))},
+                     list(m0s=m0,sd0s=sd0,xi0s=xi0,nu0s=nu0))
+  rF <- function(n){}; body(rF) <- rfn
+  dF <- function(x, log=FALSE){}; body(dF) <- dfn
+  pF <- function(q, lower.tail=TRUE, log.p=FALSE){}; body(pF) <- pfn
+  qF <- function(p, lower.tail=TRUE, log.p=FALSE){}; body(qF) <- qfn
+  new("SSTd", r = rF, d = dF, p = pF, q = qF,
+       param = new("SSTdParameter", mean=m0,sd=sd0,nu=nu0,xi=xi0)
+       )
 }
 
 ## Access methods
-setMethod("xi", signature(x = "SNormParameter"), function(x, ...) x at xi)
-setMethod("xi", signature(x = "SSTdParameter"), function(x, ...) x at xi)
-setMethod("nu", signature(x = "SSTdParameter"), function(x, ...) x at nu)
+setMethod("xi", signature(object = "SNormParameter"), function(object) object at xi)
+setMethod("xi", signature(object = "SSTdParameter"), function(object) object at xi)
+setMethod("nu", signature(object = "SSTdParameter"), function(object) object at nu)
+setMethod("mean", signature(x = "SSTdParameter"), function(x, ...) x at mean)
+setMethod("sd", signature(x = "SSTdParameter"), function(x, ...) x at sd)
 ## wrapped access methods
 setMethod("mean", signature(x = "SNorm"), function(x, ...) mean(param(x)))
 setMethod("mean", signature(x = "SSTd"), function(x, ...) mean(param(x)))
 setMethod("sd", signature(x = "SNorm"), function(x) sd(param(x)))
 setMethod("sd", signature(x = "SSTd"), function(x) sd(param(x)))
-setMethod("xi", signature(x = "SNorm"), function(x, ...) x at param@xi)
-setMethod("xi", signature(x = "SSTd"), function(x, ...) x at param@xi)
-setMethod("nu", signature(x = "SSTd"), function(x, ...) x at param@nu)
-## Replace Methoden
-setReplaceMethod("xi", "SNormParameter",
-                  function(object, value)
-                      { object at xi <- value; object})
-setReplaceMethod("xi", "SSTdParameter",
-                  function(object, value)
-                      { object at xi <- value; object})
-setReplaceMethod("nu", "SSTdParameter",
-                  function(object, value)
-                      { object at nu <- value; object})
+setMethod("xi", signature(object = "SNorm"), function(object) object at param@xi)
+setMethod("xi", signature(object = "SSTd"), function(object) object at param@xi)
+setMethod("nu", signature(object = "SSTd"), function(object) object at param@nu)
 ## wrapped replace methods
 setMethod("mean<-", "SNorm",
            function(object, value) SNorm(mean=value, sd=sd(object), xi=xi(object)))
@@ -75,6 +90,6 @@
 setMethod("nu<-", "SSTd",
            function(object, value) SSTd(mean=mean(object), sd=sd(object), nu=value, xi=xi(object)))
 setMethod("xi<-", "SNorm",
-           function(object, value) SSTd(mean=mean(object), sd=sd(object), xi=value))
+           function(object, value) SNorm(mean=mean(object), sd=sd(object), xi=value))
 setMethod("xi<-", "SSTd",
            function(object, value) SSTd(mean=mean(object), sd=sd(object), xi=value, nu =nu(object)))

Added: branches/distr-2.4/pkg/distrRmetrics/man/0distrRmetrics-package.Rd
===================================================================
--- branches/distr-2.4/pkg/distrRmetrics/man/0distrRmetrics-package.Rd	                        (rev 0)
+++ branches/distr-2.4/pkg/distrRmetrics/man/0distrRmetrics-package.Rd	2013-01-15 15:03:32 UTC (rev 859)
@@ -0,0 +1,102 @@
+\name{distrRmetrics-package}
+\alias{distrRmetrics-package}
+\alias{distrRmetrics}
+\docType{package}
+\title{
+distrRmetrics -- S4 classes for distributions contributed in the Rmetrics
+packages.
+}
+\description{
+\pkg{distrRmetrics} provides infrastructure / (S4-)classes
+(based on package \pkg{distr}) for distributions contributed in the Rmetrics
+packages.
+}
+\details{
+\tabular{ll}{
+Package: \tab distrRmetrics \cr
+Version: \tab 2.4 \cr
+Date: \tab 2013-01-15 \cr
+Depends: \tab R(>= 2.6.0), methods, fBasics(>= 270.73), fGarch(>= 270.73),
+              distr(>= 2.4), startupmsg\cr
+LazyLoad: \tab yes \cr
+License: \tab LGPL-3 \cr
+URL: \tab http://distr.r-forge.r-project.org/\cr
+SVNRevision: \tab 834 \cr
+}
+}
+\section{Classes}{
+\preformatted{
+###################################
+Distribution Classes
+###################################
+[*]: there is a generating function with the same name
+
+
+"Distribution" (from distr)
+|>"AbscontDistribution" (from distr)
+|>|>"SNorm" [*]
+|>|>"SSTd" [*]
+}}
+
+
+\section{Functions}{
+\preformatted{
+STd    Functions to generate an "AbscontDistribution" object implementing
+       a standardized T distribution
+}}
+
+\section{Slot accessors / -replacement functions}{
+All slots are inspected / modified by corresponding 
+accessors / -replacement functions.
+}
+
+\author{
+  Peter Ruckdeschel \email{Peter.Ruckdeschel at itwm.fraunhofer.de},\cr
+  \emph{Maintainer:}  Peter Ruckdeschel \email{Peter.Ruckdeschel at itwm.fraunhofer.de}
+  }
+
+\section{Start-up-Banner}{
+You may suppress the start-up banner/message completely by setting \code{options("StartupBanner"="off")}
+somewhere before loading this package by \code{library} or \code{require} in your R-code / R-session.
+
+If option \code{"StartupBanner"} is not defined (default) or setting    
+\code{options("StartupBanner"=NULL)} or  \code{options("StartupBanner"="complete")} 
+the complete start-up banner is displayed.
+
+For any other value of option \code{"StartupBanner"} (i.e., not in \code{c(NULL,"off","complete")})
+only the version information is displayed.
+
+The same can be achieved by wrapping the \code{library} or \code{require}  call into
+either \code{\link[startupmsg:StartupUtilities]{suppressStartupMessages}()} or 
+\code{\link[startupmsg:StartupUtilities]{onlytypeStartupMessages}(.,atypes="version")}. 
+
+As for general \code{packageStartupMessage}'s, you may also suppress all
+ the start-up banner by wrapping the \code{library} or \code{require}
+ call into \code{suppressPackageStartupMessages()} from
+ \pkg{startupmsg}-version 0.5 on.
+}
+
+
+
+\section{Package versions}{
+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.
+}
+
+\references{
+P. Ruckdeschel, M. Kohl, T. Stabla, F. Camphausen (2006):
+S4 Classes for Distributions, \emph{R News}, \emph{6}(2), 2-6. 
+\url{http://CRAN.R-project.org/doc/Rnews/Rnews_2006-2.pdf}
+
+A vignette for packages \pkg{distr}, \pkg{distrSim}, \pkg{distrTEst}, \pkg{distrEx},
+\pkg{distrTeach}, \pkg{distrMod}, and \pkg{distrRmetrics}
+is included into the mere documentation package \pkg{distrDoc} and may be called by 
+\code{require("distrDoc");vignette("distr")}.
+
+A homepage to this package is available under\cr
+\url{http://distr.r-forge.r-project.org/}.
+}
+
+\keyword{ package }

Added: branches/distr-2.4/pkg/distrRmetrics/man/SNorm-class.Rd
===================================================================
--- branches/distr-2.4/pkg/distrRmetrics/man/SNorm-class.Rd	                        (rev 0)
+++ branches/distr-2.4/pkg/distrRmetrics/man/SNorm-class.Rd	2013-01-15 15:03:32 UTC (rev 859)
@@ -0,0 +1,86 @@
+\name{SNorm-class}
+\docType{class}
+\alias{SNorm-class}
+\alias{mean,SNorm-method}
+\alias{mean<-,SNorm-method}
+\alias{nu,SNorm-method}
+\alias{nu<-,SNorm-method}
+\alias{sd,SNorm-method}
+\alias{sd<-,SNorm-method}
+\alias{xi,SNorm-method}
+\alias{xi<-,SNorm-method}
+
+
+\title{SNorm distribution}
+\description{The skew normal distribution.}
+\section{Objects from the Class}{
+  Objects can be created by calls of the form \code{new("SNorm", mean, sd,xi)}.
+  More frequently they are created via the generating function 
+  \code{SNorm}.
+}
+\section{Slots}{
+  \describe{
+    \item{\code{img}}{Object of class \code{"Reals"}. }
+    \item{\code{param}}{Object of class \code{"SNormParameter"}. }
+    \item{\code{r}}{\code{rgpd}}
+    \item{\code{d}}{\code{dgpd}}
+    \item{\code{p}}{\code{pgpd}, but vectorized and with special treatment of 
+             arguments \code{lower.tail} and \code{log.p}}
+    \item{\code{q}}{\code{qgpd}, but vectorized and with special treatment of 
+             arguments \code{lower.tail} and \code{log.p}}
+    \item{\code{gaps}}{(numeric) matrix or \code{NULL}}
+    \item{\code{.withArith}}{logical: used internally to issue warnings as to interpretation of arithmetics}
+    \item{\code{.withSim}}{logical: used internally to issue warnings as to accuracy}
+    \item{\code{.logExact}}{logical: used internally to flag the case where there are explicit formulae for the
+                              log version of density, cdf, and quantile function}
+    \item{\code{.lowerExact}}{logical: used internally to flag the case where there are explicit formulae for the
+                              lower tail version of cdf and quantile function}
+  }
+}
+\section{Extends}{
+Class \code{"AbscontDistribution"}, directly.\cr
+Class \code{"UnivariateDistribution"}, by class \code{"AbscontDistribution"}.\cr
+Class \code{"Distribution"}, by class \code{"AbscontDistribution"}.
+}
+\section{Methods}{
+  \describe{
+    \item{xi}{\code{signature(object = "SNorm")}: wrapped access method for
+      slot \code{xi} of slot \code{param}. }
+    \item{mean}{\code{signature(object = "SNorm")}: wrapped access method for
+      slot \code{mean} of slot \code{param}. }
+    \item{nu}{\code{signature(object = "SNorm")}:  wrapped access method for
+      slot \code{nu} of slot \code{param}. }
+    \item{sd}{\code{signature(x = "SNorm")}: wrapped access method for
+      slot \code{sd} of slot \code{param}. }
+
+    \item{xi<-}{\code{signature(object = "SNorm")}: wrapped replace method for
+      slot \code{xi} of slot \code{param}. }
+    \item{mean<-}{\code{signature(object = "SNorm")}: wrapped replace  method for
+      slot \code{mean} of slot \code{param}. }
+    \item{nu<-}{\code{signature(object = "SNorm")}: wrapped replace  method for
+      slot \code{nu} of slot \code{param}. }
+    \item{sd<-}{\code{signature(x = "SNorm")}: wrapped replace  method for
+      slot \code{sd} of slot \code{param}. }
+
+  }
+}
+\author{Peter Ruckdeschel \email{peter.ruckdeschel at itwm.fraunhofer.de}}
+\note{This class is based on the code provided by the package \pkg{fGarch}
+by  Diethelm Wuertz}
+\seealso{\code{\link[fGarch:snorm]{dsnorm}}, \code{\link[distr]{AbscontDistribution-class}}}
+\examples{
+(SN <- SNorm(xi=2)) # SN is a skewed normal distribution with nu = 3.
+set.seed(1)
+r(SN)(1) # one random number generated from this distribution, e.g. -0.4037723
+d(SN)(1) # Density of this distribution is  0.1914826 for x = 1.
+p(SN)(1) # Probability that x < 1 is 0.8374454.
+q(SN)(.1) # Probability that x < -1.137878 is 0.1.
+xi(SN) # shape of this distribution is 2.
+xi(SN) <- 2.5 # shape of this distribution is now 2.5.
+plot(SN)
+}
+\concept{SNorm}
+\keyword{distribution}
+\concept{extreme value distribution}
+\concept{absolutely continuous distribution}
+\concept{S4 distribution class}

Added: branches/distr-2.4/pkg/distrRmetrics/man/SNorm.Rd
===================================================================
--- branches/distr-2.4/pkg/distrRmetrics/man/SNorm.Rd	                        (rev 0)
+++ branches/distr-2.4/pkg/distrRmetrics/man/SNorm.Rd	2013-01-15 15:03:32 UTC (rev 859)
@@ -0,0 +1,33 @@
+\name{SNorm}
+\alias{SNorm}
+
+\title{Generating function for skewed normal class}
+\description{
+  Generates an object of class \code{"SNorm"}.
+}
+\usage{SNorm(mean = 0, sd = 1, xi = 1.5)}
+\arguments{
+  \item{mean}{ real number: location parameter of
+    the SNorm distribution. }
+   \item{sd}{ positive real number: scale parameter
+    of the SNorm distribution }
+   \item{xi}{ positive real number: shape parameter of
+    the SSTd distribution. }
+}
+%\details{}
+\value{Object of class \code{"SNorm"}}
+%\references{}
+\author{Peter Ruckdeschel \email{peter.ruckdeschel at itwm.fraunhofer.de}}
+\note{This class is based on the code provided by the package \pkg{fGarch}
+by  Diethelm Wuertz}
+\seealso{\code{\link[fGarch:snorm]{dsnorm}}, \code{\link[distr]{AbscontDistribution-class}}}
+\examples{
+(SN <- SNorm(mean = 1, sd = 1, xi = 0.5))
+plot(SN)
+}
+
+\concept{SNorm}
+\keyword{distribution}
+\concept{absolutely continuous distribution}
+\concept{SNorm distribution}
+\concept{generating function}

Added: branches/distr-2.4/pkg/distrRmetrics/man/SNormParameter-class.Rd
===================================================================
--- branches/distr-2.4/pkg/distrRmetrics/man/SNormParameter-class.Rd	                        (rev 0)
+++ branches/distr-2.4/pkg/distrRmetrics/man/SNormParameter-class.Rd	2013-01-15 15:03:32 UTC (rev 859)
@@ -0,0 +1,56 @@
+\name{SNormParameter-class}
+\docType{class}
+\alias{SNormParameter-class}
+\alias{mean,SNormParameter-method}
+\alias{sd,SNormParameter-method}
+\alias{xi,SNormParameter-method}
+
+
+\title{Parameter of an SNorm distributions}
+\description{The class of the parameter of an SNorm distribution.}
+\section{Objects from the Class}{
+Objects can be created by calls of the form \code{new("SNormParameter", ...)}.
+}
+\section{Slots}{
+  \describe{
+    \item{\code{mean}}{ real number: location parameter of
+      a SNorm distribution. }
+    \item{\code{sd}}{ real number: scale parameter of
+      a SNorm distribution. }
+    \item{\code{name}}{ default name is
+      \dQuote{parameter of a SNorm distribution}. }
+    \item{\code{xi}}{ real number: shape parameter of
+      a SNorm distribution. }
+  }
+}
+\section{Extends}{
+Class \code{"Parameter"}, directly.\cr
+Class \code{"OptionalParameter"}, by class \code{"Parameter"}.
+}
+\section{Methods}{
+  \describe{
+    \item{mean}{\code{signature(object = "SNormParameter")}: access method for
+      slot \code{mean}. }
+    \item{sd}{\code{signature(object = "SNormParameter")}: access method for
+      slot \code{sd}. }
+    \item{xi}{\code{signature(object = "SNormParameter")}: access method for
+      slot \code{xi}. }
+  }
+}
+%\references{}
+\author{Peter Ruckdeschel \email{peter.ruckdeschel at itwm.fraunhofer.de}}
+%\note{}
+\seealso{\code{\link{SNorm-class}}, \code{\link[distr]{Parameter-class}}}
+\examples{
+P <- new("SNormParameter")
+mean(P)
+sd(P)
+xi(P)
+P
+}
+\concept{SNorm distribution}
+\keyword{distribution}
+\concept{parameter}
+\concept{S4 parameter class}
+\keyword{models}
+\concept{generating function}

Added: branches/distr-2.4/pkg/distrRmetrics/man/SSTd-class.Rd
===================================================================
--- branches/distr-2.4/pkg/distrRmetrics/man/SSTd-class.Rd	                        (rev 0)
+++ branches/distr-2.4/pkg/distrRmetrics/man/SSTd-class.Rd	2013-01-15 15:03:32 UTC (rev 859)
@@ -0,0 +1,94 @@
+\name{SSTd-class}
+\docType{class}
+\alias{SSTd-class}
+\alias{mean,SSTd-method}
+\alias{mean<-,SSTd-method}
+\alias{nu}
+\alias{nu-methods}
+\alias{nu<-}
+\alias{nu<--methods}
+\alias{nu,SSTd-method}
+\alias{nu<-,SSTd-method}
+\alias{sd,SSTd-method}
+\alias{sd<-,SSTd-method}
+\alias{xi}
+\alias{xi-methods}
+\alias{xi<-}
+\alias{xi<--methods}
+\alias{xi,SSTd-method}
+\alias{xi<-,SSTd-method}
+
+
+\title{SSTd distribution}
+\description{The standardized skew Student-t distribution.}
+\section{Objects from the Class}{
+  Objects can be created by calls of the form \code{new("SSTd", mean, sd,xi)}.
+  More frequently they are created via the generating function 
+  \code{SSTd}.
+}
+\section{Slots}{
+  \describe{
+    \item{\code{img}}{Object of class \code{"Reals"}. }
+    \item{\code{param}}{Object of class \code{"SSTdParameter"}. }
+    \item{\code{r}}{\code{rgpd}}
+    \item{\code{d}}{\code{dgpd}}
+    \item{\code{p}}{\code{pgpd}, but vectorized and with special treatment of 
+             arguments \code{lower.tail} and \code{log.p}}
+    \item{\code{q}}{\code{qgpd}, but vectorized and with special treatment of 
+             arguments \code{lower.tail} and \code{log.p}}
+    \item{\code{gaps}}{(numeric) matrix or \code{NULL}}
+    \item{\code{.withArith}}{logical: used internally to issue warnings as to interpretation of arithmetics}
+    \item{\code{.withSim}}{logical: used internally to issue warnings as to accuracy}
+    \item{\code{.logExact}}{logical: used internally to flag the case where there are explicit formulae for the
+                              log version of density, cdf, and quantile function}
+    \item{\code{.lowerExact}}{logical: used internally to flag the case where there are explicit formulae for the
+                              lower tail version of cdf and quantile function}
+  }
+}
+\section{Extends}{
+Class \code{"AbscontDistribution"}, directly.\cr
+Class \code{"UnivariateDistribution"}, by class \code{"AbscontDistribution"}.\cr
+Class \code{"Distribution"}, by class \code{"AbscontDistribution"}.
+}
+\section{Methods}{
+  \describe{
+    \item{xi}{\code{signature(object = "SSTd")}: wrapped access method for
+      slot \code{xi} of slot \code{param}. }
+    \item{mean}{\code{signature(object = "SSTd")}: wrapped access method for
+      slot \code{mean} of slot \code{param}. }
+    \item{nu}{\code{signature(object = "SSTd")}:  wrapped access method for
+      slot \code{nu} of slot \code{param}. }
+    \item{sd}{\code{signature(x = "SSTd")}: wrapped access method for
+      slot \code{sd} of slot \code{param}. }
+
+    \item{xi<-}{\code{signature(object = "SSTd")}: wrapped replace method for
+      slot \code{xi} of slot \code{param}. }
+    \item{mean<-}{\code{signature(object = "SSTd")}: wrapped replace  method for
+      slot \code{mean} of slot \code{param}. }
+    \item{nu<-}{\code{signature(object = "SSTd")}: wrapped replace  method for
+      slot \code{nu} of slot \code{param}. }
+    \item{sd<-}{\code{signature(x = "SSTd")}: wrapped replace  method for
+      slot \code{sd} of slot \code{param}. }
+
+  }
+}
+\author{Peter Ruckdeschel \email{peter.ruckdeschel at itwm.fraunhofer.de}}
+\note{This class is based on the code provided by the package \pkg{fGarch}
+by  Diethelm Wuertz}
+\seealso{\code{\link[fGarch:sstd]{dsstd}}, \code{\link[distr]{AbscontDistribution-class}}}
+\examples{
+(ST <- SSTd(xi=2, nu = 3)) # ST is a skewed t distribution with xi = 2 and nu = 3.
+set.seed(1)
+r(ST)(1) # one random number generated from this distribution, e.g. -0.4432824
+d(ST)(1) # Density of this distribution is 0.1204624 for x = 1.
+p(ST)(1) # Probability that x < 1 is 0.9035449.
+q(ST)(.1) # Probability that x < -0.4432824 is 0.1.
+nu(ST) # df of this distribution is 3.
+nu(ST) <- 4.5 # df of this distribution is now 4.5
+plot(ST)
+}
+\concept{SSTd}
+\keyword{distribution}
+\concept{extreme value distribution}
+\concept{absolutely continuous distribution}
+\concept{S4 distribution class}

Added: branches/distr-2.4/pkg/distrRmetrics/man/SSTd.Rd
===================================================================
--- branches/distr-2.4/pkg/distrRmetrics/man/SSTd.Rd	                        (rev 0)
+++ branches/distr-2.4/pkg/distrRmetrics/man/SSTd.Rd	2013-01-15 15:03:32 UTC (rev 859)
@@ -0,0 +1,36 @@
+\name{SSTd}
+\alias{SSTd}
+
+\title{Generating function for SSTd-class}
+\description{
+  Generates an object of class \code{"SSTd"}.
+}
+\usage{SSTd(mean = 0, sd = 1, nu = 5, xi = 1.5)}
+\arguments{
+  \item{mean}{ real number: location parameter of
+    the SSTd distribution. }
+   \item{sd}{ positive real number: scale parameter
+    of the SSTd distribution }
+   \item{xi}{ positive real number: shape parameter of
+    the SSTd distribution. }
+  \item{nu}{ real number larger than 2: degree of freedom parameter of
+    the SSTd distribution.}
+ 
+}
+%\details{}
+\value{Object of class \code{"SSTd"}}
+%\references{}
+\author{Peter Ruckdeschel \email{peter.ruckdeschel at itwm.fraunhofer.de}}
+\note{This class is based on the code provided by the package \pkg{fGarch}
+by  Diethelm Wuertz}
+\seealso{\code{\link[fGarch:sstd]{dsstd}}, \code{\link[distr]{AbscontDistribution-class}}}
+\examples{
+(ST <- SSTd(mean = 1, sd = 1, xi = 0.5))
+plot(ST)
+}
+
+\concept{SSTd}
+\keyword{distribution}
+\concept{absolutely continuous distribution}
+\concept{SSTd distribution}
+\concept{generating function}

Added: branches/distr-2.4/pkg/distrRmetrics/man/SSTdParameter-class.Rd
===================================================================
--- branches/distr-2.4/pkg/distrRmetrics/man/SSTdParameter-class.Rd	                        (rev 0)
+++ branches/distr-2.4/pkg/distrRmetrics/man/SSTdParameter-class.Rd	2013-01-15 15:03:32 UTC (rev 859)
@@ -0,0 +1,62 @@
+\name{SSTdParameter-class}
+\docType{class}
+\alias{SSTdParameter-class}
+\alias{mean,SSTdParameter-method}
+\alias{sd,SSTdParameter-method}
+\alias{xi,SSTdParameter-method}
+\alias{nu,SSTdParameter-method}
+
+
+\title{Parameter of an SSTd distributions}
+\description{The class of the parameter of an SSTd distribution.}
+\section{Objects from the Class}{
+Objects can be created by calls of the form \code{new("SSTdParameter", ...)}.
+}
+\section{Slots}{
+  \describe{
+    \item{\code{mean}}{ real number: location parameter of
+      a SSTd distribution. }
+    \item{\code{sd}}{ real number: scale parameter of
+      a SSTd distribution. }
+    \item{\code{xi}}{ real number: shape parameter of
+      a SSTd distribution. }
+    \item{\code{nu}}{ positive number: the degree of freedom parameter
+     of a SSTd distribution. }
+    \item{\code{name}}{ default name is
+      \dQuote{parameter of a SSTd distribution}. }
+  }
+}
+\section{Extends}{
+Class \code{"Parameter"}, directly.\cr
+Class \code{"OptionalParameter"}, by class \code{"Parameter"}.
+}
+\section{Methods}{
+  \describe{
+    \item{mean}{\code{signature(object = "SSTdParameter")}: access method for
+      slot \code{mean}. }
+    \item{sd}{\code{signature(object = "SSTdParameter")}: access method for
+      slot \code{sd}. }
+    \item{xi}{\code{signature(object = "SSTdParameter")}: access method for
+      slot \code{xi}. }
+    \item{nu}{\code{signature(object = "SSTdParameter")}: access method for
+      slot \code{nu}. }
+  }
+}
+%\references{}
+\author{Peter Ruckdeschel \email{peter.ruckdeschel at itwm.fraunhofer.de}}
+%\note{}
+\seealso{\code{\link{SSTd-class}}, \code{\link[distr]{Parameter-class}}}
+\examples{
+P <- new("SSTdParameter")
+mean(P)
+sd(P)
+xi(P)
+nu(P)
+P
+}
+\concept{SSTd distribution}
+\keyword{distribution}
+\concept{parameter}
+\concept{S4 parameter class}
+\keyword{models}
+\concept{generating function}

Added: branches/distr-2.4/pkg/distrRmetrics/man/STd.Rd
===================================================================
--- branches/distr-2.4/pkg/distrRmetrics/man/STd.Rd	                        (rev 0)
+++ branches/distr-2.4/pkg/distrRmetrics/man/STd.Rd	2013-01-15 15:03:32 UTC (rev 859)
@@ -0,0 +1,37 @@
+\name{STd}
+\alias{STd}
+
+\title{Generating function for standardized T distribution class}
+\description{
+  Generates a scaled object of class \code{"Td"};
+  the scale (sd) is chosen such that \code{STd(nu=3, sd=1)} has variance 1
+  independently from the degrees of freedom \code{nu}. This object
+  is of class \code{"AffLinAbscontDistribution"}.
+}
+\usage{STd(mean = 0, sd = 1, nu = 5)}
+\arguments{
+  \item{mean}{ real number: location parameter of
+    the STd distribution. }
+   \item{sd}{ positive real number: scale parameter
+    of the STd distribution }
+  \item{nu}{ real number larger than 2: degree of freedom parameter of
+    the STd distribution.}
+ 
+}
+%\details{}
+\value{Object of class \code{"STd"}}
+%\references{}
+\author{Peter Ruckdeschel \email{peter.ruckdeschel at itwm.fraunhofer.de}}
+\note{This class is based on the code provided by the package \pkg{fGarch}
+by  Diethelm Wuertz}
+\seealso{\code{\link[fGarch:std]{dstd}}, \code{\link[distr]{AbscontDistribution-class}}}
+\examples{
+(ST <- STd(mean = 1, sd = 1, nu = 3))
+plot(ST)
+}
+
+\concept{STd}
+\keyword{distribution}
+\concept{absolutely continuous distribution}
+\concept{STd distribution}
+\concept{generating function}

Modified: branches/distr-2.5/pkg/distrRmetrics/DESCRIPTION
===================================================================
--- branches/distr-2.5/pkg/distrRmetrics/DESCRIPTION	2013-01-15 11:46:19 UTC (rev 858)
+++ branches/distr-2.5/pkg/distrRmetrics/DESCRIPTION	2013-01-15 15:03:32 UTC (rev 859)
@@ -1,8 +1,8 @@
 Package: distrRmetrics
-Version: 2.4
-Date: 2012-09-13
+Version: 2.5
+Date: 2013-01-14
 Title: Package distr classes for distributions from Rmetrics
-Depends: R(>= 2.6.0), methods, distr(>= 2.4), fBasics(>=270.73), fGarch(>=270.73)
+Depends: R(>= 2.6.0), methods, startupmsg, distr(>= 2.4), fBasics(>= 270.73), fGarch(>= 270.73)
 Suggests: distrEx(>= 2.4), distrMod(>= 2.4)
 Author: Nataliya Horbenko, Matthias Kohl, Daria Pupashenko, Myhailo Pupashenko, Peter Ruckdeschel
 Description: (S4-)distribution classes based on package distr for distributions from packages fBasics and fGarch

Modified: branches/distr-2.5/pkg/distrRmetrics/NAMESPACE
===================================================================
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/distr -r 859


More information about the Distr-commits mailing list