2
\alias{predictValuesLm}
3
\title{Predicts values through a linear model}
5
This ROT function, called from a LinearModel C++ object, and given a
6
sample, is used to predict the corresponding values through the linear
7
model. It returns the predicted sample.
10
predictValuesLm(x, beta)
13
\item{x}{A m-by-n matrix containing the explanatory variables.}
14
\item{beta}{A n-by-1 vector containng the linear model parameters.}
17
A m-by-1 vector is returned, containing the predicted values.}
19
As it is not asked in LinearModel.getPredict(), no prediction interval
20
is returned; it is up to the user to be careful about that. It is also to
21
noted that the sample is not assumed to contain the '1's corresponding to
22
the intercept parameter.
24
\author{Pierre-Matthieu Pair, Softia for EDF.}
27
x <- matrix(runif(40), 10, 4)
28
r <- matrix(c(1,2,3,4), 4, 1)
29
y <- x \%*\% r + matrix(rnorm(10, 0, 0.05), 10, 1)
30
LM <- computeLinearModel(x, y)
31
predictValuesLm(x, LM$parameterEstimate)
33
\keyword{multivariate}