[R] predict.lm() out-of-sample predictions - problem with data classes

2009-10-08 Thread Gero Schwenk
Hello! I'm still working on my problem, which also occurs with the predict.lm() function. - Providing newdata, which is a data.frame with all variables being numeric, as str() shows, R tells me the following: ar1.xpred.test.pred - predict(ar1.xpred.fitted, regdata.test, se.fit = FALSE)

[R] error using predict() / fRegression-package

2009-10-07 Thread Gero Schwenk
Hello! I'm puzzled by the following problem. It occurs while trying to predict responses in a test-dataset using a linear model fitted with regFit from the rMetrics fRegression-package. All goes well when I call predict using the training dataset. However, a call using the test-dataset

[R] Rmetrics: Problem with align

2009-09-07 Thread Gero Schwenk
Hi there! I'm stuck with a problem aligning financial timeseries and haven't found a cue how to fix it... When I run that simple script, everything goes well until the align-command: -- rm(list=ls()) x - yahooSeries(^GDAXI) head(x) xAligned - align(x = x, by = 1d, method = before,

Re: [R] Rmetrics: Problem with align

2009-09-07 Thread Gero Schwenk
Hi all! I've found the solution - the ordering of the series is important. It's expected that the most recent entries are located at the bottom of the data matrix. Here's the sorting command: x - sort(x, decreasing = FALSE) Kind regards: Gero Gero Schwenk schrieb: Hi there! I'm stuck