Description Usage Arguments Examples
View source: R/LinearRegression.R
Predict the next value using the same multilinear regression model
1 | predictor(X, model)
|
X |
design matrix |
model |
the result of running bootreg on the data set, ie. a great big collection of different betas, upon which the column mean is used to get the most accurate possible estimate for beta |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # predict a singular value, given the description of the linear model and the design matrix of the new points
df<-iris
# scrape off all non-numeric data first
df<-df[,sapply(df, is.numeric)]
df
X<-df[,-1]
Y<-as.matrix(df[,1])
X
Y
dim(X)
dim(Y)
X<-append_design_matrix(X)
dim(X)
bh=bootreg(Y,X,1000) # works just fine! Whoo!
data.matrix(rowMeans(bh$bh))
predictor(matrix(c(1, 2, 2, 3), nr=1), bh)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.