Repeated Measures Analysis: An Example Math tools: Notation

Slides:



Advertisements
Similar presentations
Overview of Lecture Partitioning Evaluating the Null Hypothesis ANOVA
Advertisements

Applied Informatics Štefan BEREŽNÝ
1 G Lect 4M Interpreting multiple regression weights: suppression and spuriousness. Partial and semi-partial correlations Multiple regression in.
Matrix Algebra Matrix algebra is a means of expressing large numbers of calculations made upon ordered sets of numbers. Often referred to as Linear Algebra.
Matrix Algebra Matrix algebra is a means of expressing large numbers of calculations made upon ordered sets of numbers. Often referred to as Linear Algebra.
1 G Lect 14b G Lecture 14b Within subjects contrasts Types of Within-subject contrasts Individual vs pooled contrasts Example Between subject.
3_3 An Useful Overview of Matrix Algebra
MF-852 Financial Econometrics
Review of Matrix Algebra
Basic Mathematics for Portfolio Management. Statistics Variables x, y, z Constants a, b Observations {x n, y n |n=1,…N} Mean.
Analysis of Variance & Multivariate Analysis of Variance
Linear regression models in matrix terms. The regression function in matrix terms.
Matrices and Determinants
Intro to Matrices Don’t be scared….
MATRICES. Matrices A matrix is a rectangular array of objects (usually numbers) arranged in m horizontal rows and n vertical columns. A matrix with m.
Multivariate Data and Matrix Algebra Review BMTRY 726 Spring 2012.
1 Statistical Analysis Professor Lynne Stokes Department of Statistical Science Lecture 5QF Introduction to Vector and Matrix Operations Needed for the.
Row 1 Row 2 Row 3 Row m Column 1Column 2Column 3 Column 4.
ECON 1150 Matrix Operations Special Matrices
Systems of Linear Equation and Matrices
Some matrix stuff.
Statistics and Linear Algebra (the real thing). Vector A vector is a rectangular arrangement of number in several rows and one column. A vector is denoted.
1 G Lect 3b G Lecture 3b Why are means and variances so useful? Recap of random variables and expectations with examples Further consideration.
Overview Definitions Basic matrix operations (+, -, x) Determinants and inverses.
1 C ollege A lgebra Systems and Matrices (Chapter5) 1.
1 G Lect 4a G Lecture 4a f(X) of special interest: Normal Distribution Are These Random Variables Normally Distributed? Probability Statements.
Testing Hypotheses about Differences among Several Means.
Repeated Measurements Analysis. Repeated Measures Analysis of Variance Situations in which biologists would make repeated measurements on same individual.
Multivariate Statistics Matrix Algebra I W. M. van der Veld University of Amsterdam.
1 G Lect 14a G Lecture 14a Examples of repeated measures A simple example: One group measured twice The general mixed model Independence.
A Review of Some Fundamental Mathematical and Statistical Concepts UnB Mestrado em Ciências Contábeis Prof. Otávio Medeiros, MSc, PhD.
1 G Lect 2M Examples of Correlation Random variables and manipulated variables Thinking about joint distributions Thinking about marginal distributions:
1 G Lect 2w Review of expectations Conditional distributions Regression line Marginal and conditional distributions G Multiple Regression.
Prepared by Deluar Jahan Moloy Lecturer Northern University Bangladesh
Chapter 6 Systems of Linear Equations and Matrices Sections 6.3 – 6.5.
Special Topic: Matrix Algebra and the ANOVA Matrix properties Types of matrices Matrix operations Matrix algebra in Excel Regression using matrices ANOVA.
Hypothesis test flow chart frequency data Measurement scale number of variables 1 basic χ 2 test (19.5) Table I χ 2 test for independence (19.9) Table.
MATRIX A set of numbers arranged in rows and columns enclosed in round or square brackets is called a matrix. The order of a matrix gives the number of.
1 G Lect 4W Multiple regression in matrix terms Exploring Regression Examples G Multiple Regression Week 4 (Wednesday)
If A and B are both m × n matrices then the sum of A and B, denoted A + B, is a matrix obtained by adding corresponding elements of A and B. add these.
MATRICES A rectangular arrangement of elements is called matrix. Types of matrices: Null matrix: A matrix whose all elements are zero is called a null.
Linear Algebra by Dr. Shorouk Ossama.
Matrices Introduction.
MTH108 Business Math I Lecture 20.
MAT 322: LINEAR ALGEBRA.
Linear Algebra Review.
7.1 Matrices, Vectors: Addition and Scalar Multiplication
Properties and Applications of Matrices
Boyce/DiPrima 10th ed, Ch 7.2: Review of Matrices Elementary Differential Equations and Boundary Value Problems, 10th edition, by William E. Boyce and.
Matrices.
Matrices Rules & Operations.
Linear Algebra Lecture 2.
G Lecture 2 Regression as paths and covariance structure
Review Guess the correlation
MATHEMATICS Matrix Algebra
MATHEMATICS Matrix Multiplication
L6 matrix operations.
POSC 202A: Lecture Lecture: Substantive Significance, Relationship between Variables 1.
Dr Huw Owens Room B44 Sackville Street Building Telephone Number 65891
Matrices Introduction.
Matrices and Matrix Operations
Psych 231: Research Methods in Psychology
Psych 231: Research Methods in Psychology
Psych 231: Research Methods in Psychology
Psych 231: Research Methods in Psychology
Matrix Algebra.
Psych 231: Research Methods in Psychology
Psych 231: Research Methods in Psychology
Psych 231: Research Methods in Psychology
Matrices and Determinants
Presentation transcript:

G89.2247 Lecture 2 www.psych.nyu.edu/couples/G2247 Repeated Measures Analysis: An Example Math tools: Notation Expectations Matrix operations ANOVA approaches Example Revisited G89.2247 Lecture 2

Repeated Measures Analysis: An Example 68 persons preparing for the bar exam provided information about anxiety in the month prior to the exam We calculated for each person four weekly POMS anxiety scores Here is a summary of the results that does not take advantage of the repeated measures. G89.2247 Lecture 2

A one sample test of change (2 time points) Could the scores from week 4 differ from those in week 3 simply by sampling fluctuations? One sample (paired) t test problem Call Time 4, Y4 and Time 3, Y3 Formal Statement Let D = Y4-Y3 H0 : Compare the sample mean of D with the standard error of D. Under usual assumptions, the ratio is distributed as a t statistic. G89.2247 Lecture 2

Practical Computation Means, (SD, SE) Sample of 68 respondents T3 = 1.658 (.888, .108) T4 = 1.979 (.897, .109) D = 0.321 (.493, .060) "Paired" or "One sample" t test t(df=67) = (.321/.060) = 5.35 Under the null hypothesis that the true mean difference is zero, this value of t is very unusual. We "reject H0 " and conclude that on the average, true change occurred. G89.2247 Lecture 2

A two sample comparison of change A comparison group with no upcoming exam G89.2247 Lecture 2

A two sample comparison of change One could ask whether merely filling our a daily diary makes one more sensitive to moods, and perhaps induces change A comparison group was recruited via paper and e-mail postings, and couples were recruited. Complete data were available for 67 persons One can compare the two trajectories G89.2247 Lecture 2

A two sample comparison of change Formal analysis might ask: Do the groups differ in their average anxiety? On the average, across groups, is there an effect of time? Does the effect of time vary across the two groups? Choices of analysis include Mixed model ANOVA (groups, time fixed, persons within groups random) Contrast-based trajectory ANOVA Multivariate ANOVA G89.2247 Lecture 2

Some notation We need to keep track of which anxiety scores come from different persons and times, and which persons come from different groups Different texts use different notation We will include a glossary in each lecture Diggle, Liang and Zeger Yhij h is group, ranging from 1 to g (g=2 here) i is individual, ranging from 1 to mh (m1=68, m2=67) j is time, ranging from 1 to n (n=4 here) G89.2247 Lecture 2

Math tools: Expectations Yhij is a random variable It is often useful to think about the distribution of random variables before we collect data A Random Variable can be thought to be a blank cell in a spreadsheet, waiting for an observation The numbers that go there have a distribution Lower and upper values Expected average Expected variability G89.2247 Lecture 2

