We show a simple example in which we fit PheNorm to a simulated dataset.

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(PheNorm)

Load the simulated data

fit.dat <- read.csv("https://raw.githubusercontent.com/celehs/PheNorm/master/data-raw/data.csv")
str(fit.dat)

Apply the PheNorm algorithm

set.seed(1234)
fit.phenorm <- PheNorm.Prob(
  nm.logS.ori = "ICD", 
  nm.utl = "utl", 
  dat = fit.dat, 
  nm.X = NULL, 
  corrupt.rate = 0.3, 
  train.size = nrow(fit.dat)
)
str(fit.phenorm)


celehs/PheNorm documentation built on March 2, 2021, 2:12 a.m.