[Distr-commits] r621 - in branches/distr-2.2/pkg/distrMod: . inst tests tests/Examples

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Oct 16 06:16:23 CEST 2009


Author: stamats
Date: 2009-10-16 06:16:23 +0200 (Fri, 16 Oct 2009)
New Revision: 621

Added:
   branches/distr-2.2/pkg/distrMod/tests/
   branches/distr-2.2/pkg/distrMod/tests/Examples/
   branches/distr-2.2/pkg/distrMod/tests/Examples/distrMod-Ex.Rout.save
Modified:
   branches/distr-2.2/pkg/distrMod/DESCRIPTION
   branches/distr-2.2/pkg/distrMod/inst/NEWS
Log:
added *-Ex.Rout.save to new tests/Examples folder. We will have to check and probably to slightly modify these files with every new R version.

updated NEWS and DESCRIPTION file

Modified: branches/distr-2.2/pkg/distrMod/DESCRIPTION
===================================================================
--- branches/distr-2.2/pkg/distrMod/DESCRIPTION	2009-10-16 04:09:24 UTC (rev 620)
+++ branches/distr-2.2/pkg/distrMod/DESCRIPTION	2009-10-16 04:16:23 UTC (rev 621)
@@ -1,6 +1,6 @@
 Package: distrMod
 Version: 2.2
-Date: 2009-09-04
+Date: 2009-10-16
 Title: Object orientated implementation of probability models
 Description: Object orientated implementation of probability models based on packages 'distr' and 'distrEx'
 Author: Matthias Kohl, Peter Ruckdeschel

Modified: branches/distr-2.2/pkg/distrMod/inst/NEWS
===================================================================
--- branches/distr-2.2/pkg/distrMod/inst/NEWS	2009-10-16 04:09:24 UTC (rev 620)
+++ branches/distr-2.2/pkg/distrMod/inst/NEWS	2009-10-16 04:16:23 UTC (rev 621)
@@ -42,6 +42,8 @@
 
 GENERAL ENHANCEMENTS:
 
++ added tests/Examples folder with file distrMod-Ex.Rout.save to have
+  some automatic testing
 + added field "Encoding: latin1" to all DESCRIPTION files in order to avoid problems 
   with e.g. Windows locale when svn replaces $LastChangedDate
 + added TOBEDONE (sic!) files for each package (by accident also in trunc; these are empty so far)
@@ -108,7 +110,7 @@
 + a tiny buglet in prototype for trafo slot
 + yet another issue with "pretty printing", -> give default names "" if empty
 + the "dim"-issue:
-  * estimte, untransformed.estimate, main, and nuisance from time to time 
+  * estimate, untransformed.estimate, main, and nuisance from time to time 
     did not return numerics (instead: items with dim attribute...)
   * accessors to [untransoformed.]asvar now coerce to matrix, but only so if the item is not NULL
   * in .process.meCalcRes delete dim attribute for slots [untransformed.]estimate unless

