Giter Site home page Giter Site logo

prostate-project's Introduction

#rm(list=ls()) #setwd("")

prostate-project

A single package synthesizing the work of Yates Coley

#Complexities added include: tracking when patients have surgery

  1. Install package(s)

install.packages("devtools") devtools::install_github("jbindman/prostate-project")

  1. Load in data from csv files for tx.data, demo.data, psa.data, bx.data, each of which must be saved locally. Combine these files into a more useful set of dataframes by calling fillPatientTables on the four files. The function will return three filled dataframes (pt.data, psa.data, bx.full) to the workflow in list called patientDataframes.

#demographic data. one record per patient demo_data<-read.csv("julia-demo-data-IOP.csv") names(demo_data) #psa data. one record per PSA test per patient psa_data<-read.csv("julia-psa-data-IOP.csv") names(psa_data) #bx.data. one record per biopsy per patient bx_data<-read.csv("julia-bx-data-IOP.csv") names(bx_data) #surg.data. one record per treatment received per patient surg_data<-read.csv("julia-surg-data-IOP.csv") names(surg_data)

demo_data<-read.csv("julia-demo-data.csv") psa_data<-read.csv("julia-psa-data.csv") bx_data<-read.csv("julia-bx-data.csv") surg_data<-read.csv("julia-tx-data.csv")

  1. Organize data frames from clinical patient sources

We want the patient data to include one record per patient and true GS

We may also put variables in this data frame to ease definition of variables in the PSA and BX data frame (date of dx, age dx, average prostate volume)

Finally, we will order patients based on their observed GS. This is done to make estimation in JAGS easier. We assign a new sequential unique patient identifier for this ordering ("subj")

ptDataframes <- ProstatePackage::fillPatientTables(demo_data, psa_data, bx_data, surg_data, IOP = TRUE)

inputPatient <- ProstatePackage:::printIndividualData(198, ptDataframes)

for (i in 1:200) { printIndividualData(i, ptDataframes) }

  1. Prepare data and arguments for RJAGS by calling RJAGS on a required text file required for RJAGS use, as well as the formatted list patient.Dataframes.

Return RJAGS argument prep on formatted patient dataframes

jagsPrep <- RJAGSprep(ptDataframes, TRUE)

  1. Execute RJAGS

#independently

  1. Preform Distance function closestK(inputPatient, ptDataframes)

prostate-project's People

Contributors

jbindman avatar rycoley avatar vjcitn avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.