File: predict.refmodel.Rd

package info (click to toggle)
r-cran-projpred 2.0.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 740 kB
  • sloc: cpp: 355; sh: 14; makefile: 2
file content (50 lines) | stat: -rw-r--r-- 1,707 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/refmodel.R
\name{predict.refmodel}
\alias{predict.refmodel}
\title{Predict method for reference model objects}
\usage{
\method{predict}{refmodel}(
  object,
  newdata,
  ynew = NULL,
  offsetnew = NULL,
  weightsnew = NULL,
  type = "response",
  ...
)
}
\arguments{
\item{object}{The object of class \code{refmodel}.}

\item{newdata}{Matrix of predictor values used in the prediction.}

\item{ynew}{New (test) target variables. If given, then the log predictive
density for the new observations is computed.}

\item{offsetnew}{Offsets for the new observations. By default a vector of
zeros. By default we take the weights from newdata as in the original
model. Either NULL or right hand side formulas.}

\item{weightsnew}{Weights for the new observations. For binomial model,
corresponds to the number trials per observation. Has effect only if
\code{ynew} is specified. By default a vector of ones. By default we take
the weights from newdata as in the original model. Either NULL or right
hand side formulas.}

\item{type}{Scale on which the predictions are returned. Either 'link' (the
latent function value, from -inf to inf) or 'response' (the scale on which
the target \code{y} is measured, obtained by taking the inverse-link from
the latent value).}

\item{...}{Currently ignored.}
}
\value{
Returns either a vector of predictions, or vector of log predictive
  densities evaluated at \code{ynew} if \code{ynew} is not \code{NULL}.
}
\description{
Compute the predictions using the reference model, that is, compute the
expected value for the next observation, or evaluate the log-predictive
density at a given point.
}