[Distr-commits] r414 - in branches/distr-2.1/pkg: distrEx/R distrEx/chm distrEx/man distrMod/chm distrMod/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Mar 18 22:20:01 CET 2009


Author: ruckdeschel
Date: 2009-03-18 22:20:01 +0100 (Wed, 18 Mar 2009)
New Revision: 414

Added:
   branches/distr-2.1/pkg/distrEx/R/Pareto.R
   branches/distr-2.1/pkg/distrEx/chm/Pareto-class.html
   branches/distr-2.1/pkg/distrEx/chm/Pareto.html
   branches/distr-2.1/pkg/distrEx/chm/ParetoParameter-class.html
   branches/distr-2.1/pkg/distrEx/man/Pareto-class.Rd
   branches/distr-2.1/pkg/distrEx/man/Pareto.Rd
   branches/distr-2.1/pkg/distrEx/man/ParetoParameter-class.Rd
   branches/distr-2.1/pkg/distrMod/chm/trafoEst.html
   branches/distr-2.1/pkg/distrMod/man/trafoEst.Rd
Log:
forgot new files Pareto*.R* ...

Added: branches/distr-2.1/pkg/distrEx/R/Pareto.R
===================================================================
--- branches/distr-2.1/pkg/distrEx/R/Pareto.R	                        (rev 0)
+++ branches/distr-2.1/pkg/distrEx/R/Pareto.R	2009-03-18 21:20:01 UTC (rev 414)
@@ -0,0 +1,49 @@
+
+################################
+##
+## Class: ParetoParameter
+##                             
+################################
+
+## Access Methods
+setMethod("shape", "ParetoParameter", function(object) object at shape)
+setMethod("Min", "ParetoParameter", function(object) object at Min)
+
+## Replace Methods
+setReplaceMethod("shape", "ParetoParameter", 
+                  function(object, value){ object at shape <- value; object})
+setReplaceMethod("Min", "ParetoParameter", 
+                  function(object, value){ object at Min <- value; object})
+
+setValidity("ParetoParameter", function(object){
+  if(length(shape(object)) != 1)
+    stop("shape has to be a numeric of length 1")    
+  if(shape(object) <= 0)
+    stop("shape has to be positive")
+  if(length(Min(object)) != 1)
+    stop("Min has to be a numeric of length 1")    
+  if(Min(object) <= 0)
+    stop("Min has to be positive")
+  else return(TRUE)
+})
+
+################################
+##            .Object at img <- new("Naturals")
+
+## Class: Pareto distribution
+##
+################################
+
+Pareto <- function(shape = 1, Min = 1) 
+               new("Pareto", shape = shape, Min = Min)
+
+## wrapped access methods
+setMethod("shape", "Pareto", function(object) shape(param(object)))
+setMethod("Min", "Pareto", function(object) Min(param(object)))
+
+## wrapped replace methods
+setMethod("shape<-", "Pareto", function(object, value) 
+           new("Pareto", shape = value, Min = Min(object)))
+setMethod("Min<-", "Pareto", function(object, value) 
+           new("Pareto", shape = shape(object), Min = value))
+

