Hello, r1$df and r2$df don't exist.
Regards, Pascal 2013/8/13 Ingo Wardinski <i...@gfz-potsdam.de> > G'day > I try do compute some F-statistics of a singular spectrum analysis of a > timeseries sv > I run: > > require(Rssa) > > s <- ssa(sv) > > summary(sv) > Min. 1st Qu. Median Mean 3rd Qu. Max. > -4.238 2.761 6.594 6.324 10.410 15.180 > > r1 <- reconstruct(s,groups = list(1:5)) > > r2 <- reconstruct(s,groups = list(1:6)) > > SSE_M1 <- sum(residuals(r1)^2) > > SSE_M2 <- sum(residuals(r2)^2) > > df.num <- r1$df - r2$df > > df.den <- r2$df > > F <- ((SSE_M2 - SSE_M1) / df.num) / (SSE_M1 / df.den) > and eventually > > p.value <- 1 - pf(F, df.num, df.den) > Error in pf(F, df.num, df.den) : > Non-numeric argument to mathematical function > > > summary(df.num) > Min. 1st Qu. Median Mean 3rd Qu. Max. > > > summary(df.den) > Length Class Mode > 0 NULL NULL > > summary(F) > Min. 1st Qu. Median Mean 3rd Qu. Max. > > I need to compute the p.value, but something is going wrong, and I can't > see what. > Any help would be very much appreciated > ingo > > ______________________________**________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help> > PLEASE do read the posting guide http://www.R-project.org/** > posting-guide.html <http://www.R-project.org/posting-guide.html> > and provide commented, minimal, self-contained, reproducible code. > [[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.