Code Monkey home page Code Monkey logo

card's People

Contributors

shah-in-boots avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

davorvr

card's Issues

Future package split

A number of functions didn't seem to aggregate well into a single package. I've chosen to focus on porting over similar functions to separate packages to maintain order. Crucially, the focus of the package has evolved and will be targeted more at cardiovascular data. Eventually, will move the cosinor software to its own package to avoid overlap/confusion (however, this will likely be in version 0.3.0 after an appropriate deprecation process.

  • Clean up software that is no longer relevant or needs to be focused on in separate projects
  • Update population cosinor as seen in #1
  • Deprecate cosinor functions in anticipation of porting them over to a more specific rhythm-focused project repository
  • Work on adding in the research datasets and the data mining tools here in this package
  • Add warnings that circadian/longitudinal functions will be removed in near future

AF Composite Treatment Response Score

This is the AF-CTRS score that we would like to implement to analyze patient responses, combining both symptom burden with electromechanical burden.

  • initialize a function
  • develop arguments/inputs for the function
  • come up with reasonable weights for these functions to start off with
  • test this one several potential examples

Problem with population cosinors

Problem with population cosinors, reported by DV.

  • Confirm issue on local workspace
  • Re-evaluate statistics behind population mean

Just to report that I found the following error when running cosinor for
calculating a population mean cosinor

Error in data.frame(population = rep(names(kfits), sapply(kfits, length)),
 :
#                      arguments imply differing number of rows: 0, 520

To my best knowledge, I gave the same format to my file and relevant
variables as the Twins example file has. Twins runs ok, but not my file.

Even if I didn't find the reason for this, I solved it by running
cosinor_pop_impl and declaring kfits as data frame.

fits <- data.frame(
    population = rep(names(as.data.frame(kfits)),
sapply(as.data.frame(kfits), length)),
    yhat = unlist(kfits)
  )

Originally, it returned

names (kfits)
NULL
sapply((kfits), length)
   [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 .....

After declaring kfits as data frame, it returns

names(as.data.frame(kfits))
[1] "1" "2" "3" "4" "5" "6"
sapply(as.data.frame(kfits), length)
  1   2   3   4   5   6
520 520 520 520 520 520

Above documentation from message from DV. Code below is from DV as part of a MWE.


Code that would lead to this problem is below (generated by DV).

# cosinor test

library (card)

pmc.df.t <- as.data.frame(matrix(NA,3120,3)) # data frame for data
names(pmc.df.t) <- c("time","subject", "HR") # variable names

t <- c(1:520) # time 
pmc.df.t[,1] <- rep(1:520,6) # six subjects 
pmc.df.t[,2] <- rep(1:6,520)[order(rep(1:6,520))] # time for each subject


set.seed(1) # seed for rnd

# generates six different signals with some noise
for (i in 1:6){
M <- rnorm(1, mean=70, sd=5)
A <- rnorm(1, mean=3, sd=0.1)
phi <- rnorm(1, mean=60, sd=10)
e <- rnorm(c(1:520), mean=0, sd=5)
hr.curve <- M + A*cos((2*pi/260)*t+phi)+e
pmc.df.t[520*(i-1)+(1:520),3] <- hr.curve
print(plot(t,hr.curve))
}

# cosinor model
pmc.model.t <- cosinor(HR~time, data=pmc.df.t, tau = c(260), population = "subject")

Procedural codes integration

Procedural codes by CMS need to be integrated into the package dataset such they can be evaluated and selected for in claims-based data.

Overarching aims for procedural code additions:

  • Inclusion of 2023 (or most recent) updated ICD and CPT/HCPCS code lists into internal package data, along with internal documentation of procedural codes
  • Function to generate procedural dataset safely with pipe-friendly approaches for code extraction
  • Cardiovascular-focused code extraction to help simplify data mining tasks

Specific tasks:

  • procedure_codes() function generates appropriate procedural codes
  • update procedure_codes() with previous years of data (although weary of data size)
  • code_to_description() function converts codes appropriately to their descriptive version (as strings)
  • Document the types of procedures and diagnostic codes that are covered

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.