Added: branches/distr-2.1/pkg/distrEx/chm/Pareto-class.html
===================================================================
--- branches/distr-2.1/pkg/distrEx/chm/Pareto-class.html	                        (rev 0)
+++ branches/distr-2.1/pkg/distrEx/chm/Pareto-class.html	2009-03-18 21:20:01 UTC (rev 414)
@@ -0,0 +1,149 @@
+<html><head><title>Pareto distribution</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<link rel="stylesheet" type="text/css" href="Rchm.css">
+</head>
+<body>
+
+<table width="100%"><tr><td>Pareto-class(distrEx)</td><td align="right">R Documentation</td></tr></table><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
+<param name="keyword" value="R:   Pareto-class">
+<param name="keyword" value="R:   initialize,Pareto-method">
+<param name="keyword" value="R:   shape,Pareto-method">
+<param name="keyword" value="R:   shape<-,Pareto-method">
+<param name="keyword" value="R:   Min,Pareto-method">
+<param name="keyword" value="R:   Min<-,Pareto-method">
+<param name="keyword" value=" Pareto distribution">
+</object>
+
+
+<h2>Pareto distribution</h2>
+
+
+<h3>Description</h3>
+
+<p>
+[borrowed from <span class="pkg">actuar</span>]:
+</p>
+<p>
+The (Single-parameter) Pareto distribution with parameter <code>shape</code>
+<i>= a</i> has density:
+</p><p align="center"><i>f(x) = a b^a/x^(a + 1)</i></p><p>
+for <i>x &gt; b</i>, <i>a &gt; 0</i> and <i>b &gt; 0</i>.
+</p>
+<p>
+Although there appears to be two parameters, only <code>shape</code> is a true
+parameter. The value of <code>min</code> <i>= b</i> must be set in
+advance.
+</p>
+
+
+<h3>Objects from the Class</h3>
+
+<p>
+Objects can be created by calls of the form <code>new("Pareto", shape, Min)</code>.
+More frequently they are created via the generating function 
+<code>Pareto</code>.
+</p>
+
+
+<h3>Slots</h3>
+
+<dl>
+<dt><code>img</code>:</dt><dd>Object of class <code>"Reals"</code>. </dd>
+<dt><code>param</code>:</dt><dd>Object of class <code>"ParetoParameter"</code>. </dd>
+<dt><code>r</code>:</dt><dd><code>rpareto1</code></dd>
+<dt><code>d</code>:</dt><dd><code>dpareto1</code></dd>
+<dt><code>p</code>:</dt><dd><code>ppareto1</code></dd>
+<dt><code>q</code>:</dt><dd><code>qpareto1</code></dd>
+</dl>
+
+<h3>Extends</h3>
+
+<p>
+Class <code>"AbscontDistribution"</code>, directly.<br>
+Class <code>"UnivariateDistribution"</code>, by class <code>"AbscontDistribution"</code>.<br>
+Class <code>"Distribution"</code>, by class <code>"AbscontDistribution"</code>.
+</p>
+
+
+<h3>Methods</h3>
+
+<dl>
+<dt>initialize</dt><dd><code>signature(.Object = "Pareto")</code>: initialize method. </dd>
+
+
+<dt>shape</dt><dd><code>signature(object = "Pareto")</code>: wrapped access method for
+slot <code>shape</code> of slot <code>param</code>. </dd>
+
+
+<dt>Min</dt><dd><code>signature(x = "Pareto")</code>: wrapped access method for
+slot <code>Min</code> of slot <code>param</code>. </dd>
+
+
+<dt>shape&lt;-</dt><dd><code>signature(object = "Pareto")</code>: wrapped replace method for
+slot <code>shape</code> of slot <code>param</code>. </dd>
+
+
+<dt>Min&lt;-</dt><dd><code>signature(x = "Pareto")</code>: wrapped replace method for
+slot <code>Min</code> of slot <code>param</code>. </dd>
+
+<p>
+</dl>
+
+<h3>Note</h3>
+
+<p>
+This class is based on the code provided by the package <span class="pkg">actuar</span>
+by  Vincent Goulet and Mathieu Pigeon.
+</p>
+
+
+<h3>Author(s)</h3>
+
+<p>
+Nataliya Horbenko <a href="mailto:Nataliya.Horbenko at itwm.fraunhofer.de">Nataliya.Horbenko at itwm.fraunhofer.de</a>
+</p>
+
+
+<h3>References</h3>
+
+<p>
+Johnson et al. (1995) <EM>Continuous Univariate Distributions. Vol. 2. 2nd ed.</EM>
+New York: Wiley.<br>
+Klugman, S. A., Panjer, H. H. and Willmot, G. E. (2004),
+<EM>Loss Models, From Data to Decisions, Second Edition</EM>, Wiley.
+</p>
+
+
+<h3>See Also</h3>
+
+<p>
+<code><a onclick="findlink('actuar', 'dpareto1.html')" style="text-decoration: underline; color: blue; cursor: hand">dpareto1</a></code>, <code><a onclick="findlink('distr', 'AbscontDistribution-class.html')" style="text-decoration: underline; color: blue; cursor: hand">AbscontDistribution-class</a></code>
+</p>
+
+
+<h3>Examples</h3>
+
+<pre>
+(P1 &lt;- new("Pareto", shape = 1, Min = 2))
+plot(P1)
+shape(P1)
+Min(P1)
+shape(P1) &lt;- 4
+Min(P1) &lt;- 2
+plot(P1)
+</pre>
+
+<script Language="JScript">
+function findlink(pkg, fn) {
+var Y, link;
+Y = location.href.lastIndexOf("\\") + 1;
+link = location.href.substring(0, Y);
+link = link + "../../" + pkg + "/chtml/" + pkg + ".chm::/" + fn;
+location.href = link;
+}
+</script>
+
+
+<hr><div align="center">[Package <em>distrEx</em> version 2.1 <a href="00Index.html">Index</a>]</div>
+
+</body></html>

