[Robast-commits] r622 - in branches/robast-0.9/pkg/RobExtremes: . R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Mar 6 16:34:42 CET 2013


Author: ruckdeschel
Date: 2013-03-06 16:34:42 +0100 (Wed, 06 Mar 2013)
New Revision: 622

Modified:
   branches/robast-0.9/pkg/RobExtremes/DESCRIPTION
   branches/robast-0.9/pkg/RobExtremes/R/GEVFamily.R
   branches/robast-0.9/pkg/RobExtremes/R/GParetoFamily.R
   branches/robast-0.9/pkg/RobExtremes/R/WeibullFamily.R
   branches/robast-0.9/pkg/RobExtremes/R/getStartIC.R
   branches/robast-0.9/pkg/RobExtremes/R/internal-getpsi.R
   branches/robast-0.9/pkg/RobExtremes/man/internal-interpolate.Rd
Log:
RobExtremes: scaleshapename in Weibull, GPareto, GEV erh?\195?\164lt benamte Eintr?\195?\164ge
.getPsi und getStartIC f?\195?\188r interpolRisk verwenden nun ParamFamParameter Klasse

Modified: branches/robast-0.9/pkg/RobExtremes/DESCRIPTION
===================================================================
--- branches/robast-0.9/pkg/RobExtremes/DESCRIPTION	2013-02-26 11:43:41 UTC (rev 621)
+++ branches/robast-0.9/pkg/RobExtremes/DESCRIPTION	2013-03-06 15:34:42 UTC (rev 622)
@@ -9,6 +9,7 @@
          distrMod(>= 2.5), RobAStBase(>= 0.9), ROptEst(>= 0.9), robustbase(>= 0.8-0),
 		 evd, actuar
 Imports: RobAStRDA
+Suggests: RUnit
 Author: Peter Ruckdeschel, Matthias Kohl, Nataliya Horbenko
 Maintainer: Peter Ruckdeschel <peter.ruckdeschel at itwm.fraunhofer.de>
 LazyLoad: yes

Modified: branches/robast-0.9/pkg/RobExtremes/R/GEVFamily.R
===================================================================
--- branches/robast-0.9/pkg/RobExtremes/R/GEVFamily.R	2013-02-26 11:43:41 UTC (rev 621)
+++ branches/robast-0.9/pkg/RobExtremes/R/GEVFamily.R	2013-03-06 15:34:42 UTC (rev 622)
@@ -147,7 +147,7 @@
 
     ## parameters
     names(theta) <- c("loc", "scale", "shape")
-    scaleshapename <- c("scale", "shape")
+    scaleshapename <- c("scale"="scale", "shape"="shape")
 
 
     btq <- bDq <- btes <- bDes <- btel <- bDel <- NULL

Modified: branches/robast-0.9/pkg/RobExtremes/R/GParetoFamily.R
===================================================================
--- branches/robast-0.9/pkg/RobExtremes/R/GParetoFamily.R	2013-02-26 11:43:41 UTC (rev 621)
+++ branches/robast-0.9/pkg/RobExtremes/R/GParetoFamily.R	2013-03-06 15:34:42 UTC (rev 622)
@@ -50,7 +50,7 @@
 
     ## parameters
     names(theta) <- c("loc", "scale", "shape")
