[Distr-commits] r1233 - in pkg/distrMod: . R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jul 31 00:21:00 CEST 2018


Author: stamats
Date: 2018-07-31 00:21:00 +0200 (Tue, 31 Jul 2018)
New Revision: 1233

Modified:
   pkg/distrMod/DESCRIPTION
   pkg/distrMod/NAMESPACE
   pkg/distrMod/R/MDEstimator.R
   pkg/distrMod/man/0distrMod-package.Rd
   pkg/distrMod/man/MDEstimator.Rd
Log:
added aliases CvMMDEstimator, KolmogorovMDEstimator, etc.

Modified: pkg/distrMod/DESCRIPTION
===================================================================
--- pkg/distrMod/DESCRIPTION	2018-07-30 17:47:38 UTC (rev 1232)
+++ pkg/distrMod/DESCRIPTION	2018-07-30 22:21:00 UTC (rev 1233)
@@ -1,6 +1,6 @@
 Package: distrMod
 Version: 2.7.0
-Date: 2018-07-25
+Date: 2018-07-30
 Title: Object Oriented Implementation of Probability Models
 Description: Implements S4 classes for probability models based on packages 'distr' and
         'distrEx'.

Modified: pkg/distrMod/NAMESPACE
===================================================================
--- pkg/distrMod/NAMESPACE	2018-07-30 17:47:38 UTC (rev 1232)
+++ pkg/distrMod/NAMESPACE	2018-07-30 22:21:00 UTC (rev 1233)
@@ -73,7 +73,9 @@
 export("distrModMASK")
 export("trafoEst")
 export("distrModOptions", "distrModoptions", "getdistrModOption",
-       "Estimator", "MCEstimator", "MLEstimator", "MDEstimator")
+       "Estimator", "MCEstimator", "MLEstimator", "MDEstimator",
+       "CvMMDEstimator", "KolmogorovMDEstimator", "TotalVarMDEstimator", 
+       "HellingerMDEstimator")
 export("NonSymmetric", "EvenSymmetric", "OddSymmetric", "FunSymmList") 
 export("ParamFamParameter", "ParamFamily", "L2ParamFamily",
        "BinomFamily", "PoisFamily", "NbinomFamily", "NormLocationFamily",

Modified: pkg/distrMod/R/MDEstimator.R
===================================================================
--- pkg/distrMod/R/MDEstimator.R	2018-07-30 17:47:38 UTC (rev 1232)
+++ pkg/distrMod/R/MDEstimator.R	2018-07-30 22:21:00 UTC (rev 1233)
@@ -60,3 +60,51 @@
     return(.checkEstClassForParamFamily(ParamFamily,res))
 }
 
