[Distr-commits] r252 - in branches/distr-2.0/pkg: distrDoc/inst/doc distrMod/R distrMod/chm distrMod/man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Aug 8 12:28:17 CEST 2008
Author: ruckdeschel
Date: 2008-08-08 12:28:16 +0200 (Fri, 08 Aug 2008)
New Revision: 252
Modified:
branches/distr-2.0/pkg/distrDoc/inst/doc/distr.Rnw
branches/distr-2.0/pkg/distrMod/R/0distrModOptions.R
branches/distr-2.0/pkg/distrMod/R/MCEstimator.R
branches/distr-2.0/pkg/distrMod/R/solve.R
branches/distr-2.0/pkg/distrMod/chm/00Index.html
branches/distr-2.0/pkg/distrMod/chm/L2LocationFamily.html
branches/distr-2.0/pkg/distrMod/chm/L2LocationScaleFamily.html
branches/distr-2.0/pkg/distrMod/chm/L2LocationUnknownScaleFamily.html
branches/distr-2.0/pkg/distrMod/chm/L2ScaleFamily.html
branches/distr-2.0/pkg/distrMod/chm/L2ScaleUnknownLocationFamily.html
branches/distr-2.0/pkg/distrMod/chm/distrMod.chm
branches/distr-2.0/pkg/distrMod/chm/distrMod.toc
branches/distr-2.0/pkg/distrMod/chm/modifyModel-methods.html
branches/distr-2.0/pkg/distrMod/man/distrModOptions.Rd
branches/distr-2.0/pkg/distrMod/man/solve-methods.Rd
Log:
+default behavior of solve is now controlled by distrModOptions()
+minor change in MCEstimator()
Modified: branches/distr-2.0/pkg/distrDoc/inst/doc/distr.Rnw
===================================================================
--- branches/distr-2.0/pkg/distrDoc/inst/doc/distr.Rnw 2008-08-08 04:23:50 UTC (rev 251)
+++ branches/distr-2.0/pkg/distrDoc/inst/doc/distr.Rnw 2008-08-08 10:28:16 UTC (rev 252)
@@ -1834,6 +1834,34 @@
%We are planning to switch to \code{distroptions}/\code{getdistrOption}-like
% commands in the next release of this package.
%
+\subsection[Options for distrMod]{Options for \pkg{distrMod}}
+Just as with to the \code{distroptions}/\code{getdistrOption} commands you
+may specify certain global output options to be used within the package with
+\code{distrModoptions}/\linebreak[4] \code{getdistrModOption}. These include
+\begin{itemize}
+%
+\item \code{use.generalized.inverse.by.default} %
+which is a logical variable
+giving the default value for argument \code{generalized} of our
+method \code{solve} in package \pkg{distrMod}. This argument decides whether
+our method \code{solve} is to use generalized inverses if the original
+\code{solve}-method from package \pkg{base} fails; if the option is set to
+\code{FALSE}, in case of failure, and unless argument \code{generalized}
+is not explicitely set to \code{TRUE}, \code{solve} will throw an error as is
+the \pkg{base}-method behavior. The default value of thie option is \code{TRUE}.
+%
+ \item \code{show.details} which controls the detailedness for method
+ \code{show} for objects of classes of the \pkg{distrXXX} family of packages. Possible
+ values are
+ \begin{itemize}
+ \item \code{"maximal"}: {all information is shown}
+ \item \code{"minimal"}: {only the most important information is shown}
+ \item \code{"medium"}: {somewhere in the middle; see actual \code{show}-methods
+ for details.}
+ \end{itemize}
+ The default value is \code{"maximal"}.
+\end{itemize}
+%
\subsection[Options for distrSim]{Options for \pkg{distrSim}}
Just as with to the \code{distroptions}/\code{getdistrOption} commands you
may specify certain global output options to be used within the package with
Modified: branches/distr-2.0/pkg/distrMod/R/0distrModOptions.R
===================================================================
--- branches/distr-2.0/pkg/distrMod/R/0distrModOptions.R 2008-08-08 04:23:50 UTC (rev 251)
+++ branches/distr-2.0/pkg/distrMod/R/0distrModOptions.R 2008-08-08 10:28:16 UTC (rev 252)
@@ -1,5 +1,6 @@
.distrModOptions <- list(
- show.details = "maximal"
+ show.details = "maximal",
+ use.generalized.inverse.by.default = TRUE
)
Modified: branches/distr-2.0/pkg/distrMod/R/MCEstimator.R
===================================================================
--- branches/distr-2.0/pkg/distrMod/R/MCEstimator.R 2008-08-08 04:23:50 UTC (rev 251)
+++ branches/distr-2.0/pkg/distrMod/R/MCEstimator.R 2008-08-08 10:28:16 UTC (rev 252)
@@ -49,16 +49,16 @@
theta <- as.numeric(res$par)
names(theta) <- c(names(main(ParamFamily)),names(nuisance(ParamFamily)))
crit <- res$value
- if(missing(crit.name))
- names(crit) <- as.character(match.call()$criterion)
- else
- names(crit) <- crit.name
}
- if(missing(crit.name))
+ if(missing(crit.name)){
+ names(crit) <- as.character(match.call()$criterion)
est.name <- "Minimum criterion estimate"
- else
+ }else{
+ names(crit) <- crit.name
est.name <- paste("Minimum", crit.name, "estimate", sep = " ")
+ }
+
if(missing(Infos))
Infos <- matrix(c(character(0),character(0)), ncol=2,
dimnames=list(character(0), c("method", "message")))
Modified: branches/distr-2.0/pkg/distrMod/R/solve.R
===================================================================
--- branches/distr-2.0/pkg/distrMod/R/solve.R 2008-08-08 04:23:50 UTC (rev 251)
+++ branches/distr-2.0/pkg/distrMod/R/solve.R 2008-08-08 10:28:16 UTC (rev 252)
@@ -1,4 +1,5 @@
-setMethod("solve", signature(a = "ANY", b = "ANY"), function(a,b, generalized = TRUE,
+setMethod("solve", signature(a = "ANY", b = "ANY"), function(a,b,
+ generalized = getdistrModOption("use.generalized.inverse.by.default"),
tol = .Machine$double.eps, ...) {
if(!generalized) return(base::solve(a,b, tol = tol, ...))
else if(is(try(return(base::solve(a,b, tol = tol, ...)),
@@ -11,7 +12,9 @@
}})
setMethod("solve", signature(a = "PosSemDefSymmMatrix", b = "ANY"),
- function(a,b, generalized = TRUE, tol = .Machine$double.eps, ...){
+ function(a,b,
+ generalized = getdistrModOption("use.generalized.inverse.by.default"),
+ tol = .Machine$double.eps, ...){
if(!generalized) return(base::solve(a,b, tol = tol, ...))
else{
er <- eigen(a)
Modified: branches/distr-2.0/pkg/distrMod/chm/00Index.html
===================================================================
--- branches/distr-2.0/pkg/distrMod/chm/00Index.html 2008-08-08 04:23:50 UTC (rev 251)
+++ branches/distr-2.0/pkg/distrMod/chm/00Index.html 2008-08-08 10:28:16 UTC (rev 252)
@@ -383,6 +383,8 @@
<td>Function to compute maximum likelihood estimates </td></tr>
<tr><td width="25%"><a href="modifyModel-methods.html">modifyModel</a></td>
<td>Methods for function modifyModel in Package ‘distrMod’ </td></tr>
+<tr><td width="25%"><a href="modifyModel-methods.html">modifyModel,GammaFamily,ParamFamParameter-method</a></td>
+<td>Methods for function modifyModel in Package ‘distrMod’ </td></tr>
<tr><td width="25%"><a href="modifyModel-methods.html">modifyModel,L2LocationFamily,ParamFamParameter-method</a></td>
<td>Methods for function modifyModel in Package ‘distrMod’ </td></tr>
<tr><td width="25%"><a href="modifyModel-methods.html">modifyModel,L2LocationScaleFamily,ParamFamParameter-method</a></td>
Modified: branches/distr-2.0/pkg/distrMod/chm/L2LocationFamily.html
===================================================================
--- branches/distr-2.0/pkg/distrMod/chm/L2LocationFamily.html 2008-08-08 04:23:50 UTC (rev 251)
+++ branches/distr-2.0/pkg/distrMod/chm/L2LocationFamily.html 2008-08-08 10:28:16 UTC (rev 252)
@@ -26,8 +26,7 @@
L2LocationFamily(loc = 0, name, centraldistribution = Norm(),
locname = "loc", modParam, LogDeriv,
L2derivDistr.0, FisherInfo.0, distrSymm, L2derivSymm,
- L2derivDistrSymm, trafo, ...,
- .returnClsName = NULL)
+ L2derivDistrSymm, trafo, .returnClsName = NULL)
</pre>
@@ -82,9 +81,6 @@
<tr valign="top"><td><code>trafo</code></td>
<td>
matrix or function in <code>param</code>: transformation of the parameter </td></tr>
-<tr valign="top"><td><code>...</code></td>
-<td>
-further arguments to be passed to <code>E</code></td></tr>
<tr valign="top"><td><code>.returnClsName</code></td>
<td>
the class name of the return value; by default this
Modified: branches/distr-2.0/pkg/distrMod/chm/L2LocationScaleFamily.html
===================================================================
--- branches/distr-2.0/pkg/distrMod/chm/L2LocationScaleFamily.html 2008-08-08 04:23:50 UTC (rev 251)
+++ branches/distr-2.0/pkg/distrMod/chm/L2LocationScaleFamily.html 2008-08-08 10:28:16 UTC (rev 252)
@@ -26,8 +26,7 @@
L2LocationScaleFamily(loc = 0, scale = 1, name, centraldistribution = Norm(),
locscalename = c("loc", "scale"), modParam, LogDeriv,
L2derivDistr.0, FisherInfo.0, distrSymm, L2derivSymm,
- L2derivDistrSymm, trafo, ...,
- .returnClsName = NULL)
+ L2derivDistrSymm, trafo, .returnClsName = NULL)
</pre>
@@ -89,9 +88,6 @@
<tr valign="top"><td><code>trafo</code></td>
<td>
matrix or function in <code>param</code>: transformation of the parameter </td></tr>
-<tr valign="top"><td><code>...</code></td>
-<td>
-further arguments to be passed to <code>E</code></td></tr>
<tr valign="top"><td><code>.returnClsName</code></td>
<td>
the class name of the return value; by default this
Modified: branches/distr-2.0/pkg/distrMod/chm/L2LocationUnknownScaleFamily.html
===================================================================
--- branches/distr-2.0/pkg/distrMod/chm/L2LocationUnknownScaleFamily.html 2008-08-08 04:23:50 UTC (rev 251)
+++ branches/distr-2.0/pkg/distrMod/chm/L2LocationUnknownScaleFamily.html 2008-08-08 10:28:16 UTC (rev 252)
@@ -27,8 +27,7 @@
L2LocationUnknownScaleFamily(loc = 0, scale = 1, name, centraldistribution = Norm(),
locscalename = c("loc", "scale"), modParam, LogDeriv,
L2derivDistr.0, FisherInfo.0, distrSymm, L2derivSymm,
- L2derivDistrSymm, trafo, ...,
- .returnClsName = NULL)
+ L2derivDistrSymm, trafo, .returnClsName = NULL)
</pre>
@@ -90,9 +89,6 @@
<tr valign="top"><td><code>trafo</code></td>
<td>
matrix or function in <code>param</code>: transformation of the parameter </td></tr>
-<tr valign="top"><td><code>...</code></td>
-<td>
-further arguments to be passed to <code>E</code></td></tr>
<tr valign="top"><td><code>.returnClsName</code></td>
<td>
the class name of the return value; by default this
Modified: branches/distr-2.0/pkg/distrMod/chm/L2ScaleFamily.html
===================================================================
--- branches/distr-2.0/pkg/distrMod/chm/L2ScaleFamily.html 2008-08-08 04:23:50 UTC (rev 251)
+++ branches/distr-2.0/pkg/distrMod/chm/L2ScaleFamily.html 2008-08-08 10:28:16 UTC (rev 252)
@@ -26,7 +26,7 @@
L2ScaleFamily(scale = 1, loc = 0, name, centraldistribution = Norm(),
locscalename = c("loc", "scale"), modParam, LogDeriv,
L2derivDistr.0, FisherInfo.0, distrSymm, L2derivSymm,
- L2derivDistrSymm, trafo, ..., .returnClsName = NULL)
+ L2derivDistrSymm, trafo, .returnClsName = NULL)
</pre>
@@ -88,9 +88,6 @@
<tr valign="top"><td><code>trafo</code></td>
<td>
matrix or function in <code>param</code>: transformation of the parameter </td></tr>
-<tr valign="top"><td><code>...</code></td>
-<td>
-further arguments to be passed to <code>E</code></td></tr>
<tr valign="top"><td><code>.returnClsName</code></td>
<td>
the class name of the return value; by default this
Modified: branches/distr-2.0/pkg/distrMod/chm/L2ScaleUnknownLocationFamily.html
===================================================================
--- branches/distr-2.0/pkg/distrMod/chm/L2ScaleUnknownLocationFamily.html 2008-08-08 04:23:50 UTC (rev 251)
+++ branches/distr-2.0/pkg/distrMod/chm/L2ScaleUnknownLocationFamily.html 2008-08-08 10:28:16 UTC (rev 252)
@@ -27,8 +27,7 @@
L2ScaleUnknownLocationFamily(loc = 0, scale = 1, name, centraldistribution = Norm(),
locscalename = c("loc", "scale"), modParam, LogDeriv,
L2derivDistr.0, FisherInfo.0, distrSymm, L2derivSymm,
- L2derivDistrSymm, trafo, ...,
- .returnClsName = NULL)
+ L2derivDistrSymm, trafo, .returnClsName = NULL)
</pre>
@@ -90,9 +89,6 @@
<tr valign="top"><td><code>trafo</code></td>
<td>
matrix or function in <code>param</code>: transformation of the parameter </td></tr>
-<tr valign="top"><td><code>...</code></td>
-<td>
-further arguments to be passed to <code>E</code></td></tr>
<tr valign="top"><td><code>.returnClsName</code></td>
<td>
the class name of the return value; by default this
Modified: branches/distr-2.0/pkg/distrMod/chm/distrMod.chm
===================================================================
(Binary files differ)
Modified: branches/distr-2.0/pkg/distrMod/chm/distrMod.toc
===================================================================
--- branches/distr-2.0/pkg/distrMod/chm/distrMod.toc 2008-08-08 04:23:50 UTC (rev 251)
+++ branches/distr-2.0/pkg/distrMod/chm/distrMod.toc 2008-08-08 10:28:16 UTC (rev 252)
@@ -718,6 +718,10 @@
<param name="Local" value="modifyModel-methods.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="modifyModel,GammaFamily,ParamFamParameter-method">
+<param name="Local" value="modifyModel-methods.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
<param name="Name" value="modifyModel,L2LocationFamily,ParamFamParameter-method">
<param name="Local" value="modifyModel-methods.html">
</OBJECT>
Modified: branches/distr-2.0/pkg/distrMod/chm/modifyModel-methods.html
===================================================================
--- branches/distr-2.0/pkg/distrMod/chm/modifyModel-methods.html 2008-08-08 04:23:50 UTC (rev 251)
+++ branches/distr-2.0/pkg/distrMod/chm/modifyModel-methods.html 2008-08-08 10:28:16 UTC (rev 252)
@@ -11,6 +11,7 @@
<param name="keyword" value="R: modifyModel,L2LocationFamily,ParamFamParameter-method">
<param name="keyword" value="R: modifyModel,L2ScaleFamily,ParamFamParameter-method">
<param name="keyword" value="R: modifyModel,L2LocationScaleFamily,ParamFamParameter-method">
+<param name="keyword" value="R: modifyModel,GammaFamily,ParamFamParameter-method">
<param name="keyword" value=" Methods for function modifyModel in Package ‘distrMod’">
</object>
@@ -45,6 +46,9 @@
## ParamFamParameter':
modifyModel(model,
param, ...)
+## S4 method for signature 'GammaFamily,
+## ParamFamParameter':
+modifyModel(model,param, ...)
</pre>
Modified: branches/distr-2.0/pkg/distrMod/man/distrModOptions.Rd
===================================================================
--- branches/distr-2.0/pkg/distrMod/man/distrModOptions.Rd 2008-08-08 04:23:50 UTC (rev 251)
+++ branches/distr-2.0/pkg/distrMod/man/distrModOptions.Rd 2008-08-08 10:28:16 UTC (rev 252)
@@ -46,9 +46,17 @@
\item{\code{"minimal"}}{only the most important information is shown}
\item{\code{"medium"}}{somewhere in the middle; see actual \code{show}-methods
for details.}
- }}
-}
-}
+ }
+ The default value is \code{"maximal"}.}
+\item{use.generalized.inverse.by.default}{logical; decides whether by default
+(i.e., if argument \code{generalized} of \code{\link{solve}} is not explicitely
+set), \code{\link{solve}} is to use generalized inverses if the original
+\code{solve}-method from package \pkg{base} fails; if the option is \code{FALSE},
+in case of failure, and unless argument \code{generalized} is not explicitely
+set to \code{TRUE}, \code{solve} will throw an error as is
+the \pkg{base}-method behavior. The default value is \code{TRUE}.
+ }
+}}
%\references{}
\author{Matthias Kohl \email{Matthias.Kohl at stamats.de},\cr
Peter Ruckdeschel \email{Peter.Ruckdeschel at itwm.fraunhofer.de}}
Modified: branches/distr-2.0/pkg/distrMod/man/solve-methods.Rd
===================================================================
--- branches/distr-2.0/pkg/distrMod/man/solve-methods.Rd 2008-08-08 04:23:50 UTC (rev 251)
+++ branches/distr-2.0/pkg/distrMod/man/solve-methods.Rd 2008-08-08 10:28:16 UTC (rev 252)
@@ -12,8 +12,10 @@
\description{solve-methods using generalized inverses for various types of matrices}
\usage{solve(a,b, ...)
-\S4method{solve}{ANY,ANY}(a, b, generalized = TRUE, tol = 1e-10)
-\S4method{solve}{PosSemDefSymmMatrix,ANY}(a, b, generalized = TRUE, tol = 1e-10)
+\S4method{solve}{ANY,ANY}(a, b, generalized =
+getdistrModOption("use.generalized.inverse.by.default"), tol = 1e-10)
+\S4method{solve}{PosSemDefSymmMatrix,ANY}(a, b, generalized =
+getdistrModOption("use.generalized.inverse.by.default"), tol = 1e-10)
\S4method{solve}{PosDefSymmMatrix,ANY}(a, b, tol = 1e-10)
}
\arguments{
@@ -23,7 +25,8 @@
an identity matrix and \code{solve} will return the inverse of
\code{a}.}
\item{\dots}{ further arguments to be passed to specific methods (see \code{\link[base]{solve}}).}
- \item{generalized}{ logical: should generalized / Moore-Penrose inverses be used? }
+ \item{generalized}{ logical: should generalized / Moore-Penrose inverses be used? By default uses
+ the corresponding global option to be set by \code{\link{distrModoptions}}.}
\item{tol}{ the tolerance for detecting linear dependencies in the
columns of \code{a}. Default is \code{.Machine$double.eps}.}
}
More information about the Distr-commits
mailing list