-    scaleshapename <- c("scale", "shape")
+    scaleshapename <- c("scale"="scale", "shape"="shape")
 
     btq <- bDq <- btes <- bDes <- btel <- bDel <- NULL
     if(!is.null(p)){

Modified: branches/robast-0.9/pkg/RobExtremes/R/WeibullFamily.R
===================================================================
--- branches/robast-0.9/pkg/RobExtremes/R/WeibullFamily.R	2013-02-26 11:43:41 UTC (rev 621)
+++ branches/robast-0.9/pkg/RobExtremes/R/WeibullFamily.R	2013-03-06 15:34:42 UTC (rev 622)
@@ -49,7 +49,7 @@
 
     ## parameters
     names(theta) <- c("scale", "shape")
-    scaleshapename <- c("scale", "shape")
+    scaleshapename <- c("scale"="scale", "shape"="shape")
 
     btq <- bDq <- btes <- bDes <- btel <- bDel <- NULL
     if(!is.null(p)){

Modified: branches/robast-0.9/pkg/RobExtremes/R/getStartIC.R
===================================================================
--- branches/robast-0.9/pkg/RobExtremes/R/getStartIC.R	2013-02-26 11:43:41 UTC (rev 621)
+++ branches/robast-0.9/pkg/RobExtremes/R/getStartIC.R	2013-03-06 15:34:42 UTC (rev 622)
@@ -5,8 +5,9 @@
 
     gridn <- type(risk)
     nam <- name(model)
-    xi <- main(param(model))["shape"] #[scaleshapename(model)["shape"]]
-    beta <- main(param(model))["scale"] #[scaleshapename(model)["scale"]]
+    param1 <- param(model)
+#    xi <- main(param(model))["shape"] #[scaleshapename(model)["shape"]]
+#    beta <- main(param(model))["scale"] #[scaleshapename(model)["scale"]]
     nsng <- character(0)
     sng <- try(getFromNamespace(.versionSuff(gridn), ns = "RobAStRDA"),
                                  silent=TRUE)
@@ -16,10 +17,10 @@
           interpolfct <- sng[[nam]]$fct
           .modifyIC <- function(L2Fam, IC){
                    para <- param(L2Fam)
-                   xi0 <- main(para)["shape"]#[scaleshapename(L2Fam)["scale"]]
-                   beta0 <- main(para)["scale"]#[scaleshapename(L2Fam)["scale"]]
-                   .getPsi(xi0,beta0, interpolfct, L2Fam, type(risk))}
-          IC0 <- .getPsi(xi, beta, interpolfct, model, type(risk))
+                   #xi0 <- main(para)["shape"]#[scaleshapename(L2Fam)["scale"]]
+                   #beta0 <- main(para)["scale"]#[scaleshapename(L2Fam)["scale"]]
+                   .getPsi(para, interpolfct, L2Fam, type(risk))}
+          IC0 <- .getPsi(param1, interpolfct, model, type(risk))
           IC0 at modifyIC <- .modifyIC
           return(IC0)
        }

Modified: branches/robast-0.9/pkg/RobExtremes/R/internal-getpsi.R
===================================================================
--- branches/robast-0.9/pkg/RobExtremes/R/internal-getpsi.R	2013-02-26 11:43:41 UTC (rev 621)
+++ branches/robast-0.9/pkg/RobExtremes/R/internal-getpsi.R	2013-03-06 15:34:42 UTC (rev 622)
@@ -1,6 +1,17 @@
-.getPsi <- function(xi, beta, fct, L2Fam , type){
+.getPsi <- function(param, fct, L2Fam , type){
 
-   L2deriv <- L2Fam at L2deriv
+   scshnm <- scaleshapename(L2Fam)
+   shnam <- scshnm["shape"]
+   scnam <- scshnm["scale"]
+   xi <- main(param)[shnam] #[["shape"]]
+   beta <- main(param)[scnam] #[scaleshapename(model)["scale"]]
+
+   #print(param)
+   #L2deriv <- L2Fam at L2deriv # .fct(param)
+   #print(get("tr",environment(get("Lambda1", environment(L2deriv[[1]]@Map[[1]])))))
+   #print(get("k",environment(get("Lambda1", environment(L2deriv[[1]]@Map[[1]])))))
+   #print(get("sc",environment(get("Lambda1", environment(L2deriv[[1]]@Map[[1]])))))
+
    .dbeta <- diag(c(beta,1))
    b <- fct[[1]](xi)
    a <-  c(.dbeta%*%c(fct[[2]](xi),fct[[3]](xi)))

Modified: branches/robast-0.9/pkg/RobExtremes/man/internal-interpolate.Rd
===================================================================
--- branches/robast-0.9/pkg/RobExtremes/man/internal-interpolate.Rd	2013-02-26 11:43:41 UTC (rev 621)
+++ branches/robast-0.9/pkg/RobExtremes/man/internal-interpolate.Rd	2013-03-06 15:34:42 UTC (rev 622)
@@ -18,7 +18,7 @@
 respective \file{sysdata.rda} file. }
 
 \usage{
-.getPsi(xi, beta, fct, L2Fam , type)
+.getPsi(param, fct, L2Fam , type)
 
 .modify.xi.PFam.call(xi, PFam)
 
@@ -41,6 +41,7 @@
 }
 
 \arguments{
+  \item{param}{object of class \code{"ParamFamParameter"}. }
   \item{xi}{numeric of length 1; shape value. }
   \item{PFam}{an object of class \code{"ParamFamily"}, the parametric family
               at which to evaluate the Lagrange multipliers or LDEstimators;



More information about the Robast-commits mailing list