Added: branches/distr-2.1/pkg/distrEx/chm/Pareto.html
===================================================================
--- branches/distr-2.1/pkg/distrEx/chm/Pareto.html	                        (rev 0)
+++ branches/distr-2.1/pkg/distrEx/chm/Pareto.html	2009-03-18 21:20:01 UTC (rev 414)
@@ -0,0 +1,95 @@
+<html><head><title>Generating function for Pareto-class</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<link rel="stylesheet" type="text/css" href="Rchm.css">
+</head>
+<body>
+
+<table width="100%"><tr><td>Pareto(distrEx)</td><td align="right">R Documentation</td></tr></table><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
+<param name="keyword" value="R:   Pareto">
+<param name="keyword" value=" Generating function for Pareto-class">
+</object>
+
+
+<h2>Generating function for Pareto-class</h2>
+
+
+<h3>Description</h3>
+
+<p>
+Generates an object of class <code>"Pareto"</code>.
+</p>
+
+
+<h3>Usage</h3>
+
+<pre>Pareto(shape = 1, Min = 1)</pre>
+
+
+<h3>Arguments</h3>
+
+<table summary="R argblock">
+<tr valign="top"><td><code>shape</code></td>
+<td>
+positive real number: shape parameter of 
+the Pareto distribution. </td></tr>
+<tr valign="top"><td><code>Min</code></td>
+<td>
+positive real number: Min parameter
+of the Pareto distribution </td></tr>
+</table>
+
+<h3>Value</h3>
+
+<p>
+Object of class <code>"Pareto"</code></p>
+
+<h3>Note</h3>
+
+<p>
+The class <code>"Pareto"</code> is based on the code provided 
+by the package <span class="pkg">actuar</span> by  Vincent Goulet and Mathieu Pigeon.
+</p>
+
+
+<h3>Author(s)</h3>
+
+<p>
+Nataliya Horbenko <a href="mailto:Nataliya.Horbenko at itwm.fraunhofer.de">Nataliya.Horbenko at itwm.fraunhofer.de</a>
+</p>
+
+
+<h3>See Also</h3>
+
+<p>
+<code><a href="Pareto-class.html">Pareto-class</a></code>, <code><a onclick="findlink('actuar', 'dpareto1.html')" style="text-decoration: underline; color: blue; cursor: hand">dpareto1</a></code>
+</p>
+
+
+<h3>Examples</h3>
+
+<pre>
+(P1 &lt;- Pareto(shape = 1, Min = 1))
+plot(P1)
+
+E(Pareto()) 
+E(P1, function(x){x^2})
+
+## The function is currently defined as
+function(shape = 1, Min = 1) 
+               new("Pareto", shape = shape, Min = Min)
+</pre>
+
+<script Language="JScript">
+function findlink(pkg, fn) {
+var Y, link;
+Y = location.href.lastIndexOf("\\") + 1;
+link = location.href.substring(0, Y);
+link = link + "../../" + pkg + "/chtml/" + pkg + ".chm::/" + fn;
+location.href = link;
+}
+</script>
+
+
+<hr><div align="center">[Package <em>distrEx</em> version 2.1 <a href="00Index.html">Index</a>]</div>
+
+</body></html>

