search for: huber

Displaying 20 results from an estimated 186 matches for "huber".

Did you mean: hubert
2011 Feb 03
1
"hubers" function in R MASS library : problem and solution
Hello: I found the "hubers" function in MASS library is NOT working on the following data: > a <- >c(7.19,7.19,7.19,9.41,6.79,9.41,7.19,9.41,1.64,7.19,7.19,7.19,7.19,1.422,7.19,6.79,7.19,6.79,7.19,7.19,4.44,6.55,6.79,7.19,9.41,9.41,7.19,7.19,7.19,7.19,1.64,1.597,1.64,7.19,1.422,7.19,6.79,9.38,7.19,1.64,7.19...
2005 Dec 22
1
Huber location estimate
We have a choice when calculating the Huber location estimate: > set.seed(221205) > y <- 7 + 3*rt(30,1) > library(MASS) > huber(y)$mu [1] 5.9117 > coefficients(rlm(y~1)) (Intercept) 5.9204 I was surprised to get two different results. The function huber() works directly with the definition whereas rlm() uses...
2008 Nov 19
1
How to get robust M-estimator of multivariate scatter using Huber's psi?
How to get robust M-estimators of multivariate scatter using Huber's psi? Which package/function should I look into? Ideally, I hope I can self-define thresholds of Huber's psi function. Thanks a lot!!! -- View this message in context: http://www.nabble.com/How-to-get-robust-M-estimator-of-multivariate-scatter-using-Huber%27s-psi--tp20585755p20585755.htm...
2007 Jan 19
1
Suggestion on how to improve efficiency when using MASS:::hubers on high-dimensional arrays
Hi Everyone, Given the scenario I have, I was wondering if anyone would be able to give me a hind on how to get the results from hubers() in a more efficient way. I have an outcome on an array [N x S x D]. I also have a factor (levels 1,2,3) stored on a matrix N x S. My objective is to get "mu" and "sigma" for each of the N rows (outcome) stratified by the factor (levels 1, 2 and 3) for each of the D &...
2018 Apr 06
1
Fast tau-estimator line does not appear on the plot
...,25,13,17,25,14,13,19,25,16,16,20,21,25,19,12,11,9,28,21,10,2,8) {reg1<-lm(Y ~ X) plot(X,Y) abline(reg1, col="black") install.packages("robustbase") library?(robustbase) reg=lmrob(Y ~ X) abline(reg, col="green") install.packages("MASS")? library(MASS) Huber=rlm(Y ~ X) abline(Huber,col="red") Tukey=rlm(Y ~ X,psi=psi.bisquare) abline(Tukey,col="purple") install.packages("quantreg") library(quantreg) L1=rq(Y ~ X,tau=0.5) abline(L1,col="blue") install.packages("RobPer") library(RobPer) FastTau(Y,X) fast...
2018 Apr 07
0
Fast tau-estimator line does not appear on the plot
...,5,6,9,4,5,34,2,1,3,12,8,9,7,4,12,19,21) Y <- c(25,24,23,19,17,14,13,14,25,13,17,25,14,13,19,25,16,16,20,21,25,19,12,11,9,28,21,10,2,8) reg1 <- lm( Y ~ X ) plot( X, Y ) abline( reg1, col = "black" ) reg <- lmrob( Y ~ X ) abline( reg, col = "green" ) Huber <- rlm( Y ~ X ) abline( Huber, col="red" ) Tukey <- rlm( Y ~ X, psi = psi.bisquare ) abline( Tukey, col = "purple" ) L1 <- rq( Y ~ X, tau = 0.5 ) abline( L1, col = "blue" ) fast <- FastTau(model.matrix(~X),Y) fast # save result, then...
2018 Sep 20
3
A different error in sample()
Good day, The use of "rounding" also doesn't make sense. If The number is halfway between two integers, it is rounded to the nearest even integer. > round(2.5) [1] 2 -------------------------------------- Dario Strbenac University of Sydney Camperdown NSW 2050 Australia
2010 Jan 16
1
"Too many raster images" in devPS.c
...39; in various types of plots. Besides the not so helpful option of patching that macro in my private copy of R, is there an intention to extend this functionality to accommodate for larger plots more generally? [1] http://developer.r-project.org/Raster/raster-RFC.html [2] http://www.ebi.ac.uk/~huber/pub/Druggable_ratio_1_before.pdf Thank you and best wishes, Wolfgang -- Wolfgang Huber EMBL http://www.embl.de/research/units/genome_biology/huber/contact
2018 Sep 20
2
A different error in sample()
FWIW, I suspect this is related to the function R_unif_index that was introduced in src/main/RNG.c around revision 72356, or the way this function is used in do_sample in src/main/random.c. 20.9.18 08:19, Wolfgang Huber scripsit: > Besides wording of the documentation re truncating vs rounding, there is > something peculiar going on with the fractional part of n: > > > table(sample.int(2.5, 1e6, replace = TRUE)) > > ???? 1????? 2????? 3 > 399051 401035 199914 > > > table(sam...
2009 Mar 03
2
latex output of regressions with standardized regression coefficients and t-statistics based on Huber-White
...: I'm new to R and have only used SPSS befor this (which can't do this at all...). I'm trying to output some regression results to latex. The regressions are normal OLS and I'm trying to output the results with standardized regression coefficients and t-statistics based on "Huber-White sandwich estimator for variance". The final result should be one big table for several regressions with this data (and N, R^2). I found the mtable package, which does what I need for lm(...) regressions, lm.beta to output standardized coefficients and package "sandwich" to...
2008 Apr 10
4
Huber-white cluster s.e. after optim?
I've used optim to analyze some data I have with good results, but need to correct the var-cov matrix for possible effects of clustering of observations (respondents) in small groups (non-independence). Is there any function to adjust the matrix? I heard some time ago that the vcovHC function would have a cluster capability added to it, but I don't see that in my fairly recent version.
2010 Oct 13
2
Scripting SVG with R
...te graphics or make them interactive? I am aware of the excellent packages gridSVG and SVGAnnotation, which facilitate making R-generated SVG plots more interesting either at construction time or by postprocessing; the above question is about employing R at viewing time. Best wishes Wolfgang Huber EMBL http://www.embl.de/research/units/genome_biology/huber
2004 Nov 25
0
help with error message
...ror message "Error: subscript out of bounds" when the following code is run z.score<-function (group) { for (t in levels(group$Country)) { # this will give t countries y<-subset(group,factor(Country)==t) #particular analyte over all countries equal to y #calculate overall huber mean and sigma for a particular analyte over all countries ov.mu<-hubers(group$X)$mu ov.sigma<-hubers(group$X)$s #define arrays #p.mu<-array() #p.sigma<-array() #z.value<-array() #calculate huber mean and sigma for given analyte (defined by group) by selected c...
2004 Nov 25
0
help with error message - problem solved
...ror message "Error: subscript out of bounds" when the following code is run z.score<-function (group) { for (t in levels(group$Country)) { # this will give t countries y<-subset(group,factor(Country)==t) #particular analyte over all countries equal to y #calculate overall huber mean and sigma for a particular analyte over all countries ov.mu<-hubers(group$X)$mu ov.sigma<-hubers(group$X)$s #define arrays #p.mu<-array() #p.sigma<-array() #z.value<-array() #calculate huber mean and sigma for given analyte (defined by group) by selected c...
2009 Aug 12
1
psi not functioning in nlrob?
Hi all, I'm trying to fit a nonlinear regression by "nlrob": model3=nlrob(y~a1*x^a2,data=transient,psi=psi.bisquare, start=list(a1=0.02,a2=0.7),maxit=1000) However an error message keeps popping up saying that the function psi.bisquare doesn't exist. I also tried psi.huber, which is supposed to be the default for nlrob: model3=nlrob(y~a1*x^a2,data=transient,psi=psi.huber, start=list(a1=0.02,a2=0.7),maxit=1000) But I still got the same error message - psi.huber doesn't exist. Is the argument "psi" not available in nlrob? Any help will be appreciated....
2007 Mar 06
2
SVG and tooltips, hyperlinks
...hyperlinks, so I am helping myself by giving the objects funny unique colors and then postprocessing the .svg file. I wonder whether somebody has already implemented this in a more elegant way. Best wishes Wolfgang ------------------------------------------------------------------ Wolfgang Huber EBI/EMBL Cambridge UK http://www.ebi.ac.uk/huber
2012 Nov 22
1
help in M-estimator by R
...subset, na.action, method = c("M", "MM", "model.frame"), wt.method = c("inv.var", "case"), model = TRUE, x.ret = TRUE, y.ret = FALSE, contrasts = NULL) 2- rlm(x, y, weights, ..., w = rep(1, nrow(x)), init = "ls", psi = psi.huber, scale.est = c("MAD", "Huber", "proposal 2"), k2 = 1.345, method = c("M", "MM"), wt.method = c("inv.var", "case"), maxit = 20, acc = 1e-4, test.vec = "resid", lqs.control = NULL) psi.huber(u, k = 1.345, deri...
2008 Jul 11
1
Subsetting an array by a vector of dimensions
Hi Is it possible to subset an n-dimensional array by a vector of n dimensions? E.g. assume I have > x <- array(1:24, dim=2:4) > x[1,1,2] [1] 7 > dims <- c(1,1,2) I would like a function that I can supply x and dims as parameters to, and have it return 7. Also, I would like to do something like: > x[1,1,] [1] 1 7 13 19 > dims2<- c(1,1,NA) And have a function of x and
2018 Mar 31
0
Fast tau-estimator line does ot appear on the plot
...eg1<-lm(Z ~ Y) > plot(Y,Z) > abline(reg1, col="black") > > install.packages("robustbase") > library?(robustbase) > reg=lmrob(Z ~ Y, data = Dataset) > abline(reg, col="green") > > install.packages("MASS") > library(MASS) > Huber=rlm(Z ~ Y, data = Dataset) > abline(Huber,col="red") > > Tukey=rlm(Z ~ Y, data = Dataset,psi=psi.bisquare) > abline(Tukey,col="purple") > > install.packages("quantreg") > library(quantreg) > L1=rq(Z ~ Y, data = Dataset,tau=0.5) > abline(L...
2006 Jul 14
2
Export to LaTeX
Dear Everybody! I want to export data to LaTeX. As I want to employ the data as freely as possible I want to avoid the xtable-command and instead generate some List like \MyOwnPrettyCommand{Adam}{Auer}{17} \MyOwnPrettyCommand{Bertram}{Bauer}{14} \MyOwnPrettyCommand{Christoph}{Huber}{75} \MyOwnPrettyCommand{Damian}{Dorfer}{69} \MyOwnPrettyCommand{Emanuel}{Eder}{43} with \MyOwnPrittyCommand defined elsewhere. As a pitty, if I make up about such a table in r, lets call it "A", and use the commands sink("tabelle.tex") A sink("anderedatei") tabell...