signif: Compute Z score and p-value for parameter of focus

Description Usage Arguments Details Value See Also Examples

View source: R/report.R

Description

The signAdj column is important and not optional for latent factor models. Loadings to factor indicators can take any sign. If your focus is the regression from the SNP to the factor then this regression estimate will need to be multiplied by the sign of one of the factor loadings. Pick a loading associated with a strong indicator of the factor.

Usage

1
signif(result, focus, signAdj = NULL)

Arguments

result

output from loadResults

focus

parameter name on which to calculate a Z score and p-value

signAdj

name of column. Value of focus parameter is multiplied by the sign of the named column

Details

Two columns are added, Z and P. Z is the focal parameter divded by its standard error. P is the unadjusted two-sided normal CDF corresponding to the absolute Z score.

Value

result with new Z and P columns

See Also

Other reporting: isSuspicious(), loadResults(), plot.gwsemResult(), signifGxE()

Examples

1
2
3
4
5
6
7
8
tdir <- tempdir()
dir <- system.file("extdata", package = "gwsem")
pheno <- data.frame(anxiety=rnorm(500))
m1 <- buildItem(pheno, 'anxiety')
GWAS(m1, file.path(dir,"example.bgen"),
    file.path(tdir,"out.log"))
r1 <- loadResults(file.path(tdir,"out.log"), "snp_to_anxiety")
r1 <- signif(r1, "snp_to_anxiety")

gwsem documentation built on Jan. 18, 2022, 1:09 a.m.