Skip to content
Prev 14358 / 15274 Next

Error in lm prediction

On Mon, Jul 24, 2017 at 1:10 PM, Ed Herranz <ed.herranz at gmail.com> wrote:
Bad guess. :)

library(xts)
data(sample_matrix)
xtsObject <- as.xts(sample_matrix)
xtsObject$t <- seq_len(nrow(xtsObject))-1
lm(Open ~ t, data=xtsObject)
It's very difficult to help if you do not provide a reproducible
example.  Most people do not have, and will not spend, the time it
takes to imagine and create data required to reproduce the issue you
describe.

Please see: https://stackoverflow.com/q/5963269/271616
-- 
Joshua Ulrich  |  about.me/joshuaulrich
FOSS Trading  |  www.fosstrading.com
R/Finance 2017 | www.rinfinance.com
On Mon, Jul 24, 2017 at 1:10 PM, Ed Herranz <ed.herranz at gmail.com> wrote: