Forum Stats

  • 3,757,812 Users
  • 2,251,271 Discussions
  • 7,869,922 Comments

Discussions

Question about orch.predict

865185
865185 Member Posts: 387
edited Sep 13, 2017 10:35AM in R Technologies

hi Experts,

I have a question on orch.predict(object, newdata, ...), here is an example for using predict in glm2:

library(rpart)
data <- hdfs.put(kyphosis)
model <- orch.glm2(formula = Kyphosis ~ log(Age) + Number, data = data)
pred <- predict(model, newdata = data, supplemental = c("Kyphosis", "Age"))

Question is what is supplemental for, and what other arguments can be there for ... in orch.predict, seems no more detail info can be found on the web.

Best regards

Christos Iraklis Tsatsoulis

Best Answer

  • Christos Iraklis Tsatsoulis
    Christos Iraklis Tsatsoulis Member Posts: 85 Blue Ribbon
    edited Sep 12, 2017 10:44AM Accepted Answer

    The documentation of ORAAH can often be the source of great frustration, even for experienced users; your case is a good example of this.

    Since you use a glm2 model, your predict function, under the hood, calls the respective method for the said model, i.e. predict.orch.glm2. Searching for this function in the web will return no results, and you will not be able to find it in the reference manual either (although there is a link, in page 111, leading nowhere).

    Trying the help function will be of no help, at first:

    > help(predict.orch.glm2)

    No documentation for ‘predict.orch.glm2’ in specified packages and libraries:

    you could try ‘??predict.orch.glm2’

    Trying the suggestion will finally get you to the desired documentation, although only if you run it from an RStudio console:

    > ??predict.orch.glm2

    Here is the result in the RStudio help window:

    predict.orch.glm2.PNG

    Clicking on the link will get you there...

    Now that, among other things, you (we, in fact...) have learned that the said function is included in the ORCHstats subpackage, you can see the relevant documentation directly with:

    > help(predict.orch.glm2, package="ORCHstats")

    which, contrary to the ??predict.orch.glm2 command, will work smoothly from the R console, too.

    Hope this helps...

    Christos

    865185

Answers

  • Christos Iraklis Tsatsoulis
    Christos Iraklis Tsatsoulis Member Posts: 85 Blue Ribbon
    edited Sep 12, 2017 10:44AM Accepted Answer

    The documentation of ORAAH can often be the source of great frustration, even for experienced users; your case is a good example of this.

    Since you use a glm2 model, your predict function, under the hood, calls the respective method for the said model, i.e. predict.orch.glm2. Searching for this function in the web will return no results, and you will not be able to find it in the reference manual either (although there is a link, in page 111, leading nowhere).

    Trying the help function will be of no help, at first:

    > help(predict.orch.glm2)

    No documentation for ‘predict.orch.glm2’ in specified packages and libraries:

    you could try ‘??predict.orch.glm2’

    Trying the suggestion will finally get you to the desired documentation, although only if you run it from an RStudio console:

    > ??predict.orch.glm2

    Here is the result in the RStudio help window:

    predict.orch.glm2.PNG

    Clicking on the link will get you there...

    Now that, among other things, you (we, in fact...) have learned that the said function is included in the ORCHstats subpackage, you can see the relevant documentation directly with:

    > help(predict.orch.glm2, package="ORCHstats")

    which, contrary to the ??predict.orch.glm2 command, will work smoothly from the R console, too.

    Hope this helps...

    Christos

    865185
  • 865185
    865185 Member Posts: 387
    edited Sep 13, 2017 10:13AM

    hi Christos,

    It's awesome, thanks.

    Best regards

    Christos Iraklis Tsatsoulis
  • Christos Iraklis Tsatsoulis
    Christos Iraklis Tsatsoulis Member Posts: 85 Blue Ribbon
    edited Sep 13, 2017 10:35AM
This discussion has been closed.