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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Oct 24 11:21:29 CEST 2008


Author: stamats
Date: 2008-10-24 11:21:29 +0200 (Fri, 24 Oct 2008)
New Revision: 316

Modified:
   pkg/distrMod/R/SimpleL2ParamFamilies.R
   pkg/distrMod/R/modifyModel.R
Log:
some modifications such that LnormScaleFamily works properly ...

Modified: pkg/distrMod/R/SimpleL2ParamFamilies.R
===================================================================
--- pkg/distrMod/R/SimpleL2ParamFamilies.R	2008-10-24 08:26:52 UTC (rev 315)
+++ pkg/distrMod/R/SimpleL2ParamFamilies.R	2008-10-24 09:21:29 UTC (rev 316)
@@ -379,7 +379,7 @@
                   L2derivDistrSymm = DistrSymmList(SphericalSymmetry(SymmCenter = 0)),
                   trafo = trafo, .returnClsName = "LnormScaleFamily")
     f.call <- substitute(LnormScaleFamily(meanlog = m, sdlog = s,
-                          trafo = matrix(Tr, dimnames = list("meanlog","meanlog"))),
+                          trafo = matrix(Tr, dimnames = list("scale","scale"))),
                          list(m = meanlog, s = sdlog, Tr = trafo))
     res at fam.call <- f.call
     return(res)

Modified: pkg/distrMod/R/modifyModel.R
===================================================================
--- pkg/distrMod/R/modifyModel.R	2008-10-24 08:26:52 UTC (rev 315)
+++ pkg/distrMod/R/modifyModel.R	2008-10-24 09:21:29 UTC (rev 316)
@@ -112,18 +112,23 @@
              scale <- main(M at param)
              M at distrSymm <- SphericalSymmetry(SymmCenter = loc)
              M at L2derivSymm <- FunSymmList(EvenSymmetric(SymmCenter = loc))
+             L2derivDistr.0 <- L2derivDistr(model)[[1]]*main(param(model))/scale
+             M at L2derivDistr <- UnivarDistrList(L2derivDistr.0)
+             M at L2derivDistrSymm <- L2derivDistrSymm(model)
 
              fn <- paste(cl[1])
              loc.name <- locscalename(model)["loc"]
              scale.name <- locscalename(model)["scale"]
              cl.l <- length(cl)
              cl.n <- names(cl)
-             if(loc.name %in% cl.n){
-                cl[loc.name] <- loc
-             }else{
-                cl.l <- cl.l +1
-                cl[[cl.l]] <- loc
-                names(cl)[cl.l] <- loc.name
+             if(loc.name != ""){
+                if(loc.name %in% cl.n){
+                    cl[loc.name] <- loc
+                }else{
+                    cl.l <- cl.l +1
+                    cl[[cl.l]] <- loc
+                    names(cl)[cl.l] <- loc.name
+                }
              }
              if(scale.name %in% cl.n){
                 cl[scale.name] <- scale
@@ -216,4 +221,3 @@
              M at LogDeriv <- LogDeriv(model)
              return(M)
           })
-



More information about the Distr-commits mailing list