R/Fit_linear_model.R
MR_mega_env_lrw.Rd
Fit the environment-adjusted meta-regression model using the normalized statistic data across all cohorts.
MR_mega_env_lrw(dta, qt = TRUE, ncores, pcCount)
A list containing BETA, SE^-2,PCs and envs, cohort_count_filt which may be used for Bayesian factor.
Whether the trait is quantitative or not. This method is only used for quantitative traits.
The the number of cores which would be used for running in parallel.
The number of axes of genetic variation.
Output a file containing names of genetic variants, estimated coefficients, standard errors, chisq value of the association, the number of degrees of freedom of the association, p-value of the association, chisq value of the heterogeneity due to different ancestry, ndf of the heterogeneity due to different ancestry, p-value of the heterogeneity due to different ancestry, chisq value of the residual heterogeneity, ndf of the residual heterogeneity, p-value of the residual heterogeneity.