predict.cornet {cornet} | R Documentation |
Predict binary outcome
Description
Predicts the binary outcome with linear, logistic, and combined regression.
Usage
## S3 method for class 'cornet'
predict(object, newx, type = "probability", ...)
Arguments
object |
cornet object |
newx |
covariates:
numeric matrix with |
type |
|
... |
further arguments (not applicable) |
Details
For linear regression, this function tentatively transforms the predicted values to predicted probabilities, using a Gaussian distribution with a fixed mean (threshold) and a fixed variance (estimated variance of the numeric outcome).
Examples
n <- 100; p <- 200
y <- rnorm(n)
X <- matrix(rnorm(n*p),nrow=n,ncol=p)
net <- cornet(y=y,cutoff=0,X=X)
predict(net,newx=X)
[Package cornet version 0.0.9 Index]