Rules for Expectation operators E(X)=mx is the first moment, the mean Let k represent some constant number (not random) E(k*X) = k*E(X) = k*mx E(X+k) = E(X)+k = mx+k Let Y represent another random variable (perhaps related to X) E(X+Y) = E(X)+E(Y) = mx + my E(X-Y) = E(X)-E(Y) = mx - my Putting these together E(`X) = E[(X1+X2)/2] =(m1 + m2)/2 = m The expected value of the average of two random variables is the average of their means. G89.2247 Lecture 2

Variance Expectations E[(X-mx)2] = V(X) = sx2 Let k represent some constant number (not random) V(k*X) = k2*V(X) = k2*sx2 V(X+k) = V(X) = sx2 Let Y represent another random variable that is independent of X V(X+Y) = V(X)+V(Y) = sx2 + sy2 V(X-Y) = V(X)+V(Y) = sx2 + sy2 More generally, let Y and X be two random variables with known covariance, Cov(X,Y) = E[(X-mx)(Y-my)] = sx sy rxy V(aX+bY) = a2 V(X)+b2 V(Y) + 2ab Cov(X,Y) = a2 sx2 +b2 sy2 + 2ab sx sy rxy G89.2247 Lecture 2

Numerical Example Means, Var and SD in Sample of 68 examinees Y1•3 = 1.658, .789, .888 Y1•4 = 1.979, .805, .897 If I added 10 to each POMS score the results would be Y1•3 = 11.658, .789, .888 Y1•4 = 11.979, .805, .897 If, instead, I multiplied each score by 10, the results would be Y1•3 = 16.58, 78.9, 8.88 Y1•4 = 19.79, 80.5, 8.97 G89.2247 Lecture 2

Math tools: Vectors and Matrices With multiple time points, and multiple persons, the notation can get cumbersome It is often convenient to use lists of numbers for each person (or each variable) Lists are called vectors Lists of vectors are arrays called matrices E.g. G89.2247 Lecture 2

Vector definition & operations Definition: A vector is an ordered list of numbers: aT = [a1 a2 ... ap] Transpose If a is a vector with p elements in a column, then aT is a vector with the same elements arranged in a row. Vector Addition If a and b are two vectors with p elements, (ai, bi), then a+b is a new vector with elements given the the respective element sums. [a+b]i = [ai + bi] G89.2247 Lecture 2

Vector Operations, Continued Vector Multiplication If a and b are two vectors with p elements, (ai, bi) then aTb = S aibi = a1b1+a2b2+... + apbp Example aT = [0 0 –1 1] Y = [Y1 Y2 Y3 Y4] Then, aTY = Y4 – Y3 This is an example of a contrast vector G89.2247 Lecture 2

Matrix operations Matrix definitions Matrix Addition A matrix can be viewed as a collection of vectors E.g.. a data matrix is made up of n rows of p variables The transpose of a matrix makes rows columns and vice versa Matrix Addition [A+B]ij = [aij + bij] Matrix Subtraction [A-B]ij = [aij - bij] G89.2247 Lecture 2

Matrix Multiplication An Identity matrix, I, is a square matrix with ones on the diagonal and zeros on the off diagonal A*I = A If a matrix A is square and full rank (nonsingular), then its inverse A-1 exists such that A*A-1 = I G89.2247 Lecture 2

Some facts about matrix multiplication In general, AB ~= BA Commutative principle does not hold When A and B are square and full rank (A*B)-1 = B-1*A-1 Distributive principle holds A(B+C) = AB + AC A matrix A can be multiplied by a single number, called a scalar, which sets the unit of the new matrix: kA = [kAij] G89.2247 Lecture 2

Return to Repeated Measures We have two groups, each with its own profile of scores over the four time points. G89.2247 Lecture 2

Two Group Problem Perhaps the groups differ only because of chance sampling fluctuations This null hypothesis is multivariate Multivariate tests can be used to provide an omnibus assessment of the null hypothesis The test does not take into account the ordering of the variables Corresponding univariate results describe group differences for each time point G89.2247 Lecture 2

Transformed Multivariate Problem Just as we looked at the difference between times 3 and 4 in the first example, we can consider contrasts of all four time points that reflect the change process Traditionally, we transform into so-called polynomial trends Constant Linear Quadratic Cubic G89.2247 Lecture 2

Transformed Problem The transformed variables are just difference scores We can now ask whether the groups differ in Constant Linear Quadratic Cubic We can also ask a new multivariate question: Do the groups differ in the pattern of change over time? This omnibus test combines linear, quadratic and cubic variables in a new test G89.2247 Lecture 2

Mixed Model Approach All of the approaches so far considered subject as the unit of analysis Error degrees of freedom were functions of 68+67=135 observations Another approach combines the repeated measure information with the between subject information An important issue is how the nonindependence of the data is taken into account G89.2247 Lecture 2

The Mixed Model We consider the model where m is the overall mean b is the group effect a is the time effect g is the time by group effect U is the effect of random subject I in group h Z is the random residual We assume the residuals are independent! G89.2247 Lecture 2