Summarizing Data Nick Martin, Hermine Maes TC21 March 2008.

Slides:



Advertisements
Similar presentations
OpenMx Frühling Rijsdijk.
Advertisements

Multivariate Twin Analysis
Summary Statistics/Simple Graphs in SAS/EXCEL/JMP.
Multilevel analysis with EQS. Castello2004 Data is datamlevel.xls, datamlevel.sav, datamlevel.ess.
1 Regression as Moment Structure. 2 Regression Equation Y =  X + v Observable Variables Y z = X Moment matrix  YY  YX  =  YX  XX Moment structure.
Bivariate analysis HGEN619 class 2007.
A. The Basic Principle We consider the multivariate extension of multiple linear regression – modeling the relationship between m responses Y 1,…,Y m and.
Statistical Methods Lynne Stokes Department of Statistical Science Lecture 7: Introduction to SAS Programming Language.
Fitting Bivariate Models October 21, 2014 Elizabeth Prom-Wormley & Hermine Maes
Elizabeth Prom-Wormley & Hermine Maes
Part 12: Asymptotics for the Regression Model 12-1/39 Econometrics I Professor William Greene Stern School of Business Department of Economics.
Contingency Tables Chapters Seven, Sixteen, and Eighteen Chapter Seven –Definition of Contingency Tables –Basic Statistics –SPSS program (Crosstabulation)
Segmentation and Fitting Using Probabilistic Methods
Multivariate distributions. The Normal distribution.
Factor analysis Caroline van Baal March 3 rd 2004, Boulder.
(Re)introduction to Mx Sarah Medland. KiwiChinese Gooseberry.
Multivariate Analysis Nick Martin, Hermine Maes TC21 March 2008 HGEN619 10/20/03.
AGC DSP AGC DSP Professor A G Constantinides© Estimation Theory We seek to determine from a set of data, a set of parameters such that their values would.
Heterogeneity Hermine Maes TC19 March Files to Copy to your Computer Faculty/hmaes/tc19/maes/heterogeneity  ozbmi.rec  ozbmi.dat  ozbmiysat(4)(5).mx.
(Re)introduction to Mx. Starting at the beginning Data preparation Mx expects 1 line per case/family Almost limitless number of families and variables.
Introduction to Linkage
Univariate Analysis in Mx Boulder, Group Structure Title Type: Data/ Calculation/ Constraint Reading Data Matrices Declaration Assigning Specifications/
Continuous heterogeneity Shaun Purcell Boulder Twin Workshop March 2004.
Multivariate Analysis Hermine Maes TC19 March 2006 HGEN619 10/20/03.
Univariate Analysis Hermine Maes TC19 March 2006.
Mx Practical TC18, 2005 Dorret Boomsma, Nick Martin, Hermine H. Maes.
Basic Mathematics for Portfolio Management. Statistics Variables x, y, z Constants a, b Observations {x n, y n |n=1,…N} Mean.
Raw data analysis S. Purcell & M. C. Neale Twin Workshop, IBG Colorado, March 2002.
Multivariate Threshold Models Specification in Mx.
Power and Sample Size Adapted from: Boulder 2004 Benjamin Neale Shaun Purcell I HAVE THE POWER!!!
Karri Silventoinen University of Helsinki Osaka University.
Karri Silventoinen University of Helsinki Osaka University.
1 Experimental Statistics - week 4 Chapter 8: 1-factor ANOVA models Using SAS.
Heterogeneity Hermine Maes TC21 March Files to Copy to your Computer Faculty/hmaes/tc19/maes/heterogeneity  ozbmi.rec  ozbmi.dat  ozbmiysat(4)(5).mx.
Univariate modeling Sarah Medland. Starting at the beginning… Data preparation – The algebra style used in Mx expects 1 line per case/family – (Almost)
Power and Sample Size Boulder 2004 Benjamin Neale Shaun Purcell.
1 An Introduction to SPSS for Windows Jie Chen Ph.D. 6/4/20161.
BUSI 6480 Lecture 8 Repeated Measures.
The importance of the “Means Model” in Mx for modeling regression and association Dorret Boomsma, Nick Martin Boulder 2008.
Combined Linkage and Association in Mx Hermine Maes Kate Morley Dorret Boomsma Nick Martin Meike Bartels Boulder 2009.
Univariate Analysis Hermine Maes TC21 March 2008.
Tutorial I: Missing Value Analysis
Mx modeling of methylation data: twin correlations [means, SD, correlation] ACE / ADE latent factor model regression [sex and age] genetic association.
Means, Thresholds and Moderation Sarah Medland – Boulder 2008 Corrected Version Thanks to Hongyan Du for pointing out the error on the regression examples.
Mx Practical TC20, 2007 Hermine H. Maes Nick Martin, Dorret Boomsma.
Frühling Rijsdijk & Kate Morley
Categorical Data Frühling Rijsdijk 1 & Caroline van Baal 2 1 IoP, London 2 Vrije Universiteit, A’dam Twin Workshop, Boulder Tuesday March 2, 2004.
Welcome  Log on using the username and password you received at registration  Copy the folder: F:/sarah/mon-morning To your H drive.
Linkage in Mx & Merlin Meike Bartels Kate Morley Hermine Maes Based on Posthuma et al., Boulder & Egmond.
QTL Mapping Using Mx Michael C Neale Virginia Institute for Psychiatric and Behavioral Genetics Virginia Commonwealth University.
IENG-385 Statistical Methods for Engineers SPSS (Statistical package for social science) LAB # 1 (An Introduction to SPSS)
March 7, 2012M. de Moor, Twin Workshop Boulder1 Copy files Go to Faculty\marleen\Boulder2012\Multivariate Copy all files to your own directory Go to Faculty\kees\Boulder2012\Multivariate.
Colorado Center for Astrodynamics Research The University of Colorado 1 STATISTICAL ORBIT DETERMINATION Statistical Interpretation of Least Squares ASEN.
Categorical Data HGEN
Boulder Colorado Workshop March
BINARY LOGISTIC REGRESSION
Intro to Mx HGEN619 class 2005.
Univariate Twin Analysis
Introduction to SPSS.
CH 5: Multivariate Methods
Heterogeneity HGEN619 class 2007.
Univariate Analysis HGEN619 class 2006.
Liability Threshold Models
Heterogeneity Danielle Dick, Hermine Maes,
(Re)introduction to Mx Sarah Medland
Amos Introduction In this tutorial, you will be briefly introduced to the student version of the SEM software known as Amos. You should download the current.
Multivariate Methods Berlin Chen
Univariate Linkage in Mx
Multivariate Methods Berlin Chen, 2005 References:
BOULDER WORKSHOP STATISTICS REVIEWED: LIKELIHOOD MODELS
Presentation transcript:

Summarizing Data Nick Martin, Hermine Maes TC21 March 2008

Files to Copy to your Computer Faculty/Maes/a21/maes/univariate  ozbmi.rec  ozbmi.dat  ozbmifysat(eqmv).mx  Data_Summary.ppt

Change Preferences Windows  Tools > Folder Options > View: Unselect! Hide extensions for known file types Mx  Job Options > Output: Select Text  Host Options > Memory: Change to  Fonts > Script Font: Courier New  To resize windows: Window >Tile

Estimating Means & Variances Any statistical package (SPSS, SAS, R)  R session on Friday By Maximum Likelihood  Height of multinormal probability density function: -|2π∑ | -n/2 e -.5((xi - µ) ∑-1 (xi - µ)’)  Raw data Make use of all available data Get unbiased estimates if missing data are missing at random

Practical Example Dataset: NH&MRC Twin Register 1981 questionnaire BMI: weight/ height squared Young cohort: years N MZFY: 534, DZFY: 328

Raw Datasetozbmi.rec fam agecat age zyg part wt1 wt2 ht1 ht2 htwt1 htwt2 bmi1 bmi2

Dat File: ozbmi.dat #include ozbmi.dat Data NInput=13  Rectangular File=ozbmi.rec  Labels fam agecat age zyg part wt1 wt2 ht1 ht2 htwt1 htwt2 bmi1 bmi2 MZFMZMDZFDZMDZFM zyg12345 YoungOld(er)SinglePair agecat12part12

Mx input script: ozbmiyfsat.mx Calls ozbmi.dat  Calls ozbmi.rec Classical Twin Study (CLT)  MZ twins reared together  DZ twins reared together  > 2 group analysis

Parameters of the model Univariate analysis  Two variables: bmi1 bmi2 MZ group  2 means, 2 variances, 1 covariance DZ group  2 means, 2 variances, 1 covariance Number of parameters: 10

! Estimate means and variances - Saturated model ! OZ BMI data - young females #NGroups 2 #define nvar2 2 Title 1: MZ data #include ozbmi.dat Select if zyg =1 Select if agecat =1 Select bmi1 bmi2 ; Begin Matrices; M Full 1 nvar2 Free X Symm nvar2 nvar2 Free End Matrices; Start 20 M M 1 nvar2 Start 1 X 1 1 X 2 2 Means M; Covariance X; Option RSiduals End Title 2: DZ data #include ozbmi.dat Select if zyg =3 Select if agecat =1 Select bmi1 bmi2 ; Begin Matrices; M Full 1 nvar2 Free X Symm nvar2 nvar2 Free End Matrices; Start 20 M M 1 nvar2 Start 1 X 1 1 X 2 2 Means M; Covariance X; Option RSiduals End ozbmiyfsat.mx Data NInput=13 Rectangular File=ozbmi.rec Labels fam agecat age zyg part wt1 wt2 ht1 ht2 htwt1 htwt2 bmi1 bmi2 Number of groups in Mx script Replace every occurrence of nvar2 with the number 2