+CvMMDEstimator <- function(x, ParamFamily, paramDepDist = FALSE,
+                           startPar = NULL, Infos,
+                           trafo = NULL, penalty = 1e20,
+                           validity.check = TRUE, asvar.fct = .CvMMDCovariance, 
+                           na.rm = TRUE, ..., .withEvalAsVar = TRUE){
+  MDEstimator(x = x, ParamFamily = ParamFamily, distance = CvMDist,
+              paramDepDist = paramDepDist, startPar = startPar,  Infos = Infos,
+              trafo = trafo, penalty = penalty, validity.check = validity.check,
+              asvar.fct = asvar.fct, na.rm = na.rm,
+              ..., .withEvalAsVar = .withEvalAsVar)
+}
+
+KolmogorovMDEstimator <- function(x, ParamFamily, paramDepDist = FALSE,
+                           startPar = NULL, Infos,
+                           trafo = NULL, penalty = 1e20,
+                           validity.check = TRUE, asvar.fct, na.rm = TRUE, ...,
+                           .withEvalAsVar = TRUE){
+  MDEstimator(x = x, ParamFamily = ParamFamily, distance = KolmogorovDist,
+              paramDepDist = paramDepDist, startPar = startPar,  Infos = Infos,
+              trafo = trafo, penalty = penalty, validity.check = validity.check,
+              asvar.fct = asvar.fct, na.rm = na.rm,
+              ..., .withEvalAsVar = .withEvalAsVar)
+}
+
+TotalVarMDEstimator <- function(x, ParamFamily, paramDepDist = FALSE,
+                           startPar = NULL, Infos,
+                           trafo = NULL, penalty = 1e20,
+                           validity.check = TRUE, asvar.fct, na.rm = TRUE, ...,
+                           .withEvalAsVar = TRUE){
+  MDEstimator(x = x, ParamFamily = ParamFamily, distance = TotalVarDist,
+              paramDepDist = paramDepDist, startPar = startPar,  Infos = Infos,
+              trafo = trafo, penalty = penalty, validity.check = validity.check,
+              asvar.fct = asvar.fct, na.rm = na.rm,
+              ..., .withEvalAsVar = .withEvalAsVar)
+}
+
+HellingerMDEstimator <- function(x, ParamFamily, paramDepDist = FALSE,
+                           startPar = NULL, Infos,
+                           trafo = NULL, penalty = 1e20,
+                           validity.check = TRUE, asvar.fct, na.rm = TRUE, ...,
+                           .withEvalAsVar = TRUE){
+  MDEstimator(x = x, ParamFamily = ParamFamily, distance = HellingerDist,
+              paramDepDist = paramDepDist, startPar = startPar,  Infos = Infos,
+              trafo = trafo, penalty = penalty, validity.check = validity.check,
+              asvar.fct = asvar.fct, na.rm = na.rm,
+              ..., .withEvalAsVar = .withEvalAsVar)
+}
+

