search for: cusum

Displaying 20 results from an estimated 44 matches for "cusum".

Did you mean: csum
2014 Mar 10
3
Frecuencia absoluta acumulada por individuo y por año
Hola, Vaya, en el código que he enviado, cusum no se incrementaba.. Y has indicado que se introduce un año más, con el mismo ID que el anterior y con la misma cantidad acumulada. Pero si el siguiente año es del mismo ID, acumula el valor de la cantidad que hemos introducido en esa fila... Con el siguiente código se resuelve este error y además...
2011 Aug 01
1
ivreg and structural change
...time series. tax_ivreg <- ivreg(l_y ~ l_x2 + l_x1+ dl_y | lag(l_x2, -1)+lag(l_x2, -2)+ lag(l_x1, -1)+lag(l_x1, -2)+lag(l_y, -1)+lag(l_y, -2), data=tax1) summary(tax_ivreg) ## after estimating it, something weird happened with the several tests in package "strucchange". For example: cusum <- efp(l_y ~ l_x2 + l_x1+ dl_y | lag(l_x2, -1)+lag(l_x2, -2)+ lag(l_x1, -1)+lag(l_x1, -2)+lag(l_y, -1)+lag(l_y, -2), data=tax1, type="OLS-CUSUM") sctest(cusum) plot(cusum) coef(cusum, breaks=2) ## And: cusum <- efp(tax_ivreg, data=tax1, type="OLS-CUSUM") sctest(cusum) pl...
2014 Mar 12
3
Frecuencia absoluta acumulada por individuo y por año
...mucho con cada una de vuestras sugerencias. > > > > En particular, gracias a Carlos Ortega por el código con el segundo bucle. Está > curradísimo y me ha parecido muy buena la idea de separarlo en dos bucles. Lo he > aplicado a mis datos y obtengo: > > > > ID YEAR CUSUM > 1 100 2005 3 > 2 100 2006 3 > 3 100 2007 9 > 4 120 2006 7 > 5 120 2007 3 > > > > Que es casi lo que busco, pues lo que persigo obtener (diculpa Carlos porque me era > difícil explicar con palabras y de forma resumida el objetivo) es lo siguiente:...
2005 Jan 11
1
CUSUM SQUARED structural breaks approach?
Dear all, Does anyone know where there is R or S code for the CUSUM SQUARED structural breaks approach? (Brown, Durban and Evans, 1975 - used in Pesaran and Timmerman, 2002) The problem is that the breaks package only appears to offer the standard 'unsquared' CUSUM, even though it appears most think it is inferior to the squared version. It might appear...
2010 Mar 07
2
questions about "Cusum"
Dear friends: I have just read an article entitled " Monitoring of nosocomial invasive aspergillosis and early evidence of an outbreak using cumulative sum tests (CUSUM)", which is published in "Clinical Microbiology and Infection". We have great need to estimate the fluctuation of incidence of IFI in our hospital. But I don't know the details of the stastical method and don't know where can I get a "Cusum" package. Can you give m...
2008 Jan 25
1
Need Advice with C# Program to Create and Display Cusum Chart
I need to write a C# program to create and display Cusum chart from any of the packages, spc, qcc or strucchange. Issues: 1-The data resides in a MS SQL Database. The C# program will handle obtaining the data for the requisite types of samples. Assistance needed on: 1-How can I call the cusum capabilities of any of the above packages and pass the...
2001 Jan 24
1
CuSum & V-Mask
Good Afternoon, I am currently writing a program to perform a cusum with v-mask and since I am experiencing a few problems, was wondering if there is something similar in existance? Many thanks in advance, Gavin McCabe Gavin McCabe University of Strathclyde Department of Statistics & Modelling Science Livingstone Tower (Rm. L7.47) 26 Richmond Street GL...
2009 Oct 30
1
R strucchange question: recursive-based CUSUM
Hello R users: I'm trying now to apply the package strucchange to see whether there is a structural change in linear regression. I have noted the following problem that arises in my case with recursive-based CUSUM: generic function recresid() in efp() generates an error, since (probably) it cannot compute the inverse matrix of (X^(i-1)^T)*(X^(i-1)) at each step (i-1), because the matrix (X^(i-1)^T)*(X^(i-1)) does not have full rank for all i (X consists of dummy variables). Does any solution of this pr...
2004 Jul 26
1
qcc package & syndromic surveillance (multivar CUSUM?)
Dear R Community: I am working on a public health early warning system, and I see that the qcc package allows for CUSUM and other statistical quality tests but I am not sure if my project is a good match for qcc functions as written. Any advice you may have is very much appreciated. I have four years worth of daily counts of emergency room admissions for different conditions (e.g. respiratory, neurologic, etc) fro...
2014 Mar 10
4
Frecuencia absoluta acumulada por individuo y por año
Hola, Hola a todos, Os escribo porque no consigo finalizar el script necesario para realizar lo que a continuación planteo. Partiendo de un data frame (2 millones de casos), tengo: > datos2 ID FECHA YEAR CANTIDAD 1 100 2005-08-02 2005 1 2 100 2005-10-19 2005 2 3 100 2007-02-09 2007 1 4 100 2007-10-25 2007 1 5 100 2007-10-29 2007 1 6 120 2006-05-11
2010 Sep 27
1
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
2009 Apr 10
3
turning list into vector/dataframe
Hi, I have used this command : resamples<-lapply(1:1000,function(i) sample(lambs,replace=F)) resamples2<-lapply(resamples,Cusum) to get a list of 1000 samples of my data. The function Cumsum is defined as follows: Cusum<-function(x){ SUM<-cumsum(x)-(1:length(x))*mean(x) min<-min(cumsum(x)-(1:length(x))*mean(x)) max<-max(cumsum(x)-(1:length(x))*mean(x)) diff<-max-min ans<-c(min,max,diff) ans } where lam...
2004 Sep 04
0
Non-Markovian Behaviour of a Cusum?
Can someone help me understand simulations of a one-sided Cusum? Consider the following: Q[i] = max(0, Q[i-1]+z[i]), z[i] ~ N(offset, 1), with Q[0] = FIR (fast initial response). With offset < 0, mean{Q[i] for fixed i averaged over many simulations} approaches an asymptote as i -> Inf. In simulations with abs(offset) small and...
2002 Dec 09
0
Fitting a distribution involving a cusum
Sorry if this is a naive question, but I only started using R last week. I would like to fit a distribution to data which includes a cumulative sum: P(r) = \sum^{V}_{i=r} D e^{-n/i} i^{-d} This equation is used to fit rank-frequency data: P(r) is the frequency of an entity with rank r; V is the number of unique entity types; and D, n and d are constants to be estimated. I've found out how
2011 Oct 09
1
strucchange Nyblom-Hansen Test?
...he correct way and what is the difference between the following two approaches (leeding to different results): data("longley") # 1. Approach: sctest(Employed ~ Year + GNP.deflator + GNP + Armed.Forces, data = longley, type = "Nyblom-Hansen") #results in: # Score-based CUSUM test with mean L2 norm # #data: Employed ~ Year + GNP.deflator + GNP + Armed.Forces #f(efp) = 0.8916, p-value = 0.4395 #2. Approach: sctest(gefp(Employed ~ Year + GNP.deflator + GNP + Armed.Forces, data = longley), functional = meanL2BB) #results in: # M-fluctuation test # #data: gefp(E...
2009 Jan 12
1
Help with storage of each matrix generated in a loop
I need to store each matrix generated in a loop. I've been working with the CUSUM algorithm and I've been trying to implement it in R. What I need to do with my dataset is to create 1000 randomized datasets and cumulative sum them all and store all of those randomized CUSUMed datasets for further analysis and creation of the simulation envelope in the CUSUM chart. But I can&...
2004 Apr 14
7
trend turning points
Hi, does anybody know of a nice test to detect trend turning points in time series? Possibly with reference? Thanks, joerg
2010 Jan 08
2
time series analysis for a time series without a regular frequency
Hello, I am trying to conduct a time series analysis on historic hydrologic data, but I cannot coerce it into class ts because it does not have regular sampling intervals (some years have 20 samples, other have 8). Specifically I am trying to perform a CUSUM or or other step change detection, but the packages all seem to require data as ts. Is there a way to coerce my data into ts while maintaining all of my samples? Or alternatively, can someone recommend a package that does not require data as ts? Thanks! -- Erin Hestir Center for Spatial Tech...
2005 Aug 04
1
Counterintuitive Simulation Results
...ly, to the best of my understanding, should produce essentially a flat line with no discernable pattern. Instead, I see an initial dramatic drop followed by a slow rise to an asymptote. The simulation computes the mean of 20,000 simulated trajectories of 400 observations each of a one-sided Cusum of independent normal increments with mean EZ[t] = (-0.1) and unit variance. Started with any initial value, the mean of the Cusum should approach an asymptote as the number of observations increases; when started at that asymptote, it should theoretically stay flat, unlike what we see here....
2004 Jul 16
1
strucchange: breakpoints in inequally spaced data
...eakpoints(cells ~1) works great and identifies 5 very good breaks, however we are uncertain about these, because the data are unequally spaced. Is there a way to include the information about the measurement intervals, e.g. breakpoints(cells[-1] ~ diff(time)) Furthermore we wonder, why the OLS-CUSUM indicates several of these breakpoints but does not mark them as significant. Thanks in advance! Thomas P.