! Estimate means and variances - Saturated model ! OZ BMI data - young females #NGroups 2 #define nvar2 2 Title 1: MZ data #include ozbmi.dat Select if zyg =1 Select if agecat =1 Select bmi1 bmi2 ; Begin Matrices; M Full 1 nvar2 Free X Symm nvar2 nvar2 Free End Matrices; Start 20 M M 1 nvar2 Start 1 X 1 1 X 2 2 Means M; Covariance X; Option RSiduals End ozbmiyfsat.mx Data NInput=13 Rectangular File=ozbmi.rec Labels fam agecat age zyg part wt1 wt2 ht1 ht2 htwt1 htwt2 bmi1 bmi2 Conditional Select Select Variables for Analysis Declare Matrices Mean Vector Covariance Matrix Start Values for Means and Variances Model Statement for Means and Variances Print Observed and Expected Means and Variances

Mx Output: ozbmiyfsat.mxo Input Mx script  Error Messages  Notes  Warnings Mx Parameter Specification  0 for fixed parameters  Non-zero distinct number for each free parameter Mx Parameter Estimates  Goodness-of-fit Statistics

Goodness-of-fit Indices Number of parametersnp10 Observed statisticsos times log-likelihood of data-2ll Degrees of freedomdf=os-np1767 Akaike’s Information CriterionAIC=-2ll-2df Bayesian Information CriterionBIC=.5(-2lnL-df*ln(N)) Sample Size Adjusted BICsaBIC=.5(-2lnL-df*ln(N+2/24)) Deviance Information CriterionDIC=.5(-2lnL-df*ln(N/2π))

Estimates for BMI yf T1T2T1T2 Saturated model meanMZ DZ covT1.73T1.77 T T

Tests Saturated model Equality of means  By birth order: m1 = m2 ?  By zygosity: m1MZ = m1DZ = m2MZ = m2DZ ? Equality of variances  By birth order: v1 = v2 ?  By zygosity: v1MZ = v1DZ = v2MZ = v2DZ ?

Equality Tests Main Script Last Group.... Option Multiple Issat End Save ozbmisat.mxs ! equate means and variances Equate M M M M Equate X X X X End Indicates to Mx that you want to fit submodels which will follow, Has to be before the End Statement of the Last Group of your Main Script Indicates that this Model is the Saturated Model Saves Script as Binary File, Including Data, Model Specification and Parameter Estimates, for easy future recall Equate Matrix Elements, specified by Matrix Name, Group Number, Row Number, Column Number

Specific Equality Tests Get ozbmisat.mxs ! equate means within zygosity groups Equate M M Equate M M End ! equate means across zygosity groups Equate M M M M End ! equate variances within zygosity groups Equate X X Equate X X End ! equate variances across zygosity groups Equate X X X X End Get Binary File, Including Data, Model Specification and Parameter Estimates, of previously saved Script Submodel, just requires Changes compared to Full Script, Must have End Statement

Multiple Fit Parameters MZ (group 1)DZ (group 2)par m1m2v1covv2m3m4v3covv4 Full Save filename.mxs: 10 free parameters10 I Get filename.mxs: back to 10 free parameters10 II III IV V

Assignment Fit saturated model and submodels  Summarize goodness-of-fit results See table below  Record parameter estimates See table below

Goodness-of-fit for BMI yf -2LLdfnpdiff chi 2 dfp saturated equate m/v equate m1=m2 equate means equate v1=v2 equate vars

Estimates for BMI yf T1T2T1T2 Saturated model meanMZDZ covT1 T2 Equated means and variances meanMZDZ covT1 T2

Goodness-of-fit for BMI yf -2LLdfnp diff chi 2 dfp saturated eq m/v eq m1=m eq means eq v1=v eq vars

Estimates for BMI yf T1T2T1T2 Saturated model meanMZ DZ covT1.73T1.77 T T Equated means and variances meanMZ21.39 DZ21.39 covT1.80T1.80 T T

Mx Filename Conventions Input Mx script: filename.mx  Part of Mx script describing data file: filename.dat  Rectangular data file: filename.rec  Ordinal data files: filename.ord Output Mx script: filename.mxo Binary Save Files: filename.mxs