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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Nov 3 07:13:58 CET 2008


Author: stamats
Date: 2008-11-03 07:13:58 +0100 (Mon, 03 Nov 2008)
New Revision: 327

Modified:
   pkg/distrMod/R/modifyModel.R
Log:
minor correction, also first component of L2derivDistr has to be modified

Modified: pkg/distrMod/R/modifyModel.R
===================================================================
--- pkg/distrMod/R/modifyModel.R	2008-11-03 05:54:55 UTC (rev 326)
+++ pkg/distrMod/R/modifyModel.R	2008-11-03 06:13:58 UTC (rev 327)
@@ -154,15 +154,18 @@
              if(!length(nuisance(param))){
                 loc <- main(param)[1]
                 scale <- main(param)[2]
+                L2derivDistr1 <- L2derivDistr(model)[[1]]*main(param(model))[2]/scale
                 L2derivDistr2 <- L2derivDistr(model)[[2]]*main(param(model))[2]/scale
              }else{
                 if(names(nuisance(param)) == "loc"){
                     loc <- nuisance(param)
                     scale <- main(param)
+                    L2derivDistr1 <- L2derivDistr(model)[[1]]*main(param(model))/scale
                     L2derivDistr2 <- L2derivDistr(model)[[2]]*main(param(model))/scale
                 }else{
                     loc <- main(param)
                     scale <- nuisance(param)
+                    L2derivDistr1 <- L2derivDistr(model)[[1]]*nuisance(param(model))/scale
                     L2derivDistr2 <- L2derivDistr(model)[[2]]*nuisance(param(model))/scale
                 }
              }
@@ -172,7 +175,7 @@
              M at L2derivDistrSymm <- DistrSymmList(SphericalSymmetry(
                                                    SymmCenter = loc),
                                                  NoSymmetry())
-             M at L2derivDistr[[1]] <- L2derivDistr(model)[[1]]
+             M at L2derivDistr[[1]] <- L2derivDistr1
              M at L2derivDistr[[2]] <- L2derivDistr2
              fn <- paste(cl[1])
              loc.name <- locscalename(model)["loc"]



More information about the Distr-commits mailing list