twinan90 {gap}R Documentation

Classic twin models

Description

Classic twin models

The function also allows for test for normality and Box-Cox transformation. It further allows for output data in FISHER format.

Usage

twinan90(mzdat,dzdat,vname='mzdz',xlamb=1,const=0,vmiss=-9,path=1,
           ped=0,nvar=1,form='((1x,a1,5x,F6.2))')

Arguments

mzdat two columns of data for MZ twins
dzdat two columns of data for DZ twins
vname variable name
xlamb the Box-Cox transformation parameter
const constant to be added to each data value
vmiss missing value indicator
path path analysis to be conducted
ped if 1, to output data in FISHER format
nvar number of variables in the data file
form the Fortran format for the data file

Value

The returned values is in a list with the following components, while the MLEs are in two system files (.log and .out):

h2 The heritability estimate based on 2(rMZ-rDZ), where rMZ and rDZ are the intraclass correlation coefficients for MZ and DZ twin pairs
seh2 The standard error for the above statistic
nMZ The number of MZ pairs used
nDZ The number of DZ pairs used
rMZ The intraclass correlation for MZ
rDZ The intraclass correlation for DZ
covMZ The variance-covariance matrix for MZ
covDZ The variance-covariance matrix for DZ
vname.log the diagnostic file
vname.out the output file

References

Williams CJ, Christian JC, Norton JA Jr. (1992) TWINAN90: A FORTRAN program for conducting ANOVA-based and likelihood-based analyses of twin data. Computer Methods and Programs in Biomedicine 38:(2-3):167-176

Williams CJ (1993). On the covariance between parameter estimates in models of twin data. Biometrics. 49(2):557-68

Note

built on newtw5.for

Author(s)

Chris Williams, Jing Hua Zhao

Examples

## Not run: 
filespec <- file.path(.path.package("gap"),"tests/mzdz.dat")
mzdz <- matrix(scan(filespec,skip=1),ncol=2,byrow=T)
mzdat <- mzdz[1:131,]
dzdat <- mzdz[132:206,]
twinan90(mzdat,dzdat,xlamb=2)

# the normality test can be conducted as follows,
ks.test(mzdat,"pnorm")
ks.test(dzdat,"pnorm")
qqnorm(mzdat)
qqnorm(dzdat)
## End(Not run)

[Package gap version 1.0-17 Index]