gwsem (version 2.1.4)

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

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

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

Value

result with new Z and P columns

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.

See Also

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

Examples

Run this code
# NOT RUN {
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")
# }

Run the code above in your browser using DataLab