! family-transmission.mx
!
! Estimates family transmission parameters and tetrachoric correlations
! for multiple categorical variables (e.g., diagnoses in family members)
! Jointly models community control and (selected) clinical family data
! Uses Pearson-Aitken selection formula for modeling thresholds, means
! and covariance structure of selected samples as a function of control
! population parameters
! Note: basic model does not model sex differences in transmission
! parameters but expectations can be modified to permit this
#define nvar 1 ! nvar=1 for univariate case
#define maxthresh 1 ! number of thresholds (=1 for dichotomous vars)
#Ngroups 4
Grp 1: Compute Expected Correlations
Calculation
Begin Matrices;
t DI nvar nvar fr !diagonal matrix of vertical transmission paths
X ST nvar nvar !correlation matrix among latent transmissible vars
u DI nvar nvar fr !diagonal matrix of vertical untransmission paths
Y ST nvar nvar !corr matrix among latent untransmissible variables
D FU nvar nvar fr !matrix of marital assortment co-paths
H FU nvar nvar fr !residual sibling correlation (horizontal resemblance)
Z FU maxthresh 5 fr !thresholds
W FU 1 1 !weight=1/2 multiplier
End Matrices; !note: in univar case X and Y are 1
Begin Algebra;
R=t*X*t'+u*Y*u'; !within-person corr matrix
O=W@(t*X*t')+W@(t*X*t'*D*R); !offsp-parent corr matrix
S=W@(t*X*t')+W@(t*X*t'*D*t*X*t')+u*H*u'; !sibling corr matrix
M=R*D*R; !spouse corr matrix
!
A=R; !within-person correlations (=1 in univariate case)
!
B=O |O |S'|S'; !control proband-relative correlations
!
C=R |D'|O'|O'_ !control relative-relative correlations
D |R |O'|O'_
O |O |R |S'_
O |O |S |R;
End Algebra;
Matrix W
.50
Matrix t !start value for vertical transmission path
.707
Matrix u !start value for non-transmissible path
.707
Matrix D !start value for mate assortment
.00
Matrix H !start value for horizontal sibling transmission
.00
Matrix Z !start z-values for thresholds based on prevalences
1.56 1.45 1.85 1.42 1.73
End
Analysis of Marijuana (Use, Abuse, Dependence): Control Sample
Data NI=5
Labels proband father mother brother sister
Ordinal fi=contdep.dat
Matrices = Group 1
End Matrices;
!
TH Z / ! thresholds for unselected family members
CO (A | B_
B'| C) / ! correlation matrix for unselected sample
!
!SP T ! use to equate control proband and brother thresholds
!101 102 103 101 105
Opt RS
End
Analysis of Marijuana (Use, Abuse, Dependence): Selected Sample
Data NI=5
Labels proband father mother brother sister
Ordinal fi=syndep.dat
Matrices = group 1
V DI 1 1 free !selected proband variance
Q FU maxthresh 1 free !expected selected proband mean for latent var
Begin Algebra;
F=Q*A~*B; !expected selected relative means for latent var
K=Q|F; !append selected proband mean to relative means
End Algebra;
!
TH Z-K / ! mean-adjusted thresholds for selected family members
CO V | V*B_
B'*V | C-B'*(A~-A~*V*A~)*B / ! covariance matrix for selected sample
!
Matrix V
.20 !start proband variance for expected 5% selection
Matrix Q !start proband mean at expected mean for 5% selection
2.0
Opt RS
End
Grp 4: Constraint on Within-Person Rp
!Ensures t**2 + u**2 = 1.0 (u is obtained by subtraction)
Constraint NI=1
Matrices = Group 2
I ID nvar nvar
End Matrices;
Begin Algebra;
P=\v2d(\d2v(R));
End Algebra;
CO I - P / !constrains the main diagonal of P (Rp) to 1.0
END