[R] efpFunctional construction (strucchange package)
Achim Zeileis
Achim.Zeileis at uibk.ac.at
Thu Nov 10 19:39:04 CET 2011
On Thu, 10 Nov 2011, bonda wrote:
> Hello,
>
> to understand better how efpFunctional works, I'm trying to construct my own
> functionals. But concerning already existing functionals I have some
> questions. With maxBB it is clear:
>
> functional = list(comp = function(x) max(abs(x)), time = max),
>
> with rangeBB:
>
> functional = list(time = function(x) max(x)-min(x), comp = max),
>
> with meanL2BB, if I understood correctly:
>
> functional = list(comp = function(x) sum(x^2), time = mean).
Yes.
> How can I write a functional supLM(from=..., to=...)?
Simply look into the source code in strucchange/R/zzz.R. supLM() first
constructs a wmax() function that computes the weighted maximum including
the trimming and then has
functional = list(comp = function(x) sum(x^2), time = wmax)
Best,
Z
> Thank you in advance.
>
> Julia
>
> --
> View this message in context: http://r.789695.n4.nabble.com/efpFunctional-construction-strucchange-package-tp4023903p4023903.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.
>
More information about the R-help
mailing list