sebastien wrote:
Hello,

I used the function Fstats (in the package strucchange) and would like to
transform the F probability given by Fstats in P value. This transformation
can be made while making a plot, but I need to have the numerical P value
which are ploted... and I can't find out how to do.

You can look inside the plot.Fstats function with

 strucchange:::plot.Fstats

There you will find the equivalent of the following:

 k <- fs$nreg
 n <- fs$nobs
 x <- fs$Fstats
 pvals <- 1 - pf(x, k, (n - 2 * k))

which gives you the P-values.

 -Peter Ehlers

Here a is an exemple, to plot the P value.

let's take data as a array

fs <-fstats(data ~ 1, from = 4, to = length(data)-4)
plot(fs,pval=TRUE)

Thank you for your help,
Seb

______________________________________________
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.

Reply via email to