Added: branches/distr-2.1/pkg/distrEx/chm/ParetoParameter-class.html
===================================================================
--- branches/distr-2.1/pkg/distrEx/chm/ParetoParameter-class.html	                        (rev 0)
+++ branches/distr-2.1/pkg/distrEx/chm/ParetoParameter-class.html	2009-03-18 21:20:01 UTC (rev 414)
@@ -0,0 +1,101 @@
+<html><head><title>Paramter of Pareto distributions</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<link rel="stylesheet" type="text/css" href="Rchm.css">
+</head>
+<body>
+
+<table width="100%"><tr><td>ParetoParameter-class(distrEx)</td><td align="right">R Documentation</td></tr></table><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
+<param name="keyword" value="R:   ParetoParameter-class">
+<param name="keyword" value="R:   shape">
+<param name="keyword" value="R:   shape,ParetoParameter-method">
+<param name="keyword" value="R:   shape<-">
+<param name="keyword" value="R:   shape<-,ParetoParameter-method">
+<param name="keyword" value="R:   Min,ParetoParameter-method">
+<param name="keyword" value="R:   Min<-,ParetoParameter-method">
+<param name="keyword" value=" Paramter of Pareto distributions">
+</object>
+
+
+<h2>Paramter of Pareto distributions</h2>
+
+
+<h3>Description</h3>
+
+<p>
+The class of the parameter of Pareto distributions.
+</p>
+
+
+<h3>Objects from the Class</h3>
+
+<p>
+Objects can be created by calls of the form <code>new("ParetoParameter", ...)</code>.
+</p>
+
+
+<h3>Slots</h3>
+
+<dl>
+<dt><code>shape</code>:</dt><dd>real number: shape parameter of 
+a Pareto distribution. </dd>
+<dt><code>Min</code>:</dt><dd>positive real number: Min
+parameter of a Pareto distribution. </dd>
+<dt><code>name</code>:</dt><dd>default name is 
+&ldquo;parameter of a Pareto distribution&rdquo;. </dd>
+</dl>
+
+<h3>Extends</h3>
+
+<p>
+Class <code>"Parameter"</code>, directly.<br>
+Class <code>"OptionalParameter"</code>, by class <code>"Parameter"</code>.
+</p>
+
+
+<h3>Methods</h3>
+
+<dl>
+<dt>shape</dt><dd><code>signature(object = "ParetoParameter")</code>: access method for
+slot <code>shape</code>. </dd>
+<dt>Min</dt><dd><code>signature(x = "ParetoParameter")</code>: access method for
+slot <code>Min</code>. </dd>
+<dt>shape&lt;-</dt><dd><code>signature(object = "ParetoParameter")</code>: replace method for
+slot <code>shape</code>. </dd>
+<dt>Min&lt;-</dt><dd><code>signature(x = "ParetoParameter")</code>: replace method for
+slot <code>Min</code>. </dd>
+</dl>
+
+<h3>Author(s)</h3>
+
+<p>
+Nataliya Horbenko <a href="mailto:Nataliya.Horbenko at itwm.fraunhofer.de">Nataliya.Horbenko at itwm.fraunhofer.de</a>
+</p>
+
+
+<h3>See Also</h3>
+
+<p>
+<code><a href="Pareto-class.html">Pareto-class</a></code>, <code><a onclick="findlink('distr', 'Parameter-class.html')" style="text-decoration: underline; color: blue; cursor: hand">Parameter-class</a></code>
+</p>
+
+
+<h3>Examples</h3>
+
+<pre>
+new("ParetoParameter")
+</pre>
+
+<script Language="JScript">
+function findlink(pkg, fn) {
+var Y, link;
+Y = location.href.lastIndexOf("\\") + 1;
+link = location.href.substring(0, Y);
+link = link + "../../" + pkg + "/chtml/" + pkg + ".chm::/" + fn;
+location.href = link;
+}
+</script>
+
+
+<hr><div align="center">[Package <em>distrEx</em> version 2.1 <a href="00Index.html">Index</a>]</div>
+
+</body></html>

