dear all, assume you type: covOGK(x,sigmamu=s_Qn,beta=h) you get: Error in Qn(x, ...) : unused argument(s) (beta = 0.552325581395349) i wanted to set the \beta in OGK to a different value-- Is it normal? Best, -- View this message in context: http://r.789695.n4.nabble.com/Little-problem-with-robustbase-covOKG-tp3752169p3752169.html Sent from the R help mailing list archive at Nabble.com.
R. Michael Weylandt <michael.weylandt@gmail.com>
2011-Aug-18 11:22 UTC
[R] Little problem with robustbase::covOKG() [?]
I have no idea what covOGK is or does, but quickly skimming the code, one can see there is no beta parameter anywhere in it. (In fact, only two lines have a "b" at all; both in substitute().) The error message should have made this clear to you. Try args(covOGK) to see what parameters you are allowed to change. Maybe one of them is equivalent to beta after some transformation. Hope this helps, Michael Weylandt On Aug 18, 2011, at 5:34 AM, kv <kaveh.vakili at ulb.ac.be> wrote:> dear all, > > assume you type: > > covOGK(x,sigmamu=s_Qn,beta=h) > > you get: > Error in Qn(x, ...) : unused argument(s) (beta = 0.552325581395349) > > i wanted to set the \beta in OGK to a different value-- > > Is it normal? > > Best, > > -- > View this message in context: http://r.789695.n4.nabble.com/Little-problem-with-robustbase-covOKG-tp3752169p3752169.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
R. Michael Weylandt <michael.weylandt at gmail.com> Reply | Threaded | More Dear Michael, please explore:>?covOGKyields covOGK(X, n.iter = 2, sigmamu, rcov = covGK, weight.fn = hard.rejection, keep.data = FALSE, ...) and>hard.rejectionfunction (distances, p, beta = 0.9, ...) { d0 <- median(distances) * qchisq(beta, p)/qchisq(0.5, p) wts <- double(length(distances)) wts[distances <= d0] <- 1 wts } But you would know if you knew OGK, so thanks for the try anyway ;) -- View this message in context: http://r.789695.n4.nabble.com/Little-problem-with-robustbase-covOKG-tp3752169p3753579.html Sent from the R help mailing list archive at Nabble.com.
Please do read the posting guide and quote the original message and all others you are referring to. On 18.08.2011 22:28, kv wrote:> R. Michael Weylandt<michael.weylandt at gmail.com> Reply | Threaded | > More > > > Dear Michael, > > please explore: > >> ?covOGK > > yields > > > covOGK(X, n.iter = 2, sigmamu, rcov = covGK, weight.fn = hard.rejection, > keep.data = FALSE, ...) > > and > >> hard.rejection > function (distances, p, beta = 0.9, ...) > { > d0<- median(distances) * qchisq(beta, p)/qchisq(0.5, p) > wts<- double(length(distances)) > wts[distances<= d0]<- 1 > wts > }But since you know that: myhardreject <- function(distances, p, beta = 42, ...) hard.rejection(distances, p, beta = beta, ...) covOGK(......, weight.fn = myhardreject) Uwe Ligges> > But you would know if you knew OGK, so thanks for the try anyway ;) > > -- > View this message in context: http://r.789695.n4.nabble.com/Little-problem-with-robustbase-covOKG-tp3752169p3753579.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.