If by gbreakpoints, you simply mean breakpoints (I'm not familiar with the
package so this is an honest point of ambiguity from me), the documentation
says the following:
Value
An object of class "breakpoints" is a list with the following
elements:
breakpointsthe breakpoints of the optimal partition with the number of
breaks specified (set to NA if the optimal 1-segment solution is reported),
RSSthe associated RSS,nobsthe number of observations,nregthe number of
regressors,callthe function call,datatspthe time series properties tsp of
the data, if any, c(1/nobs, 1, nobs)otherwise. This suggests that you can
access the breakpoints in one of three ways
res$breakpoints or res[[1]] or res[["breakpoints"]]
Though without data and a reproducible example I can't guarantee this is
what you are looking for. More generally, you should look at ?Extract to see
how to get values from R objects. Whatever getting started with R material
you (should have) read probably dealt with this topic in the context of the
lm() function, but the mechanics are the same for most everything.
Hope this helps,
Michael Weylandt
On Wed, Sep 14, 2011 at 4:16 AM, Vikram Bahure
<economics.vikram@gmail.com>wrote:
> Hi,
>
> I am new to R. I am using strucchange to get the breakpoints in time series
> dataset. So the problem I am facing is: I want to link the result generated
> by the breakpoints to further analysis (for eg. generating volatility for
> each group). The result is in following form:
>
> ---------------------------------------
> > res <- gbreakpoints(GDP.new ~ 1,data=a,h=2,breaks=6)
> > res
>
> Optimal 7-segment partition for `lm' fit:
>
> Call:
> gbreakpoints(formula = GDP.new ~ 1, data = a, h = 2, breaks = 6)
>
> Breakpoints at observation number:
> 10 19 25 33 44 53
>
> Corresponding to breakdates:
> 1960 1969 1975 1983 1994 2003
> ---------------------------------------
> It would be helpful if you can throw some light on how to access the data
> stored in the breakpoints result instead of manually accessing it.
>
> Regards
> Vikram Bahure
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>
[[alternative HTML version deleted]]