emm_pip: emm_pip

View source: R/Emmreml-pipeline.R

emm_pipR Documentation

emm_pip

Description

Pipeline for running emmreml

Usage

emm_pip(
  ge_meta,
  sci,
  agi,
  dsi,
  dsi_sum,
  type = "wt_avg",
  res,
  rel,
  sex = "F",
  fix_var = c("age", "rank"),
  change_var = c("eigen_wt", paste0(c("SCI", "AGI", "DSI", "SumBond"), "_F"),
    paste0(c("SCI", "AGI", "DSI", "SumBond"), "_M")),
  lps_name = "treatment",
  numcore = 3,
  sname = "sname",
  outputdir,
  emm_prefix,
  x_axis_size = 20
)

Arguments

ge_meta

should contain sname,dart_date,treatment,group,sex,rank,age

sci

sci input from Ramboseli::sci

agi

agi input from Ramboseli::agi

dsi

dsi_pop input from Ramboseli::dsi_pop

dsi_sum

dsi_pop_sumamry input from Ramboseli::dsi_pop_summary

type

"wt_avg"(default),"dir_avg", or "grp_only". calculating weighted average by days_present across group, direct average, or keep only the group observed on the darting date

res

full GE residual dataframe

rel

full K matrix

sex

The sex to look at, "F" (default) or "M"

fix_var

The variables to be included in every emmreml model, defaut to c("age","rank")

change_var

The variables to be added with replacement to the basic model. Default to all SR.

lps_name

The colname indicating LPS/NULL in ge_meta, default to treatment

numcore

The number of core to be used for EMMREML, default to 3

sname

The colname indicaiting sname, default to sname, could be sname.x

outputdir

The folder to store output, end with /

emm_prefix

The prefix for emmresult RDS and p histogram png

x_axis_size

The font size of x axis of p histogram, default to 20

Value

a data frame with merged emmreml result

Nothing, results will be stored in the specified output directory


lycium0605/SHfunction documentation built on Feb. 5, 2023, 11:14 a.m.