[Distr-commits] r315 - pkg/distrMod/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Oct 24 10:26:52 CEST 2008


Author: stamats
Date: 2008-10-24 10:26:52 +0200 (Fri, 24 Oct 2008)
New Revision: 315

Modified:
   pkg/distrMod/R/SimpleL2ParamFamilies.R
Log:
in my opinion definition of LnormScaleFamily was wrong ... corrected ...

Modified: pkg/distrMod/R/SimpleL2ParamFamilies.R
===================================================================
--- pkg/distrMod/R/SimpleL2ParamFamilies.R	2008-10-24 04:29:02 UTC (rev 314)
+++ pkg/distrMod/R/SimpleL2ParamFamilies.R	2008-10-24 08:26:52 UTC (rev 315)
@@ -362,11 +362,18 @@
                   centraldistribution = Lnorm(meanlog = 0, sdlog = sdlog),
                   modParam = modParam,
                   LogDeriv = function(x) log(x)/x/sdlog^2 + 1/x,
-                  L2derivDistr.0 = AbscontDistribution(r=function(n){
-                    x <- rlnorm(n); (log(x)-1)/x}),
-       ###wrong!!!           L2derivDistr.0 = Norm(mean=0, sd=1/sdlog^2),
-       ###wrong!!!           FisherInfo.0 = matrix(1/sdlog^2,
-       ###wrong!!!                                 dimnames = list("scale","scale")), 
+#                  L2derivDistr.0 = AbscontDistribution(r=function(n){
+#                    x <- rlnorm(n); (log(x)-1)/x}),
+# wrong in my opinion
+# (x/scale*LogDeriv(x/scale) - 1)/scale = (log(x/scale)/sdlog^2 + 1 - 1)/scale
+#                                       = log(x/scale)/sdlog^2/scale
+#                                       = (log(x) - meanlog)/sdlog/(sdlog*scale)
+# now x ~ Lnorm(meanlog, sdlog)
+# => log(x) ~ Norm(meanlog, sdlog^2)
+# => (log(x) - meanlog)/sdlog ~ Norm(0, 1)
+                  L2derivDistr.0 = Norm(mean=0, sd=1/sdlog/exp(meanlog)),
+                  FisherInfo.0 = matrix(1/exp(2*meanlog)/sdlog^2,
+                                        dimnames = list("scale","scale")), 
                   distrSymm = NoSymmetry(), 
                   L2derivSymm = FunSymmList(NonSymmetric()), 
                   L2derivDistrSymm = DistrSymmList(SphericalSymmetry(SymmCenter = 0)),



More information about the Distr-commits mailing list