descriptives.trait {GenABEL}R Documentation

Function to generate descriptive summary tables for phenotypic data

Description

Function to generate descriptive summary tables for phenotypic data

Usage

	descriptives.trait(data,subset,file,by.var=NULL,digits = 3)

Arguments

data

an object of snp.data-class or gwaa.data-class

subset

Subset of people to run analysis on. If missing, all people from data are used for analysis.

file

A string specifying the name of a file to write the tables to (default is no file otput).

by.var

a binary variable or a character scalar specifying the name of a binary trait in data; statistics will be produced separately for the groups and compared

digits

number of digits to be printed

Value

A table with descriptive statistics. Ptt: t-test; Pkw: kruskal.test; Pex: Fisher exact test (for factors with <5 levels)

Author(s)

Yurii Aulchenko

Examples

	require(GenABEL.data)
	data(srdta)
	descriptives.trait(srdta)
	descriptives.trait(srdta,by.var=srdta@phdata$sex)
	descriptives.trait(srdta,by.var="sex")
	attach(phdata(srdta))
	descriptives.trait(srdta,by.var=sex)
	detach(phdata(srdta))

[Package GenABEL version 1.8-0 Index]