Spectral GLM results

library(spant)
library(ggplot2)
knitr::opts_chunk$set(echo = FALSE)
theme_set(theme_bw())

r params$label

Mean spectrum

par(mfcol = c(1, 2))
plot(params$mrs_data_plot, xlim = xlim, restore_def_par = FALSE,
     vline = params$vline)
Nregressors <- ncol(params$regressor_df) - 1

for (n in 1:Nregressors) {
  cat(paste0("\n\n### regressor : ", names(params$regressor_df)[n + 1], "\n"))
  par(mfcol = c(1, 2))
  log_p_val_spec <- get_dyns(params$data$p_value_log_mrs, n)
  plot(log_p_val_spec, y_scale = TRUE,
       yaxis_lab = expression("-log"[10]*"(p-value)"),
       restore_def_par = FALSE, main = "Manhattan plot", xlim = params$xlim,
       vline = params$vline)
  beta_weight_spec <- get_dyns(params$data$beta_weight_mrs, n)
  plot(beta_weight_spec, y_scale = TRUE, yaxis_lab = "Intensity (au)",
       main = "beta weights", xlim = params$xlim, vline = params$vline)
}

Design matrix

plot_reg(params$regressor_df)
if (!is.null(params$exclude_labels)) {
  cat("\n\n### Excluded scan labels\n")
  for (x in params$exclude_labels) cat("- ", x, "\n")
}


Try the spant package in your browser

Any scripts or data that you put into this service are public.

spant documentation built on Sept. 11, 2024, 9:13 p.m.