Added: branches/distr-2.1/pkg/distrEx/man/Pareto-class.Rd
===================================================================
--- branches/distr-2.1/pkg/distrEx/man/Pareto-class.Rd	                        (rev 0)
+++ branches/distr-2.1/pkg/distrEx/man/Pareto-class.Rd	2009-03-18 21:20:01 UTC (rev 414)
@@ -0,0 +1,84 @@
+\name{Pareto-class}
+\docType{class}
+\alias{Pareto-class}
+\alias{initialize,Pareto-method}
+\alias{shape,Pareto-method}
+\alias{shape<-,Pareto-method}
+\alias{Min,Pareto-method}
+\alias{Min<-,Pareto-method}
+
+\title{Pareto distribution}
+\description{[borrowed from \pkg{actuar}]:
+ 
+  The (Single-parameter) Pareto distribution with parameter \code{shape}
+  \eqn{= \alpha}{= a} has density:
+  \deqn{f(x) = \frac{\alpha \theta^\alpha}{x^{\alpha + 1}}}{%
+    f(x) = a b^a/x^(a + 1)}
+  for \eqn{x > \theta}{x > b}, \eqn{\alpha > 0}{a > 0} and \eqn{\theta >
+    0}{b > 0}.
+  
+  Although there appears to be two parameters, only \code{shape} is a true
+  parameter. The value of \code{min} \eqn{= \theta}{= b} must be set in
+  advance.
+}
+\section{Objects from the Class}{
+  Objects can be created by calls of the form \code{new("Pareto", shape, Min)}.
+  More frequently they are created via the generating function 
+  \code{Pareto}.
+}
+\section{Slots}{
+  \describe{
+    \item{\code{img}:}{Object of class \code{"Reals"}. }
+    \item{\code{param}:}{Object of class \code{"ParetoParameter"}. }
+    \item{\code{r}:}{\code{rpareto1}}
+    \item{\code{d}:}{\code{dpareto1}}
+    \item{\code{p}:}{\code{ppareto1}}
+    \item{\code{q}:}{\code{qpareto1}}
+  }
+}
+\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{initialize}{\code{signature(.Object = "Pareto")}: initialize method. }
+
+    \item{shape}{\code{signature(object = "Pareto")}: wrapped access method for
+      slot \code{shape} of slot \code{param}. }
+
+    \item{Min}{\code{signature(x = "Pareto")}: wrapped access method for
+      slot \code{Min} of slot \code{param}. }
+
+    \item{shape<-}{\code{signature(object = "Pareto")}: wrapped replace method for
+      slot \code{shape} of slot \code{param}. }
+
+    \item{Min<-}{\code{signature(x = "Pareto")}: wrapped replace method for
+      slot \code{Min} of slot \code{param}. }
+
+  }
+}
+\references{Johnson et al. (1995) \emph{Continuous Univariate Distributions. Vol. 2. 2nd ed.}
+    New York: Wiley.\cr
+  Klugman, S. A., Panjer, H. H. and Willmot, G. E. (2004),
+  \emph{Loss Models, From Data to Decisions, Second Edition}, Wiley.
+    }
+\author{Nataliya Horbenko \email{Nataliya.Horbenko at itwm.fraunhofer.de}}
+\note{This class is based on the code provided by the package \pkg{actuar}
+by  Vincent Goulet and Mathieu Pigeon.}
+\seealso{\code{\link[actuar]{dpareto1}}, \code{\link[distr]{AbscontDistribution-class}}}
+\examples{
+(P1 <- new("Pareto", shape = 1, Min = 2))
+plot(P1)
+shape(P1)
+Min(P1)
+shape(P1) <- 4
+Min(P1) <- 2
+plot(P1)
+}
+\concept{Pareto}
+\keyword{distribution}
+\concept{extreme value distribution}
+\concept{absolutely continuous distribution}
+\concept{S4 distribution class}

