joshuaulrich / joshuaulrich/quantmod

could not find function "predictModel"

Open
#232 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
R
Stars
906
Forks
233
PR merge metrics
No merged PRs in 30d

Description

### Description

Hello,
I am trying to use the quantmod function predictModel.
However, it seems not to be found.

```r
library(quantmod)
> predictModel
Error: object 'predictModel' not found

# not exported?
> quantmod:::predictModel
function (object, data, ...)
{
UseMethod("predictModel")
}

```

### Expected behavior

I would be expecting this.
```r
# exported?
> quantmod::predictModel
function (object, data, ...)
{
UseMethod("predictModel")
}

```
### Minimal, reproducible example ( without prompts(>) ).
```r
library(quantmod)

q.model = specifyModel(Next(OpCl(AAPL)) ~ Lag(OpHi(MSFT),0:3))

q.model.built <- buildModel(q.model,method='lm',training.per=c('2016-08-01','2016-09-30'))

q.model.built.modeldata <- getModelData(q.model.built, na.rm = TRUE)

q.model.built.modeldata.modeldata <- modelData(q.model.built.modeldata, data.window = c("2016-08-01","2016-10-31"), exclude.training = TRUE)

q.model.predicted <- predictModel(q.model.built.modeldata@fitted.model,q.model.built.modeldata.modeldata)

Error in predictModel(q.model.built.modeldata@fitted.model, q.model.built.modeldata.modeldata) :
could not find function "predictModel"
```

### Session Info

```r
> devtools::session_info()
Session info -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
setting value
version R version 3.4.4 (2018-03-15)
system x86_64, mingw32
ui RTerm
language (EN)
collate English_United States.1252
tz America/Chicago
date 2018-04-25

Packages -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
package * version date source
base * 3.4.4 2018-03-15 local
compiler 3.4.4 2018-03-15 local
curl 3.2 2018-03-28 CRAN (R 3.4.4)
datasets * 3.4.4 2018-03-15 local
devtools 1.13.5 2018-02-18 CRAN (R 3.4.3)
digest 0.6.15 2018-01-28 CRAN (R 3.4.3)
graphics * 3.4.4 2018-03-15 local
grDevices * 3.4.4 2018-03-15 local
grid 3.4.4 2018-03-15 local
lattice 0.20-35 2017-03-25 CRAN (R 3.4.4)
magrittr * 1.5 2014-11-22 CRAN (R 3.4.0)
memoise 1.1.0 2017-04-21 CRAN (R 3.4.0)
methods * 3.4.4 2018-03-15 local
PerformanceAnalytics 1.5.2 2018-03-16 Github (braverock/PerformanceAnalytics@242f526)
quadprog 1.5-5 2013-04-17 CRAN (R 3.4.0)
quantmod * 0.4-13 2018-04-13 CRAN (R 3.4.4)
rstudioapi 0.7 2017-09-07 CRAN (R 3.4.1)
stats * 3.4.4 2018-03-15 local
tools 3.4.4 2018-03-15 local
TTR * 0.23-3 2018-02-21 Github (joshuaulrich/TTR@0a037eb)
utils * 3.4.4 2018-03-15 local
withr 2.1.2 2018-03-23 Github (jimhester/withr@79d7b0d)
xts * 0.10-2 2018-03-14 CRAN (R 3.4.3)
zoo * 1.8-1 2018-01-08 CRAN (R 3.4.3)
```
Thanks
Andre Mikulec

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.