Giter Club home page Giter Club logo

lmrse's Introduction

lmrse

This package is used to fit linear regression models with cluster robust standard errors across high-dimensional phenotypes to assess change over time.

Installation

install.packages("remotes")
remotes::install_github("jrs95/lmrse")

Functions

  • lmrse: fits a linear regression model with cluster robust standard errors for all markers.
  • coerce.lmrse: coerces the lmrse results into a single data.frame.

Example

# Libraries
library(lmrse)

# Data  
y <- rnorm(5000000)
y <- matrix(y, ncol = 1000) # a matrix of phenotypes (rows = individuals, columns = markers)
colnames(y) <- paste0("pheno", 1:1000)
x <- rnorm(5000) # a vector of exposure
cluster <- rep(1:1000, 5) # cluster variable
c1 <- rbinom(5000, 1, 0.5) # covariate 1
c2 <- rnorm(5000) # covariate 2

# Analyses  
res <- lmrse(y ~ x + c1 + c2, cluster = cluster)
summary(res)
results <- coerce.lmrse(res)

Citation

Staley JR et al. Longitudinal analysis strategies for modelling epigenetic trajectories. Int J Epidemiol 2018;47(2):516-525.

lmrse's People

Contributors

jrs95 avatar

Stargazers

 avatar Chris Rayner avatar Timothy York avatar

Watchers

Timothy York 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.