search for: sctest

Displaying 18 results from an estimated 18 matches for "sctest".

Did you mean: ctest
2006 Feb 15
1
S3 generics without NS and cleanEx()
...generics from a foreign package (without namespace), defining a S3 method in a package _with_ namespace and the `cleanEx()' function which is automatically generated and executed before examples are run by R CMD check. To be more precise. Package `strucchange' defines a S3 generic sctest <- function(x, ...) UseMethod("sctest") and the development version of `party' defines sctest.mob <- function(x, node = NULL, ...) { ... which is exported in party's namespace S3method(sctest, mob) Creating a `mob' object and running `sctest'...
2009 May 17
2
Chow test(1960)/Structural change test
...ssion using lm function:   > reg1 <- lm (a b+c+d, data = database1)   Then I try to perform the Chow (1960) test (structural change test) on my regression. I know the breakpoint date. I try the following code like it is described in the “Examples” section of the “strucchange” package :   > sctest(reg1, data = database1, type = "Chow",  point = 20, asymptotic = FALSE)   Unfortunately, this does not work and I have the following error message:   Error in UseMethod("sctest") : No applied method for "sctest".   I guess that I should compute fs statistics first (Fis...
2011 Oct 09
1
strucchange Nyblom-Hansen Test?
I want to apply Nyblom-Hansen test with the strucchange package, but I don't know how is the 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(Employe...
2007 Aug 08
6
Exporting collections/sshkeys
Hullo, I am attempting to use collections in order to distribute ssh keys across (soon) many hosts but I am hitting some trouble (the recipe I am using is at the end of this email). Namely it looks like sshkeys resources are not marked as exported in the sqlite db. I.e. if I do: sqlite3 clientconfigs.sqlite3 SQLite version 3.3.5 Enter ".help" for instructions sqlite> select *
2011 Aug 01
1
ivreg and structural change
...(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) plot(cusum) coef(cusum, breaks=2) ## 1. The plot of the two above were very different and ## 2. When I ask for the breaks, instead of the dates, it returned me a line...
2009 Jun 28
1
testing an ARFIMA model for structural breaks with unknown breakpoint
...users, I'm trying to use the "strucchange" package to determine structural breaks in an ARFIMA model. Unfortunately I'm not so familiar with this topic (and worse, I'm a beginner in R), so I don't know exactly how to specify my model so that the "Fstats","sctest" and "breakpoint" functions to recognize it and to calculate the potentially breakpoints. Could anyone give me a sugestion? I tried, however, (following the example specified in R Help) the functions: fs.x <- Fstats(x ~ 1)) sctest(fs.x) plot(fs.x) breakpoints(fs.x) But I unders...
2009 Jan 14
2
Kaplan-Meier Plot
...t;- c("MS", "time", "pred", "class") df$time[df$time > 6] <- 6 surv <- Surv(as.numeric(as.vector(df$time)), as.numeric(as.vector(df$class))) dfPval <- summary(coxph(Surv(as.numeric(as.vector(df$time)), as.numeric(as.vector(df$class))) ~ pred, df))$sctest par(mfrow = c(2,2)) plot(survfit(surv ~ df$pred), col=c("red","green"), ylab = "percentage of survival", xlab = "survival years") plot(survfit(surv ~ df$pred), col=c("red","green"), lwd = 8, ylab = "percentage of survival", xlab...
2004 Dec 16
0
fitting problems in coxph.fit
...u = double(nvar), imat= double(nvar*nvar), loglik=double(2), flag=integer(1), double(2*n + 2*nvar*nvar + 3*nvar), as.double(control$eps), as.double(control$toler.chol), sctest=as.double(method=="efron") ,PACKAGE="survival") produces R> coxfit$coef [1] NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN because (?) R> summary(x[,1]) Min. 1st Qu. Median Mean 3rd Qu. Max. 2.378e-01 8.758e+00 5...
2011 Nov 20
1
Cox proportional hazards confidence intervals
...d, and Score test p-values from the coxph.object, as well as the hazard ratio as follows: formula.obj = Surv(days, status) ~ type coxph.model = coxph(formula.obj, df) fit = summary(coxph.model) hazard.ratio = fit$conf.int[1] lower95 = fit$conf.int[3] upper95 = fit$conf.int[4] logrank.p.value = fit$sctest[3] wald.p.value = fit$waldtest[3] lr.p.value = fit$logtest[3] I had intended to report logrank P values with the hazard ratio and CI obtained from this function. In one case the P was 0.04 yet the CI crossed one, which confused me, and certainly will raise questions by reviewers. In retrospect I...
2011 Jul 19
1
"may be used in an incorrect context"
...offset)), newstrat, means = double(nvar), coef= as.double(beta), u = double(nvar), imat= double(nvar*nvar), loglik=double(2), flag=integer(1), double(2*nvar*nvar +nvar*4 + n), integer(2*n), as.double(control$eps), as.double(control$toler.chol), sctest=double(1), as.integer(length(debugfile)), as.character(debugfile), as.integer(1), # dumb mode PACKAGE="survivalrds" ) - r$loglik[2] } r <- optim(init, agfitfn, ...) return(r) All of this is in the body...
2007 Apr 17
3
Extracting approximate Wald test (Chisq) from coxph(..frailty)
Dear List, How do I extract the approximate Wald test for the frailty (in the following example 17.89 value)? What about the P-values, other Chisq, DF, se(coef) and se2? How can they be extracted? ######################################################> kfitm1 Call: coxph(formula = Surv(time, status) ~ age + sex + disease + frailty(id, dist = "gauss"), data = kidney)
2004 Jun 29
1
strucchange-esque inference for glms ?
hello R-world, according to the strucchange package .pdf, "all procedures in this package are concerned with testing or assessing deviations from stability in the classical linear regression model." i'd like to test/assess deviations from stability in the Poisson model. is there a way to modify the strucchange package to suit my purposes, or should i use be using another
2006 Jan 09
1
brown, durbin , evans ( 1975 )
Does anyone know where I can get R code for plotting the Brown , Durbin and Evans cumsum procedure ( 1975 ) ? I wrote my own code but I am a little worried that my confiodence bands may not be correct ( I find the formula in the original paper confusing and S+Finmetrics has a formula but that formula implies that there should be 4 lines as far as I can tell ) so I would like to see someone
2002 Nov 22
1
Segmentation fault using "survival" package (PR#2320)
Full_Name: Jerome Asselin Version: 1.6.1 OS: RedHat Linux 7.2 Submission from: (NULL) (142.103.173.179) Hello, I get a segmentation fault when I run the following code. I wouldn't expect meaningful results because my response variable contains only missing values. However, I would expect something like a regular error (not a segmentation fault). library(survival) data <-
2011 Jul 29
2
'breackpoints' (package 'strucchange'): 2 blocking error messages when using for multiple regression model testing
Good morning to all, I am encountering a blocking issue when using the function 'breackpoints' from package 'strucchange'. *Context:* I use a data frame, 248 observations of 5 variables, no NA. I compute a linear model, as y~x1+...+x4 x4 is a dummy variable (0 or 1). I want to check this model for structural changes. *Process & issues:* *First, I used function Fstats.* It
2012 May 29
1
strucchange Fstats() example
...he following code ## Nile data with one breakpoint: the annual flows drop in 1898 ## because the first Ashwan dam was built data("Nile") plot(Nile) ## test the null hypothesis that the annual flow remains constant ## over the years fs.nile <- Fstats(Nile ~ 1) plot(fs.nile, alpha=0.05) sctest(fs.nile) ## visualize the breakpoint implied by the argmax of the F statistics plot(Nile) lines(breakpoints(fs.nile)) In the second example, the authors state the presence of "at least" two breakpoints. When plotting the F-statistics using the following code, we see indeed two peaks in...
2007 Dec 17
2
Capture warning messages from coxph()
Hi, I want to fit multiple cox models using the coxph() function. To do this, I use a for-loop and save the relevant results in a separate matrix. In the example below, only two models are fitted (my actual matrix has many more columns), one gives a warning message, while the other does not. Right now, I see all the warning message(s) after the for-loop is completed but have no idea which model
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