Re: [R] strucchange breakpoints r-squared

2013-01-20 Thread Achim Zeileis
On Sun, 20 Jan 2013, Geoffrey Smith wrote: Can anyone please tell me how to get the r-squared output from a piecewise (segmented) regression using the strucchange package? Here is the R code I have tried thus far. library(lmtest) library(strucchange) data <- ts(c(rnorm(30), runif(30)), freq

Re: [R] strucchange breakpoints r-squared

2013-01-20 Thread David Winsemius
On Jan 20, 2013, at 3:05 PM, Geoffrey Smith wrote: Can anyone please tell me how to get the r-squared output from a piecewise (segmented) regression using the strucchange package? Here is the R code I have tried thus far. library(lmtest) library(strucchange) data <- ts(c(rnorm(30), runif

Re: [R] strucchange breakpoints r-squared

2013-01-20 Thread Bert Gunter
You can't. You shouldn't. Segmented regression with unknown breakpoints in nonlinear regression, and R-squared doesn't make sense for nonlinear regression. See: https://stat.ethz.ch/pipermail/r-help/2002-July/023461.html -- Bert On Sun, Jan 20, 2013 at 3:05 PM, Geoffrey Smith wrote: > Can anyo

[R] strucchange breakpoints r-squared

2013-01-20 Thread Geoffrey Smith
Can anyone please tell me how to get the r-squared output from a piecewise (segmented) regression using the strucchange package? Here is the R code I have tried thus far. library(lmtest) library(strucchange) data <- ts(c(rnorm(30), runif(30)), frequency = 12, start = c(2005, 01)) bpts <- breakp