Code Monkey home page Code Monkey logo

shrunk_ite's Introduction

shrunk_ite

Shrunk versus naive individual treatment effects in aggregated n-of-1 trials

Funding

This work was supported by the European Union’s FP7 programme [grant number 602552] for the IDEAL project.

include/.

The files required to perform the simulation are placed inside this folder.

Figure1.R

Creates a plot of the Mean Squared Error versus the true individual treatment effect. Two curves are drawn, one curve for the shrunk estimate, and another curve for the naive estimate of the individual treatment effect. A random intercepts model is assumed for the population of true individual treatment effects. The curve relative to the shrunk estimate assumes theoretical aggregated n-of-1 trials with an unlimited number of subjects. The probability density function of the true individual treatment effect is added over the plot, alongside a second y-axis.

Figure2.R

Creates a plot of the Mean Squared Error versus the estimated individual treatment effect. Two curves are drawn, one curve for the shrunk estimate, and another curve for the naive estimate of the individual treatment effect. A random intercepts model is assumed for the population of true individual treatment effects. The curve relative to the shrunk estimate assumes theoretical aggregated n-of-1 trials with an unlimited number of subjects. The probability density functions of the shrunk and naive estimates are added over the plot, alongside a second y-axis.

Figure3.R

Simulates aggregated n-of-1 trials with: 1, 2, 3, 4, 5, 10, 20, 100, 1000 subjects. A random intercepts model is assumed for the population of true individual treatment effects. The squared differences between the true individual treatment effect, and the shrunk estimate of the individual treatment effect, are computed for each subject. Then, the squared differences are regressed on the shrunk estimate, using local polynomial regression. This approach leads to a distribution-free estimate of the Mean Squared Error conditioned on the shrunk estimate. Finally, a plot of the Mean Squared Error versus the shrunk estimate is created. Nine curves are drawn, one curve for each number of subjects mentioned above. Simulation and estimation are computed using all the parallel threads available in the local machine. Despite the use of parallel computation, due to the high number of simulations, the whole program may take several hours to complete. Around 3.45GB of data are generated.

Figure4.R

Simulates aggregated n-of-1 trials with a number of subjects ranging from 2 to 1000. A random intercepts model is assumed for the population of true individual treatment effects. The squared differences between the true individual treatment effect, and the shrunk estimate of the individual treatment effect, are computed for each subject. Then, the squared differences are averaged over both: the computed shrunk estimates, and the simulated individual treatment effects. The obtained Mean Squared Error is divided by the theoretical Mean Squared Error associated to the naive estimate, yielding the relative efficiency between shrunk and naive estimates. Finally, the relative efficiency is plotted against the number of subjects for the defined covariance parameters. All the parallel threads available in the local machine are used for computation. Despite the use of parallel computation, due to the high number of computations, the whole program may take several hours to complete.

shrunk_ite's People

Contributors

arturstat avatar

Watchers

 avatar  avatar

Forkers

biostata

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.