concen {mixor} | R Documentation |
Monozygotic and dizygotic twins trouble concentrating data
data(concen)
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
Ramakrishnan V. et al (1992) Elementary methods for the analysis of dichotomous outcomes in unselected samples of twins Genetic Epidemiology 9, 273-287.
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)