Skip to contents

Computes GWAS-style summary statistics (beta, standard error, frequency, p-value, z-score) from genotype and phenotype data using univariate regression.

Usage

calculate_sumstat(X, Y)

Arguments

X

Genotype matrix (samples × SNPs).

Y

Phenotype vector (length = number of samples).

Value

A tibble containing summary statistics with columns: SNP, Beta, se, Freq, p, z.

Examples

G <- matrix(rbinom(1000, 2, 0.5), nrow = 100, ncol = 10)
Y <- rnorm(100)
colnames(G) <- paste0("SNP", 1:10)
sumstats <- calculate_sumstat(G, Y)