Modified: pkg/distrMod/man/0distrMod-package.Rd
===================================================================
--- pkg/distrMod/man/0distrMod-package.Rd	2018-07-30 17:47:38 UTC (rev 1232)
+++ pkg/distrMod/man/0distrMod-package.Rd	2018-07-30 22:21:00 UTC (rev 1233)
@@ -16,7 +16,7 @@
 \tabular{ll}{
 Package: \tab distrMod \cr
 Version: \tab 2.7.0 \cr
-Date: \tab 2018-07-08 \cr
+Date: \tab 2018-07-30 \cr
 Depends: \tab R(>= 2.14.0), distr(>= 2.5.2), distrEx(>= 2.4), RandVar(>= 0.6.3), MASS, stats4,
         methods \cr
 Imports: \tab startupmsg, sfsmisc, graphics, stats, grDevices \cr
@@ -25,7 +25,7 @@
 ByteCompile: \tab yes \cr
 License: \tab LGPL-3 \cr
 URL: \tab http://distr.r-forge.r-project.org/\cr
-SVNRevision: \tab 1186 \cr
+VCS/SVNRevision: \tab 1186 \cr
 }}
 
 \section{Classes}{

Modified: pkg/distrMod/man/MDEstimator.Rd
===================================================================
--- pkg/distrMod/man/MDEstimator.Rd	2018-07-30 17:47:38 UTC (rev 1232)
+++ pkg/distrMod/man/MDEstimator.Rd	2018-07-30 22:21:00 UTC (rev 1233)
@@ -1,5 +1,9 @@
 \name{MDEstimator}
 \alias{MDEstimator}
+\alias{CvMMDEstimator}
+\alias{KolmogorovMDEstimator}
+\alias{TotalVarMDEstimator}
+\alias{HellingerMDEstimator}
 
 \title{ Function to compute minimum distance estimates }
 \description{
@@ -8,9 +12,21 @@
 }
 \usage{
 MDEstimator(x, ParamFamily, distance = KolmogorovDist, dist.name, 
-            paramDepDist = FALSE, startPar = NULL,  Infos, trafo = NULL,
+            paramDepDist = FALSE, startPar = NULL, Infos, trafo = NULL,
             penalty = 1e20, validity.check = TRUE, asvar.fct, na.rm = TRUE,
             ..., .withEvalAsVar = TRUE)
+CvMMDEstimator(x, ParamFamily, paramDepDist = FALSE, startPar = NULL, Infos, 
+            trafo = NULL, penalty = 1e20, validity.check = TRUE, 
+            asvar.fct = .CvMMDCovariance, na.rm = TRUE, ..., .withEvalAsVar = TRUE)
+KolmogorovMDEstimator(x, ParamFamily, paramDepDist = FALSE, startPar = NULL, Infos, 
+            trafo = NULL, penalty = 1e20, validity.check = TRUE, asvar.fct, 
+            na.rm = TRUE, ..., .withEvalAsVar = TRUE)
+TotalVarMDEstimator(x, ParamFamily, paramDepDist = FALSE, startPar = NULL, Infos, 
+            trafo = NULL, penalty = 1e20, validity.check = TRUE, asvar.fct, 
+            na.rm = TRUE, ..., .withEvalAsVar = TRUE)
+HellingerMDEstimator(x, ParamFamily, paramDepDist = FALSE, startPar = NULL, Infos, 
+            trafo = NULL, penalty = 1e20, validity.check = TRUE, asvar.fct, 
+            na.rm = TRUE, ..., .withEvalAsVar = TRUE)
 }
 %- maybe also 'usage' for other objects documented here.
 \arguments{
@@ -54,6 +70,9 @@
   and possibly \code{\dots}; e.g. \code{KolmogorovDist} (default), 
   \code{TotalVarDist} or \code{HellingerDist}. Uses \code{\link{mceCalc}}
   for method dispatch.
+
+  The functions \code{CvMMDEstimator}, \code{KolmogorovMDEstimator}, \code{TotalVarMDEstimator}, 
+  and \code{HellingerMDEstimator} are aliases where the distance is fixed.
 }
 \value{
   An object of S4-class \code{"MCEstimate"} which inherits from class 
@@ -84,6 +103,8 @@
 
 ## Kolmogorov(-Smirnov) minimum distance estimator
 MDEstimator(x = x, ParamFamily = G, distance = KolmogorovDist)
+## or
+KolmogorovMDEstimator(x = x, ParamFamily = G)
 
 ## von Mises minimum distance estimator with default mu
 MDEstimator(x = x, ParamFamily = G, distance = CvMDist)
@@ -92,6 +113,8 @@
 ## von Mises minimum distance estimator with default mu
 MDEstimator(x = x, ParamFamily = G, distance = CvMDist,
             asvar.fct = .CvMMDCovariance)
+## or
+CvMMDEstimator(x = x, ParamFamily = G)
 
 ## von Mises minimum distance estimator with mu = N(0,1)
 MDEstimator(x = x, ParamFamily = G, distance = CvMDist, mu = Norm())
@@ -99,6 +122,8 @@
 ## Total variation minimum distance estimator
 ## gamma distributions are discretized
 MDEstimator(x = x, ParamFamily = G, distance = TotalVarDist)
+## or
+TotalVarMDEstimator(x = x, ParamFamily = G)
 ## or smoothing of emprical distribution (takes some time!)
 #MDEstimator(x = x, ParamFamily = G, distance = TotalVarDist, asis.smooth.discretize = "smooth")
 
@@ -106,9 +131,11 @@
 ## gamma distributions are discretized
 distroptions(DistrResolution = 1e-10)
 MDEstimator(x = x, ParamFamily = G, distance = HellingerDist, startPar = c(1,2))
+## or
+HellingerMDEstimator(x = x, ParamFamily = G, startPar = c(1,2))
 distroptions(DistrResolution = 1e-6) # default
 ## or smoothing of emprical distribution (takes some time!)
-#MDEstimator(x = x, ParamFamily = G, distance = HellingerDist, asis.smooth.discretize = "smooth")
+MDEstimator(x = x, ParamFamily = G, distance = HellingerDist, asis.smooth.discretize = "smooth")
 }
 }
 \keyword{univar}



More information about the Distr-commits mailing list