This is the inference module for subtype definition based on a vector. After training, we can predict subtype very easily in new data based on the data frame produced by training trainSubtypeUni. If one passes the visitName to the function then we will define subtype from the baseline value alone.

predictSubtypeUni(
  mxdfin,
  subtypeDataFrame,
  idvar,
  visitName,
  baselineVisit,
  rename = TRUE
)

Arguments

mxdfin

Input data frame

subtypeDataFrame

data frame defining the subtypes and cutpoints

idvar

variable name for unique subject identifier column

visitName

the column name defining the visit variables

baselineVisit

the string naming the baseline visit

rename

boolean will rename levels to user-provided names

Value

data frame with attached subtypess

Author

Avants BB

Examples

mydf = generateSubtyperData( 100 )
rbfnames = names(mydf)[grep("Random",names(mydf))]
mydf = outlierness( mydf, rbfnames )
#> [1] "r update: 2"
#> [1] "r update: 3"
#> [1] "r update: 4"
#> [1] "r update: 5"
#> [1] "r update: 6"
#> [1] "r update: 7"
#> [1] "r update: 8"
#> [1] "r update: 9"
mydf = highestQualityRepeat( mydf, "Id", "visit", "OL_KNN_SUM")
qdf = trainSubtypeUni( mydf, "cognition", c("C0","C1","C2"), c(0.33,0.66) )
pdf = predictSubtypeUni( mydf, qdf, "Id" )