-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpredict.cvinereg.Rd
47 lines (39 loc) · 1.25 KB
/
predict.cvinereg.Rd
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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/predict.cvinereg.R
\name{predict.cvinereg}
\alias{predict.cvinereg}
\alias{fitted.cvinereg}
\title{Predict conditional mean and quantiles from a C-vine regression model}
\usage{
\method{predict}{cvinereg}(object, newdata, alpha = 0.5, cores = 1, ...)
\method{fitted}{cvinereg}(object, alpha = 0.5, ...)
}
\arguments{
\item{object}{an object of class \code{cvinereg}.}
\item{newdata}{matrix of covariate values for which to predict the quantile.}
\item{alpha}{vector of quantile levels; \code{NA} predicts the mean based on an
average of the \code{1:10 / 11}-quantiles.}
\item{cores}{integer; the number of cores to use for computations.}
\item{...}{unused.}
}
\value{
A data.frame of quantiles where each column corresponds to one
value of \code{alpha}.
}
\description{
Predict conditional mean and quantiles from a C-vine regression model
}
\examples{
# simulate data
x <- matrix(rnorm(200), 100, 2)
y <- x \%*\% c(1, -2)
data <- data.frame(y = y, x = x)
# fit vine regression model
fit <- cvinereg(y ~ ., data)
# model predictions
mu_hat <- predict(fit, newdata = data, alpha = NA) # mean
med_hat <- predict(fit, newdata = data, alpha = 0.5) # median
}
\seealso{
\code{\link{cvinereg}}
}