Learn R Programming

mixor (version 1.0.4)

concen: Twins Trouble Concentrating Data

Description

Monozygotic and dizygotic twins trouble concentrating data

Usage

data(concen)

Arguments

Format

A data frame with 16 observations on the following 6 variables.

ID

a numeric vector indicating the unique twin pair ID

TConcen

an indicator variable representing trouble concentrating (0 = absent, 1 = present)

int

a numeric vector of ones; used in the stand-alone MIXOR program to represent the intercept

Mz

an indicator variable representing MZ twins (1 = MZ, 0 = DZ)

Dz

an indicator variable representing DZ twins (1 = DZ, 0 = MZ)

freq

a numeric vector representing the frequency of the pattern

References

Ramakrishnan V. et al (1992) Elementary methods for the analysis of dichotomous outcomes in unselected samples of twins Genetic Epidemiology 9, 273-287.

Examples

Run this code
# NOT RUN {
library("mixor")
data("concen")
# sort the data by twin pair ID
concen<-concen[order(concen$ID),]
# common ICC probit model
Common.ICC<-mixor(TConcen~Mz, data=concen, id=ID, weights=freq, 
     link="probit", nAGQ=10, random.effect.mean=FALSE)
summary(Common.ICC)
# Varying ICC probit model
Varying.ICC<-mixor(TConcen~Mz+Dz, data=concen, id=ID, weights=freq, 
    which.random.slope=1:2, exclude.fixed.effect=2, link="probit", 
    nAGQ=20, random.effect.mean=FALSE, UNID=1)
summary(Varying.ICC)
# }

Run the code above in your browser using DataLab