Added: branches/distr-2.2/pkg/distrMod/tests/Examples/distrMod-Ex.Rout.save
===================================================================
--- branches/distr-2.2/pkg/distrMod/tests/Examples/distrMod-Ex.Rout.save	                        (rev 0)
+++ branches/distr-2.2/pkg/distrMod/tests/Examples/distrMod-Ex.Rout.save	2009-10-16 04:16:23 UTC (rev 621)
@@ -0,0 +1,3938 @@
+
+R version 2.10.0 beta (2009-10-15 r50107)
+Copyright (C) 2009 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+  Natural language support but running in an English locale
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> ### * <HEADER>
+> ###
+> attach(NULL, name = "CheckExEnv")
+> assign("nameEx",
++        local({
++ 	   s <- "__{must remake R-ex/*.R}__"
++            function(new) {
++                if(!missing(new)) s <<- new else s
++            }
++        }),
++        pos = "CheckExEnv")
+> ## Add some hooks to label plot pages for base and grid graphics
+> assign("base_plot_hook",
++        function() {
++            pp <- par(c("mfg","mfcol","oma","mar"))
++            if(all(pp$mfg[1:2] == c(1, pp$mfcol[2]))) {
++                outer <- (oma4 <- pp$oma[4]) > 0; mar4 <- pp$mar[4]
++                mtext(sprintf("help(\"%s\")", nameEx()), side = 4,
++                      line = if(outer)max(1, oma4 - 1) else min(1, mar4 - 1),
++                outer = outer, adj = 1, cex = .8, col = "orchid", las=3)
++            }
++        },
++        pos = "CheckExEnv")
+> assign("grid_plot_hook",
++        function() {
++            grid::pushViewport(grid::viewport(width=grid::unit(1, "npc") -
++                               grid::unit(1, "lines"), x=0, just="left"))
++            grid::grid.text(sprintf("help(\"%s\")", nameEx()),
++                            x=grid::unit(1, "npc") + grid::unit(0.5, "lines"),
++                            y=grid::unit(0.8, "npc"), rot=90,
++                            gp=grid::gpar(col="orchid"))
++        },
++        pos = "CheckExEnv")
+> setHook("plot.new",     get("base_plot_hook", pos = "CheckExEnv"))
+> setHook("persp",        get("base_plot_hook", pos = "CheckExEnv"))
+> setHook("grid.newpage", get("grid_plot_hook", pos = "CheckExEnv"))
+> assign("cleanEx",
++        function(env = .GlobalEnv) {
++ 	   rm(list = ls(envir = env, all.names = TRUE), envir = env)
++            RNGkind("default", "default")
++ 	   set.seed(1)
++    	   options(warn = 1)
++ 	   .CheckExEnv <- as.environment("CheckExEnv")
++ 	   delayedAssign("T", stop("T used instead of TRUE"),
++ 		  assign.env = .CheckExEnv)
++ 	   delayedAssign("F", stop("F used instead of FALSE"),
++ 		  assign.env = .CheckExEnv)
++ 	   sch <- search()
++ 	   newitems <- sch[! sch %in% .oldSearch]
++ 	   for(item in rev(newitems))
++                eval(substitute(detach(item), list(item=item)))
++ 	   missitems <- .oldSearch[! .oldSearch %in% sch]
++ 	   if(length(missitems))
++ 	       warning("items ", paste(missitems, collapse=", "),
++ 		       " have been removed from the search path")
++        },
++        pos = "CheckExEnv")
+> assign("ptime", proc.time(), pos = "CheckExEnv")
+> ## at least one package changes these via ps.options(), so do this
+> ## before loading the package.
+> ## Use postscript as incomplete files may be viewable, unlike PDF.
+> ## Choose a size that is close to on-screen devices, fix paper
+> grDevices::ps.options(width = 7, height = 7, paper = "a4", reset = TRUE)
+> grDevices::postscript("distrMod-Ex.ps")
+> 
+> assign("par.postscript", graphics::par(no.readonly = TRUE), pos = "CheckExEnv")
+> options(contrasts = c(unordered = "contr.treatment", ordered = "contr.poly"))
+> options(warn = 1)
+> library('distrMod')
+Loading required package: startupmsg
+:startupmsg>  Utilities for start-up messages (version 0.7)
+:startupmsg> 
+:startupmsg>  For more information see ?"startupmsg",
+:startupmsg>  NEWS("startupmsg")
+
+Loading required package: distr
+Loading required package: sfsmisc
+Loading required package: SweaveListingUtils
+:SweaveListingUtils>  Utilities for Sweave together with
+:SweaveListingUtils>  TeX listings package (version 0.4)
+:SweaveListingUtils> 
+:SweaveListingUtils>  Some functions from package 'base'
+:SweaveListingUtils>  are intentionally masked ---see
+:SweaveListingUtils>  SweaveListingMASK().
+:SweaveListingUtils> 
+:SweaveListingUtils>  Note that global options are
+:SweaveListingUtils>  controlled by
+:SweaveListingUtils>  SweaveListingoptions() ---c.f.
+:SweaveListingUtils>  ?"SweaveListingoptions".
+:SweaveListingUtils> 
+:SweaveListingUtils>  For more information see
+:SweaveListingUtils>  ?"SweaveListingUtils",
+:SweaveListingUtils>  NEWS("SweaveListingUtils")
+:SweaveListingUtils>  There is a vignette to this
+:SweaveListingUtils>  package; try
+:SweaveListingUtils>  vignette("ExampleSweaveListingUtils").
+
+
+Attaching package: 'SweaveListingUtils'
+
+
+	The following object(s) are masked from package:base :
+
+	 library,
+	 require 
+
+:distr>  Object orientated implementation of distributions (version
+:distr>  2.2)
+:distr> 
+:distr>  Attention: Arithmetics on distribution objects are
+:distr>  understood as operations on corresponding random variables
+:distr>  (r.v.s); see distrARITH().
+:distr> 
+:distr>  Some functions from package 'stats' are intentionally masked
+:distr>  ---see distrMASK().
+:distr> 
+:distr>  Note that global options are controlled by distroptions()
+:distr>  ---c.f. ?"distroptions".
+:distr> 
+:distr>  For more information see ?"distr", NEWS("distr"), as well as
+:distr>    http://distr.r-forge.r-project.org/
+:distr>  Package "distrDoc" provides a vignette to this package as
+:distr>  well as to several extension packages; try
+:distr>  vignette("distr").
+
+
+Attaching package: 'distr'
+
+
+	The following object(s) are masked from package:stats :
+
+	 df,
+	 qqplot,
+	 sd 
+
+Loading required package: distrEx
+Loading required package: evd
+Loading required package: actuar
+
+Attaching package: 'actuar'
+
+
+	The following object(s) are masked from package:grDevices :
+
+	 cm 
+
+:distrEx>  Extensions of package distr (version 2.2)
+:distrEx> 
+:distrEx>  Note: Packages "e1071", "moments", "fBasics" should be
+:distrEx>  attached /before/ package "distrEx". See distrExMASK().
+:distrEx> 
+:distrEx>  For more information see ?"distrEx", NEWS("distrEx"), as
+:distrEx>  well as
+:distrEx>    http://distr.r-forge.r-project.org/
+:distrEx>  Package "distrDoc" provides a vignette to this package
+:distrEx>  as well as to several related packages; try
+:distrEx>  vignette("distr").
+
+
+Attaching package: 'distrEx'
+
+
+	The following object(s) are masked from package:stats :
+
+	 IQR,
+	 mad,
+	 median,
+	 var 
+
+Loading required package: RandVar
+:RandVar>  Implementation of random variables (version 0.7)
+:RandVar> 
+:RandVar>  For more information see ?"RandVar", NEWS("RandVar"), as
+:RandVar>  well as
+:RandVar>    http://robast.r-forge.r-project.org/
+:RandVar>  This package also includes a vignette; try
+:RandVar>  vignette("RandVar").
+
+Loading required package: MASS
+Loading required package: stats4
+:distrMod>  Object orientated implementation of probability models
+:distrMod>  (version 2.2)
+:distrMod> 
+:distrMod>  Some functions from pkg's 'base' and 'stats' are
+:distrMod>  intentionally masked ---see distrModMASK().
+:distrMod> 
+:distrMod>  Note that global options are controlled by
+:distrMod>  distrModoptions() ---c.f. ?"distrModoptions".
+:distrMod> 
+:distrMod>  For more information see ?"distrMod",
+:distrMod>  NEWS("distrMod"), as well as
+:distrMod>    http://distr.r-forge.r-project.org/
+:distrMod>  Package "distrDoc" provides a vignette to this package
+:distrMod>  as well as to several related packages; try
+:distrMod>  vignette("distr").
+
+
+Attaching package: 'distrMod'
+
+
+	The following object(s) are masked from package:stats4 :
+
+	 confint 
+
+
+	The following object(s) are masked from package:stats :
+
+	 confint 
+
+> 
+> assign(".oldSearch", search(), pos = 'CheckExEnv')
+> assign(".oldNS", loadedNamespaces(), pos = 'CheckExEnv')
+> cleanEx(); nameEx("BetaFamily")
+> ### * BetaFamily
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: BetaFamily
+> ### Title: Generating function for Beta families
+> ### Aliases: BetaFamily
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> (B1 <- BetaFamily())
+An object of class "BetaFamily"
+### name:	Beta family
+
+### distribution:	Distribution Object of Class: Beta
+ shape1: 1
+ shape2: 1
+ ncp: 0
+
+### param:	An object of class "ParamFamParameter"
+name:	shape1 and shape2
+shape1:	1
+shape2:	1
+trafo:
+       shape1 shape2
+shape1      1      0
+shape2      0      1
+
+### props:
+[1] "The Beta family is invariant in the following sense"
+[2] "if (x_i)~Beta(s1,s2) then (1-x_i)~Beta(s2,s1)"      
+> FisherInfo(B1)
+An object of class “PosSemDefSymmMatrix”
+           shape1     shape2
+shape1  1.0000000 -0.6449341
+shape2 -0.6449341  1.0000000
+> checkL2deriv(B1)
+precision of centering:	 3.96327e-05 3.963591e-05 
+precision of Fisher information:
+              shape1        shape2
+shape1 -1.851068e-05  1.648326e-06
+shape2  1.648326e-06 -1.851068e-05
+$maximum.deviation
+[1] 3.963591e-05
+
+> 
+> 
+> 
+> cleanEx(); nameEx("BiasType-class")
+> ### * BiasType-class
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: BiasType-class
+> ### Title: Bias Type
+> ### Aliases: BiasType-class name,BiasType-method name<-,BiasType-method
+> ### Keywords: classes
+> 
+> ### ** Examples
+> 
+> aB <- positiveBias()
+> name(aB)
+[1] "positive Bias"
+> 
+> 
+> 
+> cleanEx(); nameEx("BinomFamily")
+> ### * BinomFamily
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: BinomFamily
+> ### Title: Generating function for Binomial families
+> ### Aliases: BinomFamily
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> (B1 <- BinomFamily(size = 25, prob = 0.25))
+An object of class "BinomFamily"
+### name:	Binomial family
+
+### distribution:	Distribution Object of Class: Binom
+ size: 25
+ prob: 0.25
+
+### param:	An object of class "ParamFamParameter"
+name:	probability of success
+prob:	0.25
+fixed part of param.:
+	size:	25
+trafo:
+     prob
+prob    1
+
+### props:
+[1] "The Binomial family is symmetric with respect to prob = 0.5;"
+[2] "i.e., d(Binom(size, prob))(k)=d(Binom(size,1-prob))(size-k)" 
+> plot(B1)
+> FisherInfo(B1)
+An object of class “PosSemDefSymmMatrix”
+         prob
+prob 133.3333
+> checkL2deriv(B1)
+precision of centering:	 -6.965857e-16 
+precision of Fisher information:
+             prob
+prob 2.842171e-14
+$maximum.deviation
+[1] 2.842171e-14
+
+> 
+> 
+> 
+> cleanEx(); nameEx("CauchyLocationScaleFamily")
+> ### * CauchyLocationScaleFamily
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: CauchyLocationScaleFamily
+> ### Title: Generating function for Cauchy location and scale families
+> ### Aliases: CauchyLocationScaleFamily
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> (C1 <- CauchyLocationScaleFamily())
+An object of class "CauchyLocationScaleFamily"
+### name:	Cauchy Location and scale family
+
+### distribution:	Distribution Object of Class: Cauchy
+ location: 0
+ scale: 1
+
+### param:	An object of class "ParamFamParameter"
+name:	location and scale
+loc:	0
+scale:	1
+trafo:
+      loc scale
+loc     1     0
+scale   0     1
+
+### props:
+[1] "The Cauchy 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(C1)
+> FisherInfo(C1)
+An object of class “PosDefSymmMatrix”
+      loc scale
+loc   0.5   0.0
+scale 0.0   0.5
+> ### need smaller integration range:
+> distrExoptions("ElowerTruncQuantile"=1e-4,"EupperTruncQuantile"=1e-4)
+> checkL2deriv(C1)
+precision of centering:	 0 -0.02119711 
+precision of Fisher information:
+                loc       scale
+loc   -3.137524e-05  0.00000000
+scale  0.000000e+00 -0.02118143
+$maximum.deviation
+[1] 0.02119711
+
+> distrExoptions("ElowerTruncQuantile"=1e-7,"EupperTruncQuantile"=1e-7)
+> 
+> 
+> 
+> cleanEx(); nameEx("Confint-class")
+> ### * Confint-class
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Confint-class
+> ### Title: Confint-class
+> ### Aliases: Confint-class type,Confint-method call.estimate
+> ###   call.estimate,Confint-method confint,Confint,missing-method
+> ###   name.estimate name.estimate,Confint-method trafo.estimate
+> ###   trafo.estimate,Confint-method samplesize.estimate
+> ###   samplesize.estimate,Confint-method completecases.estimate
+> ###   completecases.estimate,Confint-method nuisance.estimate
+> ###   nuisance.estimate,Confint-method fixed.estimate
+> ###   fixed.estimate,Confint-method show,Confint-method
+> ###   print,Confint-method
+> ### Keywords: classes
+> 
+> ### ** Examples
+> 
+> ## some transformation
+> mtrafo <- function(x){
++      nms0 <- c("scale","shape")
++      nms <- c("shape","rate")
++      fval0 <- c(x[2], 1/x[1])
++      names(fval0) <- nms
++      mat0 <- matrix( c(0, -1/x[1]^2, 1, 0), nrow = 2, ncol = 2,
++                      dimnames = list(nms,nms0))                          
++      list(fval = fval0, mat = mat0)}
+> 
+> x <- rgamma(50, scale = 0.5, shape = 3)
+> 
+> ## parametric family of probability measures
+> G <- GammaFamily(scale = 1, shape = 2, trafo = mtrafo)
+> ## MLE
+> res <- MLEstimator(x = x, ParamFamily = G)
+> ci <- confint(res)
+> print(ci, digits = 4, show.details="maximal")
+A[n] asymptotic (CLT-based) confidence interval:
+      2.5 % 97.5 %
+shape 2.530  5.591
+rate  1.751  4.097
+Type of estimator: Maximum likelihood estimate
+samplesize:   50
+Call by which estimate was produced:
+MLEstimator(x = x, ParamFamily = G)
+Transformation of main parameter by which estimate was produced:
+function (x) 
+{
+    nms0 <- c("scale", "shape")
+    nms <- c("shape", "rate")
+    fval0 <- c(x[2], 1/x[1])
+    names(fval0) <- nms
+    mat0 <- matrix(c(0, -1/x[1]^2, 1, 0), nrow = 2, ncol = 2, 
+        dimnames = list(nms, nms0))
+    list(fval = fval0, mat = mat0)
+}
+Trafo / derivative matrix at which estimate was produced:
+      scale shape
+shape  0.00     1
+rate  -8.55     0
+> print(ci, digits = 4, show.details="medium")
+A[n] asymptotic (CLT-based) confidence interval:
+      2.5 % 97.5 %
+shape 2.530  5.591
+rate  1.751  4.097
+Type of estimator: Maximum likelihood estimate
+samplesize:   50
+Call by which estimate was produced:
+MLEstimator(x = x, ParamFamily = G)
+> print(ci, digits = 4, show.details="minimal")
+A[n] asymptotic (CLT-based) confidence interval:
+      2.5 % 97.5 %
+shape 2.530  5.591
+rate  1.751  4.097
+> 
+> 
+> 
+> cleanEx(); nameEx("Estimate-class")
+> ### * Estimate-class
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Estimate-class
+> ### Title: Estimate-class.
+> ### Aliases: Estimate-class name,Estimate-method name<-,Estimate-method
+> ###   estimate estimate,Estimate-method estimate.call
+> ###   estimate.call,Estimate-method Infos Infos,Estimate-method samplesize
+> ###   samplesize,Estimate-method completecases
+> ###   completecases,Estimate-method asvar asvar,Estimate-method
+> ###   fixed,Estimate-method asvar<- asvar<-,Estimate-method
+> ###   nuisance,Estimate-method main,Estimate-method Infos<-
+> ###   Infos<-,Estimate-method addInfo<- addInfo<-,Estimate-method
+> ###   show,Estimate-method print,Estimate-method untransformed.estimate
+> ###   untransformed.estimate,Estimate-method untransformed.asvar
+> ###   untransformed.asvar,Estimate-method
+> ### Keywords: classes
+> 
+> ### ** Examples
+> 
+> x <- rnorm(100)
+> Estimator(x, estimator = mean, name = "mean")
+Evaluations of mean:
+--------------------
+An object of class “Estimate” 
+generated by call
+  Estimator(x = x, estimator = mean, name = "mean")
+samplesize:   100
+estimate:
+named numeric(0)
+> 
+> x1 <- x; x1[sample(1:100,10)] <- NA
+> myEst1 <- Estimator(x1, estimator = mean, name = "mean")
+> samplesize(myEst1)
+[1] 90
+> samplesize(myEst1, onlycomplete = FALSE)
+[1] 100
+> 
+> 
+> 
+> cleanEx(); nameEx("Estimator")
+> ### * Estimator
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Estimator
+> ### Title: Function to compute estimates
+> ### Aliases: Estimator
+> ### Keywords: univar
+> 
+> ### ** Examples
+> 
+> x <- rnorm(100)
+> Estimator(x, estimator = mean, name = "mean")
+Evaluations of mean:
+--------------------
+An object of class “Estimate” 
+generated by call
+  Estimator(x = x, estimator = mean, name = "mean")
+samplesize:   100
+estimate:
+named numeric(0)
+> 
+> X <- matrix(rnorm(1000), nrow = 10)
+> Estimator(X, estimator = rowMeans, name = "mean")
+Evaluations of mean:
+--------------------
+An object of class “Estimate” 
+generated by call
+  Estimator(x = X, estimator = rowMeans, name = "mean")
+samplesize:   100
+estimate:
+named numeric(0)
+> 
+> 
+> 
+> cleanEx(); nameEx("EvenSymmetric-class")
+> ### * EvenSymmetric-class
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: EvenSymmetric-class
+> ### Title: Class for Even Functions
+> ### Aliases: EvenSymmetric-class
+> ### Keywords: classes
+> 
+> ### ** Examples
+> 
+> new("EvenSymmetric")
+type of symmetry:	even function
+center of symmetry:
+numeric(0)
+> 
+> 
+> 
+> cleanEx(); nameEx("EvenSymmetric")
+> ### * EvenSymmetric
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: EvenSymmetric
+> ### Title: Generating function for EvenSymmetric-class
+> ### Aliases: EvenSymmetric
+> ### Keywords: math
+> 
+> ### ** Examples
+> 
+> EvenSymmetric()
+type of symmetry:	even function
+center of symmetry:
+[1] 0
+> 
+> ## The function is currently defined as
+> function(SymmCenter = 0){ 
++     new("EvenSymmetric", SymmCenter = SymmCenter) 
++ }
+function (SymmCenter = 0) 
+{
+    new("EvenSymmetric", SymmCenter = SymmCenter)
+}
+> 
+> 
+> 
+> cleanEx(); nameEx("ExpScaleFamily")
+> ### * ExpScaleFamily
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: ExpScaleFamily
+> ### Title: Generating function for exponential scale families
+> ### Aliases: ExpScaleFamily
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> (E1 <- ExpScaleFamily())
+An object of class "ExpScaleFamily"
+### name:	Exponential scale family
+
+### distribution:	Distribution Object of Class: Exp
+ rate: 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 "ParamFamParameter"
+name:	scale
+scale:	1
+trafo:
+      scale
+scale     1
+
+### props:
+[1] "The Exponential scale family is invariant under"
+[2] "the group of transformations 'g(y) = scale*y'"  
+[3] "with scale parameter 'scale'"                   
+> plot(E1)
+> Map(L2deriv(E1)[[1]])
+[[1]]
+function (x) 
+{
+    ((x - 0)/1 * LogDeriv((x - 0)/1) - 1)/1
+}
+<environment: 0x7f7e928>
+
+> checkL2deriv(E1)
+precision of centering:	 -1.511810e-06 
+precision of Fisher information:
+             scale
+scale -2.61793e-05
+$maximum.deviation
+[1] 2.61793e-05
+
+> 
+> 
+> 
+> cleanEx(); nameEx("FunSymmList-class")
+> ### * FunSymmList-class
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: FunSymmList-class
+> ### Title: List of Symmetries for a List of Functions
+> ### Aliases: FunSymmList-class
+> ### Keywords: classes
+> 
+> ### ** Examples
+> 
+> new("FunSymmList", list(NonSymmetric(), EvenSymmetric(SymmCenter = 1), 
++                         OddSymmetric(SymmCenter = 2)))
+An object of class “FunSymmList”
+[[1]]
+type of symmetry:	non-symmetric function
+NULL
+
+[[2]]
+type of symmetry:	even function
+center of symmetry:
+[1] 1
+
+[[3]]
+type of symmetry:	odd function
+center of symmetry:
+[1] 2
+
+> 
+> 
+> 
+> cleanEx(); nameEx("FunSymmList")
+> ### * FunSymmList
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: FunSymmList
+> ### Title: Generating function for FunSymmList-class
+> ### Aliases: FunSymmList
+> ### Keywords: math
+> 
+> ### ** Examples
+> 
+> FunSymmList(NonSymmetric(), EvenSymmetric(SymmCenter = 1), 
++             OddSymmetric(SymmCenter = 2))
+An object of class “FunSymmList”
+[[1]]
+type of symmetry:	non-symmetric function
+NULL
+
+[[2]]
+type of symmetry:	even function
+center of symmetry:
+[1] 1
+
+[[3]]
+type of symmetry:	odd function
+center of symmetry:
+[1] 2
+
+> 
+> ## The function is currently defined as
+> function (...){
++     new("FunSymmList", list(...))
++ }
+function (...) 
+{
+    new("FunSymmList", list(...))
+}
+> 
+> 
+> 
+> cleanEx(); nameEx("GammaFamily")
+> ### * GammaFamily
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: GammaFamily
+> ### Title: Generating function for Gamma families
+> ### Aliases: GammaFamily
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> (G1 <- GammaFamily())
+An object of class "GammaFamily"
+### name:	Gamma family
+
+### distribution:	Distribution Object of Class: Gammad
+ shape: 1
+ scale: 1
+
+### param:	An object of class "ParamFamParameter"
+name:	scale and shape
+scale:	1
+shape:	1
+trafo:
+      scale shape
+scale     1     0
+shape     0     1
+
+### props:
+[1] "The Gamma family is scale invariant via the parametrization"
+[2] "'(nu,shape)=(log(scale),shape)'"                            
+> FisherInfo(G1)
+An object of class “PosSemDefSymmMatrix”
+      scale    shape
+scale     1 1.000000
+shape     1 1.644934
+> checkL2deriv(G1)
+precision of centering:	 -1.511810e-06 1.312514e-06 
+precision of Fisher information:
+              scale         shape
+scale -2.617930e-05 -7.165188e-06
+shape -7.165188e-06 -2.862712e-05
+$maximum.deviation
+[1] 2.862712e-05
+
+> 
+> 
+> 
+> cleanEx(); nameEx("GumbelLocationFamily")
+> ### * GumbelLocationFamily
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: GumbelLocationFamily
+> ### Title: Generating function for Gumbel location families
+> ### Aliases: GumbelLocationFamily
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> (G1 <- GumbelLocationFamily())
+An object of class "GumbelLocationFamily"
+### name:	Gumbel location family
+
+### distribution:	Distribution Object of Class: Gumbel
+ loc: 0
+ scale: 1
+
+### param:	An object of class "ParamFamParameter"
+name:	loc
+loc:	0
+trafo:
+    loc
+loc   1
+
+### props:
+[1] "The Gumbel location family is invariant under"
+[2] "the group of transformations 'g(x) = x + loc'"
+[3] "with location parameter 'loc'"                
+> plot(G1)
+> Map(L2deriv(G1)[[1]])
+[[1]]
+function (x) 
+{
+    LogDeriv(x - 0)
+}
+<environment: 0x85ba170>
+
+> checkL2deriv(G1)
+precision of centering:	 1.511810e-06 
+precision of Fisher information:
+             loc
+loc -2.61793e-05
+$maximum.deviation
+[1] 2.61793e-05
+
+> 
+> 
+> 
+> cleanEx(); nameEx("InfoNorm")
+> ### * InfoNorm
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: InfoNorm
+> ### Title: Generating function for InfoNorm-class
+> ### Aliases: InfoNorm
+> ### Keywords: robust
+> 
+> ### ** Examples
+> 
+> InfoNorm()
+An object of class “InfoNorm”
+Slot "QuadForm":
+An object of class “PosSemDefSymmMatrix”
+     [,1]
+[1,]    1
+
+Slot "name":
+[1] "Information matrix Norm"
+
+Slot "fct":
+function (x) 
+QuadFormNorm(x, A = A)
+<environment: 0x7e98768>
+
+> 
+> ## The function is currently defined as
+> function(){ new("InfoNorm") }
+function () 
+{
+    new("InfoNorm")
+}
+> 
+> 
+> 
+> cleanEx(); nameEx("L2GroupFamily-class")
+> ### * L2GroupFamily-class
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: L2GroupParamFamily-class
+> ### Title: L2 differentiable parametric group family
+> ### Aliases: L2GroupParamFamily-class LogDeriv
+> ###   LogDeriv,L2GroupParamFamily-method LogDeriv<-
+> ###   LogDeriv<-,L2GroupParamFamily-method
+> ### Keywords: classes models
+> 
+> ### ** Examples
+> 
+> F1 <- new("L2GroupParamFamily")
+> plot(F1)
+> 
+> 
+> 
+> cleanEx(); nameEx("L2LocationFamily-class")
+> ### * L2LocationFamily-class
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: L2LocationFamily-class
+> ### Title: L2 differentiable parametric group family
+> ### Aliases: L2LocationFamily-class
+> ### Keywords: classes models
+> 
+> ### ** Examples
+> 
+> F1 <- new("L2LocationFamily")
+> plot(F1)
+> 
+> 
+> 
+> cleanEx(); nameEx("L2LocationFamily")
+> ### * L2LocationFamily
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: L2LocationFamily
+> ### Title: Generating function for L2LocationFamily-class
+> ### Aliases: L2LocationFamily
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> F1 <- L2LocationFamily()
+> plot(F1)
+> 
+> 
+> 
+> cleanEx(); nameEx("L2LocationScaleFamily-class")
+> ### * L2LocationScaleFamily-class
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: L2LocationScaleFamily-class
+> ### Title: L2 differentiable parametric group family
+> ### Aliases: L2LocationScaleFamily-class
+> ### Keywords: classes models
+> 
+> ### ** Examples
+> 
+> F1 <- new("L2LocationScaleFamily")
+> plot(F1)
+> 
+> 
+> 
+> cleanEx(); nameEx("L2LocationScaleFamily")
+> ### * L2LocationScaleFamily
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: L2LocationScaleFamily
+> ### Title: Generating function for L2LocationScaleFamily-class
+> ### Aliases: L2LocationScaleFamily
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> F1 <- L2LocationScaleFamily()
+> plot(F1)
+> 
+> 
+> 
+> cleanEx(); nameEx("L2LocationUnknownScaleFamily")
+> ### * L2LocationUnknownScaleFamily
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: L2LocationUnknownScaleFamily
+> ### Title: Generating function for L2LocationScaleFamily-class in nuisance
+> ###   situation
+> ### Aliases: L2LocationUnknownScaleFamily
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> F1 <- L2LocationUnknownScaleFamily()
+> plot(F1)
+> 
+> 
+> 
+> cleanEx(); nameEx("L2ParamFamily-class")
+> ### * L2ParamFamily-class
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: L2ParamFamily-class
+> ### Title: L2 differentiable parametric family
+> ### Aliases: plot plot-methods L2ParamFamily-class FisherInfo
+> ###   FisherInfo,L2ParamFamily,missing-method
+> ###   FisherInfo,L2ParamFamily,ParamFamParameter-method L2deriv
+> ###   L2deriv,L2ParamFamily,missing-method
+> ###   L2deriv,L2ParamFamily,ParamFamParameter-method L2derivSymm
+> ###   L2derivSymm,L2ParamFamily-method L2derivDistr
+> ###   L2derivDistr,L2ParamFamily-method L2derivDistrSymm
+> ###   L2derivDistrSymm,L2ParamFamily-method
+> ###   checkL2deriv,L2ParamFamily-method
+> ###   E,L2ParamFamily,EuclRandVariable,missing-method
+> ###   E,L2ParamFamily,EuclRandMatrix,missing-method
+> ###   E,L2ParamFamily,EuclRandVarList,missing-method
+> ###   plot,L2ParamFamily,missing-method
+> ### Keywords: classes models
+> 
+> ### ** Examples
+> 
+> F1 <- new("L2ParamFamily")
+> plot(F1)
+> 
+> ## selection of subpanels for plotting
+> F2 <- L2LocationScaleFamily()
+> layout(matrix(c(1,2,3,3), nrow=2, byrow=TRUE))
+> plot(F2,mfColRow = FALSE,
++      to.draw.arg=c("p","q","loc"))
+> plot(F2,mfColRow = FALSE, inner=list("empirical cdf","pseudo-inverse",
++      "L2-deriv, loc.part"), to.draw.arg=c("p","q","loc"))
+> 
+> 
+> 
+> cleanEx(); nameEx("L2ParamFamily")
+> ### * L2ParamFamily
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: L2ParamFamily
+> ### Title: Generating function for L2ParamFamily-class
+> ### Aliases: L2ParamFamily
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> F1 <- L2ParamFamily()
+> plot(F1)
+> 
+> 
+> 
+> cleanEx(); nameEx("L2ScaleFamily-class")
+> ### * L2ScaleFamily-class
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: L2ScaleFamily-class
+> ### Title: L2 differentiable parametric group family
+> ### Aliases: L2ScaleFamily-class
+> ### Keywords: classes models
+> 
+> ### ** Examples
+> 
+> F1 <- new("L2ScaleFamily")
+> plot(F1)
+> 
+> 
+> 
+> cleanEx(); nameEx("L2ScaleFamily")
+> ### * L2ScaleFamily
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: L2ScaleFamily
+> ### Title: Generating function for L2ScaleFamily-class
+> ### Aliases: L2ScaleFamily
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> F1 <- L2ScaleFamily()
+> plot(F1)
+> 
+> 
+> 
+> cleanEx(); nameEx("L2ScaleUnknownLocationFamily")
+> ### * L2ScaleUnknownLocationFamily
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: L2ScaleUnknownLocationFamily
+> ### Title: Generating function for L2LocationScaleFamily-class in nuisance
+> ###   situation
+> ### Aliases: L2ScaleUnknownLocationFamily
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> F1 <- L2ScaleUnknownLocationFamily()
+> plot(F1)
+> 
+> 
+> 
+> cleanEx(); nameEx("LnormScaleFamily")
+> ### * LnormScaleFamily
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: LnormScaleFamily
+> ### Title: Generating function for lognormal scale families
+> ### Aliases: LnormScaleFamily
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> (L1 <- LnormScaleFamily())
+An object of class "LnormScaleFamily"
+### name:	lognormal scale family
+
+### distribution:	Distribution Object of Class: Lnorm
+ meanlog: 0
+ sdlog: 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 "ParamFamParameter"
+name:	scale
+meanlog:	1
+fixed part of param.:
+	:	0
+trafo:
+      scale
+scale     1
+
+### props:
+[1] "The lognormal scale family is invariant under"
+[2] "the group of transformations 'g(y) = scale*y'"
+[3] "with scale parameter 'scale'"                 
+> plot(L1)
+> Map(L2deriv(L1)[[1]])
+[[1]]
+function (x) 
+{
+    ((x - 0)/1 * LogDeriv((x - 0)/1) - 1)/1
+}
+<environment: 0x8275218>
+
+> checkL2deriv(L1)
+precision of centering:	 -0.003003394 
+precision of Fisher information:
+            meanlog
+meanlog -0.01027919
+$maximum.deviation
+[1] 0.01027919
+
+> 
+> 
+> 
+> cleanEx(); nameEx("MCEstimate-class")
+> ### * MCEstimate-class
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: MCEstimate-class
+> ### Title: MCEstimate-class.
+> ### 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
+> ###   coerce,MCEstimate,mle-method show,MCEstimate-method
+> ###   profile,MCEstimate-method
+> ### Keywords: classes
+> 
+> ### ** Examples
+> 
+> ## (empirical) Data
+> x <- rgamma(50, scale = 0.5, shape = 3)
+> 
+> ## parametric family of probability measures
+> G <- GammaFamily(scale = 1, shape = 2)
+> 
+> MDEstimator(x, G)
+Evaluations of Minimum Kolmogorov distance estimate:
+----------------------------------------------------
+An object of class “Estimate” 
+generated by call
+  MDEstimator(x = x, ParamFamily = G)
+samplesize:   50
+estimate:
+    scale     shape 
+0.3398645 4.2654569 
+Criterion:
+Kolmogorov distance 
+         0.06350364 
+> (m <- MLEstimator(x, G))
+Evaluations of Maximum likelihood estimate:
+-------------------------------------------
+An object of class “Estimate” 
+generated by call
+  MLEstimator(x = x, ParamFamily = G)
+samplesize:   50
+estimate:
+     scale        shape   
+  0.34200800   4.06028564 
+ (0.07002713) (0.78099026)
+asymptotic (co)variance (multiplied with samplesize):
+           scale     shape
+scale  0.2451899 -2.568863
+shape -2.5688629 30.497289
+Criterion:
+negative log-likelihood 
+                47.9651 
+> m.mle <- as(m,"mle")
+> par(mfrow=c(1,2))
+> plot(profile(m))
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx(); nameEx("MCEstimator")
+> ### * MCEstimator
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: MCEstimator
[TRUNCATED]

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


More information about the Distr-commits mailing list