; Demonstration of eliminate command usage from a Mathomatic user. ; John Hopper example from the paper: ; WITTE, J.S., CARLIN, J.B., HOPPER, J.L. A likelihood approach to ; estimating twin concordance for dichotomous traits. Genetic Epidemiology ; 1999; 16: 290-304. ; Fisher information matrix for analysis of ; resemblance in disease status for pairs of relatives ; under complete ascertainment, which is needed to give ; a sampling variance for the concordance. ; ; Observed data is a tabulation of the form ; ; Both Affected One Affected None affected ; x_a pairs x_d pairs x_u pairs ; ; Probandwise concordance = 2*x_a/(2*x_a+x_d) = Pr(D in Y | D in X) ; in the original paper a,b,c,d were left unsimplified ; clear all ; restart Mathomatic P_c=2*x_a/(x_a+S) S=x_a+x_d N=x_a+x_u+x_d a= 4*N^3*(x_a+x_d)/(x_u*(2*x_a+x_d)^2) b=-N^2/x_u c=(2*x_a+x_d)^2*(1/(4*x_a)+1/x_d+1/(4*x_u)) d=1/(a*c-b^2) V=a*d ; The current equation is usually the last equation entered. eliminate repeat all ; Combine all of the above equations. simplify