Giter Club home page Giter Club logo

tcensreg's Introduction

Hello, and Welcome!

I recently completed my dissertation research related to causal inference for multiple simultaneous continuous exposures as part of my Ph.D. in the Department of Biostatistics at UCLA. In the past I have worked on statistical methods related to censored regression and simulating longitudinal differential abundance of the microbiome. Many of these projects have resulted in R packages that I have authored including tcensReg, mvGPS, and microbiomeDASim which can be seen in the repositories.

I currently work for the Los Angeles Dodgers as a Quantitative Analyst.

I code primarily in R and use LaTeX for scientific writing. Some of my favorite tools to help my work are Overleaf, which has been an extremely helpful way to work collaboratively on manuscripts written with LaTeX, and the xaringan R package (https://github.com/yihui/xaringan) for creating presentations such as my dissertation.

I enjoy hiking ๐Ÿ—ป, spending time outdoors โ›บ, and baseball โšพ. Any feedback when implementing my projects here is always welcome. If you want to reach me you can ๐Ÿ“ง me at [email protected].

tcensreg's People

Contributors

williazo avatar

Stargazers

 avatar  avatar

Watchers

 avatar

tcensreg's Issues

Use future_lapply(..., future.seed = TRUE) to get proper random numbers

Congrats for the CRAN submission. I see you're using future.apply ๐Ÿ‘ A quick comment about the latter; Don't forget to pass argument future_lapply(..., future.seed = TRUE) if you use it with resampling techniques because otherwise, you will not get statistical sound random numbers, e.g.

ls_dt <- future.apply::future_lapply(1:B, function(num_reps){ #looping the function over the number of replicates
lapply(sd_vec, function(s){ #applying over the number of different standard deviation values
lapply(1:nrow(beta), function(x){ #each row of beta matrix represents a unique mu1, mu2 combination
y_star_1 <- rtnorm(n = n1, mean = unname(beta[x, 1]), sd = s, a = a) #oversampling from a normal distribution
y_star_2 <- rtnorm(n = n2, mean = sum(beta[x, ]), sd = s, a = a)
y_star <- c(y_star_1, y_star_2)
y_dl <- cens_method(y_star, method = "DL", tobit_val)
y_dl_half <- cens_method(y_star, method = "DL_half", tobit_val)
y_tobit <- cens_method(y_star, method = "Tobit", tobit_val)
cens_ind <- ifelse(y_tobit == tobit_val, 1, 0)
group <- c(rep(0, n1), rep(1, n2))
data.frame(y_star, y_dl, y_dl_half, y_tobit, cens_ind, group)
})})})

Update methodology to handle right censoring and/or truncation

The original methods restricted cases to left censoring and/or truncation only. In general though we may have use cases that include right censoring and/or truncation. Extending the framework and code to handle these cases is a goal for the next package release.

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.