[Distr-commits] r1249 - in branches/distr-2.8/pkg/distrMod: . R inst man tests/Examples
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Aug 6 02:09:36 CEST 2018
Author: ruckdeschel
Date: 2018-08-06 02:09:35 +0200 (Mon, 06 Aug 2018)
New Revision: 1249
Added:
branches/distr-2.8/pkg/distrMod/man/LogisticLocationScaleFamily.Rd
Modified:
branches/distr-2.8/pkg/distrMod/NAMESPACE
branches/distr-2.8/pkg/distrMod/R/AllReturnClasses.R
branches/distr-2.8/pkg/distrMod/R/SimpleL2ParamFamilies.R
branches/distr-2.8/pkg/distrMod/inst/NEWS
branches/distr-2.8/pkg/distrMod/man/0distrMod-package.Rd
branches/distr-2.8/pkg/distrMod/man/InternalReturnClasses-class.Rd
branches/distr-2.8/pkg/distrMod/tests/Examples/distrMod-Ex.Rout.save
Log:
[distrMod] branch 2.8
+ new model class / generator LogisticLocationScaleFamily
Modified: branches/distr-2.8/pkg/distrMod/NAMESPACE
===================================================================
--- branches/distr-2.8/pkg/distrMod/NAMESPACE 2018-08-05 23:00:17 UTC (rev 1248)
+++ branches/distr-2.8/pkg/distrMod/NAMESPACE 2018-08-06 00:09:35 UTC (rev 1249)
@@ -37,7 +37,7 @@
exportClasses("BinomFamily","PoisFamily", "NormLocationFamily",
"NormScaleFamily", "ExpScaleFamily",
"LnormScaleFamily", "GammaFamily", "BetaFamily", "NormLocationScaleFamily",
- "CauchyLocationScaleFamily")
+ "CauchyLocationScaleFamily", "LogisticLocationScaleFamily")
exportClasses("NormType", "QFNorm", "InfoNorm", "SelfNorm")
exportClasses("Estimate", "MCEstimate")
exportClasses("Confint")
@@ -81,11 +81,12 @@
"BinomFamily", "PoisFamily", "NbinomFamily", "NormLocationFamily",
"NormScaleFamily", "ExpScaleFamily",
"LnormScaleFamily", "GammaFamily", "BetaFamily", "NormLocationScaleFamily",
- "CauchyLocationScaleFamily", "NbinomwithSizeFamily", "NbinomMeanSizeFamily")
+ "CauchyLocationScaleFamily", "NbinomwithSizeFamily", "NbinomMeanSizeFamily",
+ "LogisticLocationScaleFamily")
export("asCov", "trAsCov", "asHampel", "asBias", "asMSE", "asUnOvShoot",
"fiCov", "trFiCov", "fiHampel", "fiMSE", "fiBias", "fiUnOvShoot")
export("positiveBias", "negativeBias", "symmetricBias",
- "asymmetricBias", "asSemivar")
+ "asymmetricBias", "asSemivar", "LOGISTINT2")
export("isKerAinKerB")
export("L2LocationFamily", "L2ScaleFamily", "L2LocationScaleFamily")
export("EuclideanNorm", "QuadFormNorm")
Modified: branches/distr-2.8/pkg/distrMod/R/AllReturnClasses.R
===================================================================
--- branches/distr-2.8/pkg/distrMod/R/AllReturnClasses.R 2018-08-05 23:00:17 UTC (rev 1248)
+++ branches/distr-2.8/pkg/distrMod/R/AllReturnClasses.R 2018-08-06 00:09:35 UTC (rev 1249)
@@ -60,4 +60,7 @@
setClass("CauchyLocationScaleFamily",
contains = "L2LocationScaleFamily")
+## Logistic location scale family
+setClass("LogisticLocationScaleFamily",
+ contains = "L2LocationScaleFamily")
Modified: branches/distr-2.8/pkg/distrMod/R/SimpleL2ParamFamilies.R
===================================================================
--- branches/distr-2.8/pkg/distrMod/R/SimpleL2ParamFamilies.R 2018-08-05 23:00:17 UTC (rev 1248)
+++ branches/distr-2.8/pkg/distrMod/R/SimpleL2ParamFamilies.R 2018-08-06 00:09:35 UTC (rev 1249)
@@ -759,6 +759,42 @@
}
+
+##################################################################
+## Logistic location scale family
+##################################################################
+LOGISTINT2 <- integrate(function(x){qx <- qlogis(x); (tanh(qx/2)*qx-1)^2}, 0,1, subdivisions=1000,rel.tol=1e-10)$value
+
+LogisticLocationScaleFamily <- function(location = 0, scale = 1, trafo){
+ lsname <- c("loc"="location", "scale"="scale")
+ if(missing(trafo)) {trafo <- diag(2)
+ dimnames(trafo) <- list(lsname,lsname)}
+ res <- L2LocationScaleFamily(loc = location, scale = scale,
+ name = "normal location and scale family",
+ locscalename = lsname,
+ modParam = function(theta) Logis(location = theta[1], scale = theta[2]),
+ LogDeriv = function(x) (1-exp(x))/(1+exp(x)),
+ FisherInfo.0 = matrix(c(1/3,0,0,LOGISTINT2),2,2,
+ dimnames = list(lsname, lsname)),
+ distrSymm = SphericalSymmetry(SymmCenter = location),
+ L2derivSymm = FunSymmList(OddSymmetric(SymmCenter = location),
+ EvenSymmetric(SymmCenter = location)),
+ L2derivDistrSymm = DistrSymmList(SphericalSymmetry(),
+ NoSymmetry()),
+ trafo = trafo, .returnClsName = "LogisticLocationScaleFamily")
+ if(!is.function(trafo))
+ f.call <- substitute(LogisticLocationScaleFamily(location = m, scale = s,
+ trafo = matrix(Tr, ncol = 2, dimnames = DN)),
+ list(m = location, s = scale, Tr = trafo, DN = dimnames(trafo)))
+ else
+ f.call <- substitute(LogisticLocationScaleFamily(location = m, scale = s, trafo = Tr),
+ list(m = location, s = scale, Tr = trafo))
+ res at fam.call <- f.call
+ return(res)
+}
+
+
+
#####################################
#####################################
#### normal models with nuisance
@@ -832,3 +868,4 @@
res at fam.call <- f.call
return(res)
}
+
Modified: branches/distr-2.8/pkg/distrMod/inst/NEWS
===================================================================
--- branches/distr-2.8/pkg/distrMod/inst/NEWS 2018-08-05 23:00:17 UTC (rev 1248)
+++ branches/distr-2.8/pkg/distrMod/inst/NEWS 2018-08-06 00:09:35 UTC (rev 1249)
@@ -35,6 +35,7 @@
+ the L2derivatives of the SimpleL2ParamFamilies and the L2GroupFamilies now respect
restrictions in the support of the underlying distribution: the L2derivatives are 0
whenever the argument x has liesInSupport(distribution,x) == FALSE
++ new model class / generator LogisticLocationScaleFamily
bug fixes
+ discovered some issues with local variables in L2Families (global values were used instead...)
Modified: branches/distr-2.8/pkg/distrMod/man/0distrMod-package.Rd
===================================================================
--- branches/distr-2.8/pkg/distrMod/man/0distrMod-package.Rd 2018-08-05 23:00:17 UTC (rev 1248)
+++ branches/distr-2.8/pkg/distrMod/man/0distrMod-package.Rd 2018-08-06 00:09:35 UTC (rev 1249)
@@ -53,6 +53,9 @@
|>|>|>"BinomFamily" [*]
|>|>|>"PoisFamily" [*]
|>|>|>"BetaFamily" [*]
+|>|>|>"NbinomFamily" [*]
+|>|>|>"NbinomwithSizeFamily" [*]
+|>|>|>"NbinomMeanSizeFamily" [*]
|>|>|>"L2GroupParamFamily"
additional slots:
LogDeriv(function)
@@ -61,15 +64,16 @@
|>|>|>|>"L2LocationScaleUnion" /VIRTUAL/
additional slots:
locscalename(character)
-|>|>|>|>|>"L2LocationFamily" [*]
-|>|>|>|>|>|>"NormLocationFamily" [*]
-|>|>|>|>|>"L2ScaleFamily" [*]
-|>|>|>|>|>|>"NormScaleFamily" [*]
-|>|>|>|>|>|>"ExpScaleFamily" [*]
-|>|>|>|>|>|>"LnormScaleFamily" [*]
-|>|>|>|>|>"L2LocationScaleFamily" [*]
-|>|>|>|>|>|>"NormLocationScaleFamily" [*]
-|>|>|>|>|>|>"CauchyLocationScaleFamily" [*]
+|>|>|>|>|>"L2LocationFamily" [*]
+|>|>|>|>|>|>"NormLocationFamily" [*]
+|>|>|>|>|>"L2ScaleFamily" [*]
+|>|>|>|>|>|>"NormScaleFamily" [*]
+|>|>|>|>|>|>"ExpScaleFamily" [*]
+|>|>|>|>|>|>"LnormScaleFamily" [*]
+|>|>|>|>|>"L2LocationScaleFamily" [*]
+|>|>|>|>|>|>"NormLocationScaleFamily" [*]
+|>|>|>|>|>|>"CauchyLocationScaleFamily" [*]
+|>|>|>|>|>|>"LogisticLocationScaleFamily" [*]
and a (virtual) class union "L2ScaleUnion" between
"L2LocationScaleUnion" and "L2ScaleShapeUnion"
Modified: branches/distr-2.8/pkg/distrMod/man/InternalReturnClasses-class.Rd
===================================================================
--- branches/distr-2.8/pkg/distrMod/man/InternalReturnClasses-class.Rd 2018-08-05 23:00:17 UTC (rev 1248)
+++ branches/distr-2.8/pkg/distrMod/man/InternalReturnClasses-class.Rd 2018-08-06 00:09:35 UTC (rev 1249)
@@ -13,6 +13,7 @@
\alias{BetaFamily-class}
\alias{NormLocationScaleFamily-class}
\alias{CauchyLocationScaleFamily-class}
+\alias{LogisticLocationScaleFamily-class}
\title{Internal return classes for generating functions}
\description{internal return classes for generating functions 'L2ParamFamily' and
@@ -27,8 +28,9 @@
``extending'' (no new slots!) class \code{"L2LocationFamily"}, classes
\code{NormScaleFamily}, \code{ExpScaleFamily}, and \code{LnormScaleFamily}
``extending'' (no new slots!) class \code{"L2ScaleFamily"}, and classes
-\code{CauchyLocationScaleFamily} and \code{NormLocationScaleFamily},
-``extending'' (no new slots!) class \code{"L2LocationScaleFamily"}.
+\code{CauchyLocationScaleFamily}, \code{LogisticLocationScaleFamily} and
+\code{NormLocationScaleFamily}, ``extending'' (no new slots!)
+class \code{"L2LocationScaleFamily"}.
}
\section{Objects from these classes}{
Objects are only generated internally by the mentioned generating functions.
@@ -135,7 +137,8 @@
Class \code{"ParamFamily"}, by class \code{"L2ParamFamily"}.\cr
Class \code{"ProbFamily"}, by class \code{"ParamFamily"}.
\cr
-\code{CauchyLocationScaleFamily} and \code{NormLocationScaleFamily}
+\code{CauchyLocationScaleFamily}, \code{LogisticLocationScaleFamily},
+and \code{NormLocationScaleFamily}
``extend'' (no new slots!):\cr
Class \code{"L2LocationScaleFamily"}, directly.\cr
Class \code{"L2LocationScaleUnion"}, by class \code{"L2LocationScaleFamily"}.\cr
Added: branches/distr-2.8/pkg/distrMod/man/LogisticLocationScaleFamily.Rd
===================================================================
--- branches/distr-2.8/pkg/distrMod/man/LogisticLocationScaleFamily.Rd (rev 0)
+++ branches/distr-2.8/pkg/distrMod/man/LogisticLocationScaleFamily.Rd 2018-08-06 00:09:35 UTC (rev 1249)
@@ -0,0 +1,51 @@
+\name{LogisticLocationScaleFamily}
+\alias{LogisticLocationScaleFamily}
+\alias{LOGISTINT2}
+
+
+\title{Generating function for Logistic location and scale families}
+\description{
+ Generates an object of class \code{"L2LocationScaleFamily"} which
+ represents a normal location and scale family.
+}
+\usage{
+LogisticLocationScaleFamily(location = 0, scale = 1, trafo)
+LOGISTINT2
+}
+\arguments{
+ \item{location}{ location }
+ \item{scale}{ scale }
+ \item{trafo}{ function in \code{param} or matrix: transformation of the parameter }
+}
+\details{
+ The slots of the corresponding L2 differentiable
+ parameteric family are filled.
+ \code{LOGISTINT2} is a constant used for the scale part of the Fisher information.
+ More precisely \code{LOGISTINT2} equals to
+ \eqn{\int_{-\infty}^{\infty} (\tanh(x/2)\,x-1)^2\,{\rm dlogis}(x)\,dx)}{%
+ integral_{-Inf}^{Inf} (tanh(x/2)x-1)^2 dlogis(x) dx}.
+}
+\value{Object of class \code{"L2LocationScaleFamily"}}
+\references{
+ Kohl, M. (2005) \emph{Numerical Contributions to
+ the Asymptotic Theory of Robustness}. Bayreuth: Dissertation.
+}
+\author{Peter Ruckdeschel \email{Peter.Ruckdeschel at uni-oldenburg.de}}
+%\note{}
+\seealso{\code{\link{L2ParamFamily-class}}, \code{\link[distr]{Logis-class}}}
+\examples{
+(L1 <- LogisticLocationScaleFamily())
+plot(L1)
+FisherInfo(L1)
+### need smaller integration range:
+distrExoptions("ElowerTruncQuantile"=1e-4,"EupperTruncQuantile"=1e-4)
+checkL2deriv(L1)
+distrExoptions("ElowerTruncQuantile"=1e-7,"EupperTruncQuantile"=1e-7)
+##
+set.seed(123)
+x <- rlogis(100,location=1,scale=2)
+CvMMDEstimator(x, L1)
+}
+\concept{Logistic location and scale model}
+\concept{location and scale model}
+\keyword{models}
Modified: branches/distr-2.8/pkg/distrMod/tests/Examples/distrMod-Ex.Rout.save
===================================================================
--- branches/distr-2.8/pkg/distrMod/tests/Examples/distrMod-Ex.Rout.save 2018-08-05 23:00:17 UTC (rev 1248)
+++ branches/distr-2.8/pkg/distrMod/tests/Examples/distrMod-Ex.Rout.save 2018-08-06 00:09:35 UTC (rev 1249)
@@ -402,7 +402,7 @@
dimnames = list(nms, nms0))
list(fval = fval0, mat = mat0)
}
-<bytecode: 0x08355d98>
+<bytecode: 0x10138e10>
Trafo / derivative matrix at which estimate was produced:
scale shape
shape 0.000 1
@@ -612,23 +612,26 @@
[[1]]
function (x)
{
- ((x - 0)/c(scale = 1) * LogDeriv((x - 0)/c(scale = 1)) -
+ y <- 0 * x
+ inS <- liesInSupport(distr.0, x)
+ y[inS] <- ((x[inS] - 0)/scale * LogDeriv((x[inS] - 0)/c(scale = 1)) -
1)/c(scale = 1)
+ return(y)
}
-<environment: 0x0c30edd0>
+<environment: 0x0b361f70>
> checkL2deriv(E1)
-precision of centering: -1.51181e-06
+precision of centering: -2.04266e-06
precision of Fisher information:
+ scale
+scale -3.598621e-05
+precision of Fisher information - relativ error [%]:
scale
-scale -2.61793e-05
-precision of Fisher information - relativ error [%]:
- scale
-scale -0.00261793
+scale -0.003598621
condition of Fisher information:
[1] 1
$maximum.deviation
-[1] 2.61793e-05
+[1] 3.598621e-05
>
>
@@ -757,19 +760,19 @@
scale 1 1.000000
shape 1 1.644934
> checkL2deriv(G1)
-precision of centering: -1.51181e-06 1.312514e-06
+precision of centering: -2.04266e-06 1.791171e-06
precision of Fisher information:
scale shape
-scale -2.617930e-05 -7.165188e-06
-shape -7.165188e-06 -2.862712e-05
+scale -3.598621e-05 -9.503625e-06
+shape -9.503625e-06 -3.944425e-05
precision of Fisher information - relativ error [%]:
scale shape
-scale -0.0026179301 -0.0007165188
-shape -0.0007165188 -0.0017403202
+scale -0.0035986209 -0.0009503625
+shape -0.0009503625 -0.0023979229
condition of Fisher information:
[1] 10.60328
$maximum.deviation
-[1] 2.862712e-05
+[1] 3.944425e-05
>
>
@@ -803,8 +806,8 @@
Slot "fct":
function (x)
QuadFormNorm(x, A = A)
-<bytecode: 0x0cfacf30>
-<environment: 0x0cfade40>
+<bytecode: 0x0b47c878>
+<environment: 0x0b47cab8>
>
> ## The function is currently defined as
@@ -1116,10 +1119,13 @@
[[1]]
function (x)
{
- ((x - 0)/c(meanlog = 1) * LogDeriv((x - 0)/c(meanlog = 1)) -
+ y <- 0 * x
+ inS <- liesInSupport(distr.0, x)
+ y[inS] <- ((x[inS] - 0)/scale * LogDeriv((x[inS] - 0)/c(meanlog = 1)) -
1)/c(meanlog = 1)
+ return(y)
}
-<environment: 0x0d5943a8>
+<environment: 0x0ecb2318>
> checkL2deriv(L1)
precision of centering: -0.003003394
@@ -1140,6 +1146,94 @@
> base::assign(".dptime", (proc.time() - get(".ptime", pos = "CheckExEnv")), pos = "CheckExEnv")
> base::cat("LnormScaleFamily", base::get(".format_ptime", pos = 'CheckExEnv')(get(".dptime", pos = "CheckExEnv")), "\n", file=base::get(".ExTimings", pos = 'CheckExEnv'), append=TRUE, sep="\t")
> cleanEx()
+> nameEx("LogisticLocationScaleFamily")
+> ### * LogisticLocationScaleFamily
+>
+> flush(stderr()); flush(stdout())
+>
+> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
+> ### Name: LogisticLocationScaleFamily
+> ### Title: Generating function for Logistic location and scale families
+> ### Aliases: LogisticLocationScaleFamily LOGISTINT2
+> ### Keywords: models
+>
+> ### ** Examples
+>
+> (L1 <- LogisticLocationScaleFamily())
+An object of class "LogisticLocationScaleFamily"
+### name: normal location and scale family
+
+### distribution: Distribution Object of Class: Norm
+ mean: 0
+ sd: 1
+Warning in show(x) :
+ arithmetics on distributions are understood as operations on r.v.'s
+see 'distrARITH()'; for switching off this warning see '?distroptions'
+
+### param: An object of class "ParamWithScaleFamParameter"
+name: location and scale
+location: 0
+scale: 1
+trafo:
+ location scale
+location 1 0
+scale 0 1
+
+### props:
+[1] "The normal location and scale family is invariant under"
+[2] "the group of transformations 'g(x) = scale*x + loc'"
+[3] "with location parameter 'loc' and scale parameter 'scale'"
+> plot(L1)
+> FisherInfo(L1)
+An object of class "PosDefSymmMatrix"
+ location scale
+location 0.3333333 0.000000
+scale 0.0000000 1.429956
+> ### need smaller integration range:
+> distrExoptions("ElowerTruncQuantile"=1e-4,"EupperTruncQuantile"=1e-4)
+> checkL2deriv(L1)
+precision of centering: -2.264121e-17 -1.41228
+precision of Fisher information:
+ location scale
+location -1.600022e-01 4.454916e-17
+scale 4.454916e-17 8.149930e-01
+precision of Fisher information - relativ error [%]:
+ location scale
+location -48.00065 Inf
+scale Inf 56.99427
+condition of Fisher information:
+[1] 3.667949
+$maximum.deviation
+[1] 1.41228
+
+> distrExoptions("ElowerTruncQuantile"=1e-7,"EupperTruncQuantile"=1e-7)
+> ##
+> set.seed(123)
+> x <- rlogis(100,location=1,scale=2)
+> CvMMDEstimator(x, L1)
+Evaluations of Minimum CvM distance estimate ( mu = emp. cdf ) :
+----------------------------------------------------------------
+An object of class "Estimate"
+generated by call
+ CvMMDEstimator(x = x, ParamFamily = L1)
+samplesize: 100
+estimate:
+ location scale
+ 0.9199612 1.9512792
+ (2.2045470) (0.6064406)
+asymptotic (co)variance (multiplied with samplesize):
+ location scale
+location 486.0028 130.60897
+scale 130.6090 36.77702
+Criterion:
+CvM distance
+ 0.01414319
+>
+>
+>
+> base::assign(".dptime", (proc.time() - get(".ptime", pos = "CheckExEnv")), pos = "CheckExEnv")
+> base::cat("LogisticLocationScaleFamily", base::get(".format_ptime", pos = 'CheckExEnv')(get(".dptime", pos = "CheckExEnv")), "\n", file=base::get(".ExTimings", pos = 'CheckExEnv'), append=TRUE, sep="\t")
+> cleanEx()
> nameEx("MCEstimate-class")
> ### * MCEstimate-class
>
@@ -1151,7 +1245,8 @@
> ### Aliases: MCEstimate-class criterion criterion,MCEstimate-method
> ### criterion.fct criterion.fct,MCEstimate-method
> ### startPar,MCEstimate-method method method,MCEstimate-method optimwarn
-> ### optimwarn,MCEstimate-method criterion<- criterion<-,MCEstimate-method
+> ### optimwarn,MCEstimate-method optimReturn optimReturn,MCEstimate-method
+> ### criterion<- criterion<-,MCEstimate-method
> ### coerce,MCEstimate,mle-method show,MCEstimate-method
> ### profile,MCEstimate-method
> ### Keywords: classes
@@ -1165,8 +1260,8 @@
> G <- GammaFamily(scale = 1, shape = 2)
>
> MDEstimator(x, G)
-Evaluations of Minimum Kolmogorov distance estimate:
-----------------------------------------------------
+Evaluations of Minimum Kolmogorov distance estimate :
+------------------------------------------------------
An object of class "Estimate"
generated by call
MDEstimator(x = x, ParamFamily = G)
@@ -1233,18 +1328,6 @@
+ return(res)
+ }
> MCEstimator(x = x, ParamFamily = G, criterion = negLoglikelihood)
-Warning in fn(par, ...) :
- Criterion evaluation at theta = 0.298,4.655 threw an error;
-returning starting par;
-
-Warning in fn(par, ...) :
- Criterion evaluation at theta = 0.764,4.655 threw an error;
-returning starting par;
-
-Warning in fn(par, ...) :
- Criterion evaluation at theta = 0.298,5.12 threw an error;
-returning starting par;
-
Evaluations of Minimum criterion estimate:
------------------------------------------
An object of class "Estimate"
@@ -1252,11 +1335,11 @@
MCEstimator(x = x, ParamFamily = G, criterion = negLoglikelihood)
samplesize: 50
estimate:
- scale shape
-0.2983286 4.6547001
+ scale shape
+0.342008 4.060286
Criterion:
-
-1e+20
+
+47.9651
>
> ## Kolmogorov(-Smirnov) minimum distance estimator
> ## Note: you can also use function MDEstimator!
@@ -1349,12 +1432,14 @@
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: MDEstimator
> ### Title: Function to compute minimum distance estimates
-> ### Aliases: MDEstimator
+> ### Aliases: MDEstimator CvMMDEstimator KolmogorovMDEstimator
+> ### TotalVarMDEstimator HellingerMDEstimator CvMDist2
> ### Keywords: univar robust
>
> ### ** Examples
>
> ## (empirical) Data
+> set.seed(123)
> x <- rgamma(50, scale = 0.5, shape = 3)
>
> ## parametric family of probability measures
@@ -1362,33 +1447,47 @@
>
> ## Kolmogorov(-Smirnov) minimum distance estimator
> MDEstimator(x = x, ParamFamily = G, distance = KolmogorovDist)
-Evaluations of Minimum Kolmogorov distance estimate:
-----------------------------------------------------
+Evaluations of Minimum Kolmogorov distance estimate :
+------------------------------------------------------
An object of class "Estimate"
generated by call
MDEstimator(x = x, ParamFamily = G, distance = KolmogorovDist)
samplesize: 50
estimate:
scale shape
-0.3398645 4.2654569
+0.5325299 2.4106229
Criterion:
Kolmogorov distance
- 0.06350364
+ 0.07111522
+> ## or
+> KolmogorovMDEstimator(x = x, ParamFamily = G)
+Evaluations of Minimum Kolmogorov distance estimate :
+------------------------------------------------------
+An object of class "Estimate"
+generated by call
+ KolmogorovMDEstimator(x = x, ParamFamily = G)
+samplesize: 50
+estimate:
+ scale shape
+0.5325299 2.4106229
+Criterion:
+Kolmogorov distance
+ 0.07111522
>
> ## von Mises minimum distance estimator with default mu
> MDEstimator(x = x, ParamFamily = G, distance = CvMDist)
-Evaluations of Minimum CvM distance estimate:
----------------------------------------------
+Evaluations of Minimum CvM distance estimate ( mu = emp. cdf ) :
+-----------------------------------------------------------------
An object of class "Estimate"
generated by call
MDEstimator(x = x, ParamFamily = G, distance = CvMDist)
samplesize: 50
estimate:
scale shape
-0.3401751 4.1262425
+0.4683173 2.6527970
Criterion:
CvM distance
- 0.02931495
+ 0.03266119
>
>
>
@@ -1631,15 +1730,15 @@
> (res <- MLEstimator(x = x, ParamFamily = C))
Evaluations of Maximum likelihood estimate:
-------------------------------------------
- loc scale
- 1.2124856 1.6358162
- (0.3271632) (0.3271632)
+ loc scale
+ 1.088544 1.527400
+ (0.305480) (0.305480)
> ## Asymptotic (CLT-based) confidence interval
> confint(res)
A[n] asymptotic (CLT-based) confidence interval:
2.5 % 97.5 %
-loc 0.5712574 1.853714
-scale 0.9945880 2.277044
+loc 0.4898137 1.687273
+scale 0.9286703 2.126130
>
>
>
@@ -2133,7 +2232,7 @@
return(abs(x))
else return(sqrt(colSums(x^2)))
}
-<bytecode: 0x0aef6220>
+<bytecode: 0x0d2cc2c0>
<environment: namespace:distrMod>
> name(EuclNorm)
[1] "EuclideanNorm"
@@ -2168,7 +2267,7 @@
return(abs(x))
else return(sqrt(colSums(x^2)))
}
-<bytecode: 0x0aef6220>
+<bytecode: 0x0d2cc2c0>
<environment: namespace:distrMod>
>
@@ -2651,8 +2750,8 @@
Slot "fct":
function (x)
QuadFormNorm(x, A = A0)
-<bytecode: 0x0d18b320>
-<environment: 0x0d18b120>
+<bytecode: 0x0ef13a38>
+<environment: 0x0ef13c38>
>
> ## The function is currently defined as
@@ -2693,8 +2792,8 @@
Slot "fct":
function (x)
QuadFormNorm(x, A = A)
-<bytecode: 0x0c9bcc60>
-<environment: 0x0c9bda30>
+<bytecode: 0x0eed2848>
+<environment: 0x0eed2ca8>
>
> ## The function is currently defined as
@@ -3820,7 +3919,7 @@
dimnames(mat) <- list(nfval, c("mean", "sd"))
return(list(fval = fval, mat = mat))
}
-<bytecode: 0x0d9fcc98>
+<bytecode: 0x0e9bc5a0>
> print(param(NS), show.details = "minimal")
An object of class "ParamWithScaleFamParameter"
name: location and scale
@@ -3869,7 +3968,7 @@
dimnames(mat) <- list(nfval, c("mean", "sd"))
return(list(fval = fval, mat = mat))
}
-<bytecode: 0x0d9fcc98>
+<bytecode: 0x0e9bc5a0>
Trafo / derivative matrix:
mean sd
mu/sig 0.3668695 -0.3024814
@@ -3912,7 +4011,7 @@
dimnames(mat) <- list(nfval, c("mean", "sd"))
return(list(fval = fval, mat = mat))
}
-<bytecode: 0x0d9fcc98>
+<bytecode: 0x0e9bc5a0>
Trafo / derivative matrix:
mean sd
mu/sig 0.3669 -0.3025
@@ -4333,7 +4432,7 @@
> cleanEx()
> options(digits = 7L)
> base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
-Time elapsed: 22.44 0.43 23.27 NA NA
+Time elapsed: 34.67 0.58 37.27 NA NA
> grDevices::dev.off()
null device
1
More information about the Distr-commits
mailing list