Added: branches/distr-2.1/pkg/distrEx/man/Pareto.Rd
===================================================================
--- branches/distr-2.1/pkg/distrEx/man/Pareto.Rd	                        (rev 0)
+++ branches/distr-2.1/pkg/distrEx/man/Pareto.Rd	2009-03-18 21:20:01 UTC (rev 414)
@@ -0,0 +1,38 @@
+\name{Pareto}
+\alias{Pareto}
+
+\title{Generating function for Pareto-class}
+\description{
+  Generates an object of class \code{"Pareto"}.
+}
+\usage{Pareto(shape = 1, Min = 1)}
+\arguments{
+  \item{shape}{ positive real number: shape parameter of 
+    the Pareto distribution. }
+  \item{Min}{ positive real number: Min parameter
+    of the Pareto distribution }
+}
+%\details{}
+\value{Object of class \code{"Pareto"}}
+%\references{}
+\author{Nataliya Horbenko \email{Nataliya.Horbenko at itwm.fraunhofer.de}}
+\note{The class \code{"Pareto"} is based on the code provided 
+  by the package \pkg{actuar} by  Vincent Goulet and Mathieu Pigeon.}
+\seealso{\code{\link{Pareto-class}}, \code{\link[actuar]{dpareto1}}}
+\examples{
+(P1 <- Pareto(shape = 1, Min = 1))
+plot(P1)
+
+E(Pareto()) 
+E(P1, function(x){x^2})
+
+## The function is currently defined as
+function(shape = 1, Min = 1) 
+               new("Pareto", shape = shape, Min = Min)
+}
+
+\concept{Pareto}
+\keyword{distribution}
+\concept{absolutely continuous distribution}
+\concept{Pareto distribution}
+\concept{generating function}

Added: branches/distr-2.1/pkg/distrEx/man/ParetoParameter-class.Rd
===================================================================
--- branches/distr-2.1/pkg/distrEx/man/ParetoParameter-class.Rd	                        (rev 0)
+++ branches/distr-2.1/pkg/distrEx/man/ParetoParameter-class.Rd	2009-03-18 21:20:01 UTC (rev 414)
@@ -0,0 +1,54 @@
+\name{ParetoParameter-class}
+\docType{class}
+\alias{ParetoParameter-class}
+\alias{shape}
+\alias{shape,ParetoParameter-method}
+\alias{shape<-}
+\alias{shape<-,ParetoParameter-method}
+\alias{Min,ParetoParameter-method}
+\alias{Min<-,ParetoParameter-method}
+
+\title{Paramter of Pareto distributions}
+\description{The class of the parameter of Pareto distributions.}
+\section{Objects from the Class}{
+Objects can be created by calls of the form \code{new("ParetoParameter", ...)}.
+}
+\section{Slots}{
+  \describe{
+    \item{\code{shape}:}{ real number: shape parameter of 
+      a Pareto distribution. }
+    \item{\code{Min}:}{ positive real number: Min
+      parameter of a Pareto distribution. }
+    \item{\code{name}:}{ default name is 
+      \dQuote{parameter of a Pareto distribution}. }
+  }
+}
+\section{Extends}{
+Class \code{"Parameter"}, directly.\cr
+Class \code{"OptionalParameter"}, by class \code{"Parameter"}.
+}
+\section{Methods}{
+  \describe{
+    \item{shape}{\code{signature(object = "ParetoParameter")}: access method for
+      slot \code{shape}. }
+    \item{Min}{\code{signature(x = "ParetoParameter")}: access method for
+      slot \code{Min}. }
+    \item{shape<-}{\code{signature(object = "ParetoParameter")}: replace method for
+      slot \code{shape}. }
+    \item{Min<-}{\code{signature(x = "ParetoParameter")}: replace method for
+      slot \code{Min}. }
+  }
+}
+%\references{}
+\author{Nataliya Horbenko \email{Nataliya.Horbenko at itwm.fraunhofer.de}}
+%\note{}
+\seealso{\code{\link{Pareto-class}}, \code{\link[distr]{Parameter-class}}}
+\examples{
+new("ParetoParameter")
+}
+\concept{Pareto distribution}
+\keyword{distribution}
+\concept{parameter}
+\concept{S4 parameter class}
+\keyword{models}
+\concept{generating function}

