[Robast-commits] r534 - in branches/robast-0.9/pkg: ROptEst ROptEst/R ROptEst/man RobAStBase/R RobAStBase/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jan 15 01:45:04 CET 2013


Author: ruckdeschel
Date: 2013-01-15 01:45:04 +0100 (Tue, 15 Jan 2013)
New Revision: 534

Added:
   branches/robast-0.9/pkg/ROptEst/R/getRiskBV.R
   branches/robast-0.9/pkg/ROptEst/man/getRiskFctBV-methods.Rd
Modified:
   branches/robast-0.9/pkg/ROptEst/NAMESPACE
   branches/robast-0.9/pkg/RobAStBase/R/getRiskBV.R
   branches/robast-0.9/pkg/RobAStBase/man/getRiskFctBV-methods.Rd
Log:
moved asL1, asL4 risk methods from RobAStBase to ROptEst

Modified: branches/robast-0.9/pkg/ROptEst/NAMESPACE
===================================================================
--- branches/robast-0.9/pkg/ROptEst/NAMESPACE	2013-01-15 00:31:10 UTC (rev 533)
+++ branches/robast-0.9/pkg/ROptEst/NAMESPACE	2013-01-15 00:45:04 UTC (rev 534)
@@ -28,7 +28,7 @@
               "getModifyIC")
 exportMethods("updateNorm", "scaleUpdateIC", "eff", 
               "get.asGRisk.fct", "getStartIC", "plot",
-			  "comparePlot")
+			  "comparePlot", "getRiskFctBV")
 export("getL2normL2deriv",
        "asAnscombe", "asL1", "asL4", 
 	   "getReq", "getMaxIneff")

Added: branches/robast-0.9/pkg/ROptEst/R/getRiskBV.R
===================================================================
--- branches/robast-0.9/pkg/ROptEst/R/getRiskBV.R	                        (rev 0)
+++ branches/robast-0.9/pkg/ROptEst/R/getRiskBV.R	2013-01-15 00:45:04 UTC (rev 534)
@@ -0,0 +1,10 @@
+
+setMethod("getRiskFctBV", signature(risk = "asL4", biastype = "ANY"),
+    function(risk) function(bias, var) bias^4+3*var^2+6*var*bias^2)
+
+setMethod("getRiskFctBV", signature(risk = "asL1", biastype = "ANY"),
+    function(risk) function(bias, var){
+    v <- var^.5
+    b <- bias
+    w <- b/v
+    2*v*dnorm(w)+(2*pnorm(w)-1)*b})

Added: branches/robast-0.9/pkg/ROptEst/man/getRiskFctBV-methods.Rd
===================================================================
--- branches/robast-0.9/pkg/ROptEst/man/getRiskFctBV-methods.Rd	                        (rev 0)
+++ branches/robast-0.9/pkg/ROptEst/man/getRiskFctBV-methods.Rd	2013-01-15 00:45:04 UTC (rev 534)
@@ -0,0 +1,29 @@
+\name{getRiskFctBV-methods}
+\docType{methods}
+\alias{getRiskFctBV}
+\alias{getRiskFctBV-methods}
+\alias{getRiskFctBV,asL1,ANY-method}
+\alias{getRiskFctBV,asL4,ANY-method}
+\title{Methods for Function getRiskFctBV  in Package `ROptEst'}
+\description{getRiskFctBV for a given object of S4 class \code{asGRisk}
+       returns a function in bias and variance to compute the asymptotic
+       risk.}
+
+\section{Methods}{\describe{
+\item{getRiskFctBV}{\code{signature(risk = "asL1", biastype = "ANY")}:
+  returns a function with arguments \code{bias} and \code{variance}
+  to compute the asymptotic absolute (L1) error for a given ALE at a situation
+  where it has bias \code{bias} (including the radius!) and variance \code{variance}. }
+\item{getRiskFctBV}{\code{signature(risk = "asL4", biastype = "ANY")}:
+  returns a function with arguments \code{bias} and \code{variance}
+  to compute the asymptotic L4 error for a given ALE at a situation where
+  it has bias \code{bias} (including the radius!) and variance \code{variance}. }
+}}
+\examples{
+myrisk <- asMSE()
+getRiskFctBV(myrisk)
+}
+\concept{risk}
+\keyword{classes}
+
+

Modified: branches/robast-0.9/pkg/RobAStBase/R/getRiskBV.R
===================================================================
--- branches/robast-0.9/pkg/RobAStBase/R/getRiskBV.R	2013-01-15 00:31:10 UTC (rev 533)
+++ branches/robast-0.9/pkg/RobAStBase/R/getRiskBV.R	2013-01-15 00:45:04 UTC (rev 534)
@@ -22,12 +22,3 @@
             w <- b/v
             return((v^2+b^2)*(nu1*pnorm(w)+nu2*pnorm(-w))+(nu2-nu1)*b*v*dnorm(w))}})
 
-setMethod("getRiskFctBV", signature(risk = "asL4", biastype = "ANY"),
-    function(risk) function(bias, var) bias^4+3*var^2+6*var*bias^2)
-
-setMethod("getRiskFctBV", signature(risk = "asL1", biastype = "ANY"),
-    function(risk) function(bias, var){
-    v <- var^.5
-    b <- bias
-    w <- b/v
-    2*v*dnorm(w)+(2*pnorm(w)-1)*b})

Modified: branches/robast-0.9/pkg/RobAStBase/man/getRiskFctBV-methods.Rd
===================================================================
--- branches/robast-0.9/pkg/RobAStBase/man/getRiskFctBV-methods.Rd	2013-01-15 00:31:10 UTC (rev 533)
+++ branches/robast-0.9/pkg/RobAStBase/man/getRiskFctBV-methods.Rd	2013-01-15 00:45:04 UTC (rev 534)
@@ -6,8 +6,6 @@
 \alias{getRiskFctBV,asMSE,ANY-method}
 \alias{getRiskFctBV,asSemivar,onesidedBias-method}
 \alias{getRiskFctBV,asSemivar,asymmetricBias-method}
-\alias{getRiskFctBV,asL1,ANY-method}
-\alias{getRiskFctBV,asL4,ANY-method}
 \title{Methods for Function getRiskFctBV  in Package `RobAStBase'}
 \description{getRiskFctBV for a given object of S4 class \code{asGRisk}
        returns a function in bias and variance to compute the asymptotic
@@ -33,14 +31,6 @@
   \eqn{E[\nu_1 (S_n-\theta)_+^2+\nu_2(S_n-\theta)_-^2]}{nu1*max(Sn-theta,0)^2+nu2*max(theta-Sn,0)^2]}
   for a given ALE \eqn{S_n}{Sn} at a situation where it has one-sided bias
   \code{bias} (including the radius!) and variance \code{variance}. }
-\item{getRiskFctBV}{\code{signature(risk = "asL1", biastype = "ANY")}:
-  returns a function with arguments \code{bias} and \code{variance}
-  to compute the asymptotic absolute (L1) error for a given ALE at a situation
-  where it has bias \code{bias} (including the radius!) and variance \code{variance}. }
-\item{getRiskFctBV}{\code{signature(risk = "asL4", biastype = "ANY")}:
-  returns a function with arguments \code{bias} and \code{variance}
-  to compute the asymptotic L4 error for a given ALE at a situation where
-  it has bias \code{bias} (including the radius!) and variance \code{variance}. }
 }}
 \examples{
 myrisk <- asMSE()



More information about the Robast-commits mailing list