Re: [R] efpFunctional construction (strucchange package)
Unfortunately, I couldn't find neither this source file, nor function wmax(). Was it any old version of strucchange? There are only files strucchange.R, strucchange.rdb and strucchange.rdx in directory \strucchange\R. Best, Julia -- View this message in context: http://r.789695.n4.nabble.com/efpFunctional-construction-strucchange-package-tp4023903p4035497.html Sent from the R help mailing list archive at Nabble.com. __ R-help@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] efpFunctional construction (strucchange package)
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). How can I write a functional supLM(from=..., to=...)? 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@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.
Re: [R] nproc parameter in efpFunctional
Thank you very much, it works now! Best regards, J -- View this message in context: http://r.789695.n4.nabble.com/nproc-parameter-in-efpFunctional-tp3972419p3998747.html Sent from the R help mailing list archive at Nabble.com. __ R-help@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.
Re: [R] nproc parameter in efpFunctional
The 2006 CSDA paper is really very informative, perhaps, I'm trying to understand the things lying beyond. If we have e.g. k=3, then taking nproc=3 for the functional maxBB we get a critical value (boundary) maxBB$computeCritval(0.05,nproc=3) [1] 1.544421, and this for nproc=NULL (Bonferroni approximation) will be maxBB$computeCritval(0.05) [1] 1.358099. Aggregating 3 Brownian bridges first over components, we obtain time series process. Now, we wonder if maximum value of the process (aggregation over time) lies over boundary. Which boundary - 1.544421 or 1.358099 - should one take? They look too different and, for instance, lead to unfair computing of empirical size (as rejection rate of null hypothesis) or empirical power (as acception rate of alternative). -- View this message in context: http://r.789695.n4.nabble.com/nproc-parameter-in-efpFunctional-tp3972419p3989598.html Sent from the R help mailing list archive at Nabble.com. __ R-help@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.
Re: [R] nproc parameter in efpFunctional
Thank you. I've understood, that it should be k (number of parameters) separate Brownian bridges. Is it possible, to get such separated/disaggregated processes also in function efp()? (one can take gefp(..., family=gaussian), or construct by myself residuals(lm.model)*X, but still interesting). And on the contrary, how can I get an aggregated Brownian bridge path for all parameters together, similar to efp()$process? It is made in plot.gefp, but only for graphical visualization... Thank you in advance! Julia -- View this message in context: http://r.789695.n4.nabble.com/nproc-parameter-in-efpFunctional-tp3972419p3984605.html Sent from the R help mailing list archive at Nabble.com. __ R-help@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] nproc parameter in efpFunctional
Hello all, could anyone explain the exact meaning of parameter nproc? Why different values of nproc give so different critical values, i.e. meanL2BB$computeCritval(0.05,nproc=3) [1] 0.9984853 meanL2BB$computeCritval(0.05,nproc=1) [1] 0.4594827 The strucchange-package description gives integer specifying for which number of processes Brownian motions should be simulated - do I need nproc-dimensional Brownian bridge? Thank you in advance! Julia -- View this message in context: http://r.789695.n4.nabble.com/nproc-parameter-in-efpFunctional-tp3972419p3972419.html Sent from the R help mailing list archive at Nabble.com. __ R-help@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.
Re: [R] gefp() boundaries?
Well, I am still confused... shouldn't the made-by-hands-process (correctly constructed, of course) and the gefp()-process be similar? For the case of efp()-process it has been worked, at least... Besides, I'd like to know: 1) if I have the gefp()-process (scaled to unit interval [0;1]), can I get the unscaled one for the interval [0;n]? 2) is it possible to define a type of the score process like this was in efp()? I could find that neither in ?gefp, nor in CSDA-paper-2006. The example was bad and incorrect, the another one: data(BostonHomicide) gprocess - gefp(homicides ~ ahomicides25, family = poisson, data = BostonHomicide); my.model - glm(homicides ~ ahomicides25, family = poisson, data = BostonHomicide); J - vcov(my.model); J.sqrinv - solve(sqrtm(J))/n; my.psi - estfun(my.model); my.process - apply(as.matrix(my.psi), 2, cumsum)%*%t(J.sqrinv)/sqrt(n); Regards, Julia -- View this message in context: http://r.789695.n4.nabble.com/gefp-boundaries-tp3872529p3882197.html Sent from the R help mailing list archive at Nabble.com. __ R-help@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.
Re: [R] gefp() boundaries?
Thank you very much for the answer. If I take Poisson model and follow Generalized M-fluctuation tests for parameter instability, A. Zeileis and K. Hornik, Statistica Neerlandica (2007) Vol. 61, N. 4, p. 500-501 (section 4.3): data(Boston) n - 506; my.X - as.matrix(cbind(1, Boston[crim], Boston[age])); my.model - glm(tax ~ crim + age, family = poisson, data = Boston); my.psi - estfun(my.model); my.mu - fitted(my.model); J - sum(my.mu*my.X%*%t(my.X))/n; my.process - apply(as.matrix(my.psi), 2, cumsum)/sqrt(J*n); gprocess - gefp(tax ~ crim + age, family = poisson, data=Boston); then my.process and gprocess$process have to be the same? Best regards, Julia -- View this message in context: http://r.789695.n4.nabble.com/gefp-boundaries-tp3872529p3878886.html Sent from the R help mailing list archive at Nabble.com. __ R-help@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] gefp() boundaries?
Hello all, I have the following two questions: 1) how can I get the values of boundaries for fluctuation process gefp(), for functionals maxBB, meanL2BB, etc? 2) how can I get fragments of gefp()-process, e.g., if I have n=200 observations, i=1,2,...,200, and need gefp()[50:100], i.e. from i=50 till i=100? Thank you in advance, Julia -- View this message in context: http://r.789695.n4.nabble.com/gefp-boundaries-tp3872529p3872529.html Sent from the R help mailing list archive at Nabble.com. __ R-help@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] One-sided CUSUM / MOSUM Tests?
Dear R-help list members, I have the following question concerning the strucchange()-package: is it possible to get the boundaries for one-sided (upper / lower) CUSUM and MOSUM tests? Thank you in advance. Julia __ R-help@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.