CoxPred {ABSurvTDC}R Documentation

ABCoxPH Prediction

Description

Prediction for ABCoxPH model

Usage

CoxPred(Model, NewData, AFC, HYS)

Arguments

Model

ABCoxPH model

NewData

New data

AFC

Age (in days) at first calving

HYS

Combine effect of herd, year and season

Value

References

Examples

library("ABSurvTDC")
library("readxl")
data_test<-read_excel(path = system.file("extdata/data_test.xlsx", package = "ABSurvTDC"))
PropData<-DataPrep(data =as.data.frame(data_test))
model<-ABCoxPH(PropData)
Lact_1<-c("Yes","Yes","Yes","No","No","No","No","No","No","No","No")
Lact_2<-c("No","No","No","No","Yes","Yes","No","No","No","No","No")
Lact_3<-c("No","No","No","No","No","No","No","No","Yes","Yes","Yes")
Lact_4<-c("No","No","No","No","No","No","No","No","No","No","No")
Lact_5<-c("No","No","No","No","No","No","No","No","No","No","No")
Lact_6<-c("No","No","No","No","No","No","No","No","No","No","No")
Lact_7<-c("No","No","No","No","No","No","No","No","No","No","No")
Lact_8<-c("No","No","No","No","No","No","No","No","No","No","No")
Lact_9<-c("No","No","No","No","No","No","No","No","No","No","No")
ndata<- data.frame(Lact_1,Lact_2,Lact_3,Lact_4,Lact_5,Lact_6,Lact_7,
                   Lact_8,Lact_9)
HYS<-2033
AFC <- 1400
CoxPred(Model=model, NewData=ndata, AFC, HYS)


[Package ABSurvTDC version 0.1.0 Index]