Added: branches/distr-2.1/pkg/distrMod/chm/trafoEst.html
===================================================================
--- branches/distr-2.1/pkg/distrMod/chm/trafoEst.html	                        (rev 0)
+++ branches/distr-2.1/pkg/distrMod/chm/trafoEst.html	2009-03-18 21:20:01 UTC (rev 414)
@@ -0,0 +1,106 @@
+<html><head><title>Function trafoEst in Package &lsquo;distrMod&rsquo;</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<link rel="stylesheet" type="text/css" href="Rchm.css">
+</head>
+<body>
+
+<table width="100%"><tr><td>trafoEst(distrMod)</td><td align="right">R Documentation</td></tr></table><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
+<param name="keyword" value="R:   trafoEst">
+<param name="keyword" value=" Function trafoEst in Package &lsquo;distrMod&rsquo;">
+</object>
+
+
+<h2>Function trafoEst in Package &lsquo;distrMod&rsquo;</h2>
+
+
+<h3>Description</h3>
+
+<p>
+<code>trafoEst</code> takes a <i>tau</i> like function (compare 
+<a onclick="findlink('trafo-methods', 'help to trafo-methods.html')" style="text-decoration: underline; color: blue; cursor: hand">help to trafo-methods</a> and transforms
+an existing estimator by means of this transformation
+</p>
+
+
+<h3>Usage</h3>
+
+<pre>
+trafoEst(fct, estimator)
+</pre>
+
+
+<h3>Arguments</h3>
+
+<table summary="R argblock">
+<tr valign="top"><td><code>fct</code></td>
+<td>
+a <i>tau</i> like function, i.e., a function
+in the main part <i>theta</i> of the parameter returning a list <code>list(fval, mat)</code>
+where  <code>fval</code> is the function value <i>tau(theta)</i>
+of the transformation, and <code>mat</code>, its derivative matrix at
+<i>theta</i>.</td></tr>
+<tr valign="top"><td><code>estimator</code></td>
+<td>
+an object of class <code>Estimator</code>.</td></tr>
+</table>
+
+<h3>Details</h3>
+
+<p>
+The disadvantage of this proceeding is that the transformation is
+not accounted for in determining the estimate (e.g. in a corresponding
+optimality); it simply transforms an existing estimator, without
+reapplying it to data. This becomes important in optimally robust
+estimation.
+</p>
+
+
+<h3>Value</h3>
+
+<p>
+exactly the argument <code>estimator</code>, but with modified slots
+<code>estimate</code>,   <code>asvar</code>, and   <code>trafo</code>.</p>
+
+<h3>Examples</h3>
+
+<pre>
+## Gaussian location and scale
+NS &lt;- NormLocationScaleFamily(mean=2, sd=3)
+## generate data out of this situation
+x &lt;- r(distribution(NS))(30)
+
+## want to estimate mu/sigma, sigma^2
+## -&gt; without new trafo slot:
+mtrafo &lt;- function(param){
+  mu &lt;- param["mean"]
+  sd &lt;- param["sd"]
+  fval &lt;- c(mu/sd, sd^2)
+  nfval &lt;- c("mu/sig", "sig^2")
+  names(fval) &lt;- nfval
+  mat &lt;- matrix(c(1/sd,0,-mu/sd^2,2*sd),2,2)
+  dimnames(mat) &lt;- list(nfval,c("mean","sd"))
+  return(list(fval=fval, mat=mat))
+}
+
+## Maximum likelihood estimator in the original problem
+res0 &lt;- MLEstimator(x = x, ParamFamily = NS)
+## transformation
+res &lt;- trafoEst(mtrafo, res0)
+## confidence interval
+ confint(res)
+</pre>
+
+<script Language="JScript">
+function findlink(pkg, fn) {
+var Y, link;
+Y = location.href.lastIndexOf("\\") + 1;
+link = location.href.substring(0, Y);
+link = link + "../../" + pkg + "/chtml/" + pkg + ".chm::/" + fn;
+location.href = link;
+}
+</script>
+
+
+<hr><div align="center">[Package <em>distrMod</em> version 2.1 <a href="00Index.html">Index</a>]</div>
+
+</body></html>

Added: branches/distr-2.1/pkg/distrMod/man/trafoEst.Rd
===================================================================
--- branches/distr-2.1/pkg/distrMod/man/trafoEst.Rd	                        (rev 0)
+++ branches/distr-2.1/pkg/distrMod/man/trafoEst.Rd	2009-03-18 21:20:01 UTC (rev 414)
@@ -0,0 +1,59 @@
+\name{trafoEst}
+\alias{trafoEst}
+
+\title{ Function trafoEst in Package `distrMod' }
+\description{
+  \code{trafoEst} takes a \eqn{\tau}{tau} like function (compare 
+  \link[trafo-methods]{help to trafo-methods} and transforms
+  an existing estimator by means of this transformation
+ }
+\usage{
+trafoEst(fct, estimator)
+}
+\arguments{
+  \item{fct}{a \eqn{\tau}{tau} like function, i.e., a function
+  in the main part \eqn{\theta}{theta} of the parameter returning a list \code{list(fval, mat)}
+  where  \code{fval} is the function value \eqn{\tau(\theta)}{tau(theta)}
+  of the transformation, and \code{mat}, its derivative matrix at
+  \eqn{\theta}{theta}.}
+  \item{estimator}{an object of class \code{Estimator}.}
+}
+\value{
+  exactly the argument \code{estimator}, but with modified slots
+  \code{estimate},   \code{asvar}, and   \code{trafo}.
+  }  
+\details{
+The disadvantage of this proceeding is that the transformation is
+not accounted for in determining the estimate (e.g. in a corresponding
+optimality); it simply transforms an existing estimator, without
+reapplying it to data. This becomes important in optimally robust
+estimation.
+}
+
+\examples{
+## Gaussian location and scale
+NS <- NormLocationScaleFamily(mean=2, sd=3)
+## generate data out of this situation
+x <- r(distribution(NS))(30)
+
+## want to estimate mu/sigma, sigma^2
+## -> without new trafo slot:
+mtrafo <- function(param){
+  mu <- param["mean"]
+  sd <- param["sd"]
+  fval <- c(mu/sd, sd^2)
+  nfval <- c("mu/sig", "sig^2")
+  names(fval) <- nfval
+  mat <- matrix(c(1/sd,0,-mu/sd^2,2*sd),2,2)
+  dimnames(mat) <- list(nfval,c("mean","sd"))
+  return(list(fval=fval, mat=mat))
+}
+
+## Maximum likelihood estimator in the original problem
+res0 <- MLEstimator(x = x, ParamFamily = NS)
+## transformation
+res <- trafoEst(mtrafo, res0)
+## confidence interval
+ confint(res)
+}
+\keyword{models}



More information about the Distr-commits mailing list