predict.mdr: MDR model predictions

Description Usage Arguments Value Author(s) See Also Examples

View source: R/mdr.r

Description

method for class 'mdr' to predict case/control status for new data using a previously fit MDR model.

Usage

1
2
## S3 method for class 'mdr'
predict(object, new.data,...)

Arguments

object

an object of class 'mdr', a result of a call to either mdr.cv or mdr.3WS

new.data

a new data set with the same original variables in the same order, without the response

...

additional arguments

Value

a vector with predicted binary status ...

Author(s)

Stacey Winham

See Also

mdr.cv, mdr.3WS, summary.mdr, plot.mdr

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#load data
data(mdr1)

#fit mdr model to a subset of the sample data
fit<-mdr.cv(data=mdr1[,1:11], K=2, cv=5) 

#create 'new' data from which to predict
new<-mdr1[,2:11] #same predictor variables, without the response

predict(fit, new.data=new) #predict case/control status for this 'new' data

MDR documentation built on May 29, 2017, 7:05 p.m.