[Robast-commits] r319 - branches/robast-0.7/pkg/ROptEst/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Jul 2 15:43:50 CEST 2009
Author: stamats
Date: 2009-07-02 15:43:49 +0200 (Thu, 02 Jul 2009)
New Revision: 319
Modified:
branches/robast-0.7/pkg/ROptEst/R/getInfRobIC_asCov.R
Log:
definition of weight was missing ...
Modified: branches/robast-0.7/pkg/ROptEst/R/getInfRobIC_asCov.R
===================================================================
--- branches/robast-0.7/pkg/ROptEst/R/getInfRobIC_asCov.R 2009-07-02 12:30:09 UTC (rev 318)
+++ branches/robast-0.7/pkg/ROptEst/R/getInfRobIC_asCov.R 2009-07-02 13:43:49 UTC (rev 319)
@@ -20,8 +20,14 @@
asMSE = list(value = asCov + r^2*b^2,
r = r,
at = neighbor))
+ w <- new("HampelWeight")
+ clip(w) <- b
+ cent(w) <- 0
+ stand(w) <- A
+ weight(w) <- getweight(w, neighbor = neighbor, biastype = symmetricBias(),
+ normW = NormType())
- return(list(A = A, a = 0, b = b, d = NULL, risk = Risk, info = info))
+ return(list(A = A, a = 0, b = b, d = NULL, w = w, risk = Risk, info = info))
})
setMethod("getInfRobIC", signature(L2deriv = "UnivariateDistribution",
risk = "asCov",
@@ -30,6 +36,7 @@
info <- c("optimal IC in sense of Cramer-Rao bound")
A <- trafo %*% solve(Finfo)
b <- abs(as.vector(A))*(q(L2deriv)(1)-q(L2deriv)(0))
+ a <- -abs(as.vector(A))*q(L2deriv)(0)
asCov <- A %*% t(trafo)
r <- neighbor at radius
Risk <- list(asCov = asCov,
@@ -41,7 +48,13 @@
r = r,
at = neighbor))
- return(list(A = A, a = -b/2, b = b, d = NULL, risk = Risk, info = info))
+ w <- new("BdStWeight")
+ clip(w) <- c(0,b)+a
+ stand(w) <- A
+ weight(w) <- getweight(w, neighbor = neighbor, biastype = biastype,
+ normW = NormType())
+
+ return(list(A = A, a = -b/2, b = b, d = NULL, w = w, risk = Risk, info = info))
})
setMethod("getInfRobIC", signature(L2deriv = "RealRandVariable",
risk = "asCov",
@@ -75,5 +88,13 @@
asMSE = list(value = trAsCov + r^2*b^2,
r = r,
at = neighbor))
- return(list(A = A, a = numeric(nrow(trafo)), b = b, d = NULL, risk = Risk, info = info))
+ w <- new("HampelWeight")
+ clip(w) <- b
+ cent(w) <- 0
+ stand(w) <- A
+ weight(w) <- getweight(w, neighbor = neighbor, biastype = symmetricBias(),
+ normW = NormType())
+
+ return(list(A = A, a = numeric(nrow(trafo)), b = b, d = NULL, w = w, risk = Risk,
+ info = info))
})
More information about the Robast-commits
mailing list