Partial preview of the text
Download Optional Technical Homework - Intermediate Statistics | PSY 530 and more Assignments Statistics in PDF only on Docsity!
Optional Technical Homework Due October 15 What should you do if you want to condu at = spacing between intervals is unequal? New coefficients can be obtained that adjust for the unequal spacing but are still mutually orthogonal. The math is complicated so use a computer program You could use orthogonal trend coefficients for equally spaced observations that we have used so far in this class but might not be exact. Below is a SAS program to find orthogonal polynomials when there is unequal spacing between the levels of thé quantitative independent variable. The first example is from a study where independent samples of subjects were measured when an intervention started (0), 3, 9,12, and 18 months after an intervention. The second example is from a hypothetical dosage study with unequal intervals between dosages. The iml program is a matrix programming language in SAS. Note that orpol is the command to calculate orthogonal‘ polynomials. The first character is the name of the vector of time points. The number indicates the degree of the polynomial that you want. For the first example the orpol procedure will find the four polynomials for the data in vector t. The output of the orpol procedure is in the matrix m4. For the dosage example, the six orthogonal polynomials for vector d are put in matrix m6. The print command prints the matrices listed. proc iml; *Example from Intervention Study; t={0 3 9 12 18}; m4=orpol (t,4); print m4; *Example of unequal spacing in a Dosage Study; d={0 .15 .30 .50 .70 1.1 1.5}; m6=orpol (d, 6) ; print m6; run; The polynomials are orthogonal to each other. The sum of each squared coefficient for each trend comparison is equal to one. The linear, quadratic, cubic, and quartic orthogonal comparisons are the second, third, fourth, and fifth columns respectively. The first column corresponds to the contrast of all ones that was used to set up contrasts using the special command in SR6S. Print out of matrix call m4: Linear Quadratic Cubic Quartic 0.4472136 -0.586395 0.480658 -0.440204 0.1%69981 0.4472136 -0.376969 -0.092434 0.6847624 -0.424795 0.4472136 0.0418854 -0.536119 0.0978232 0.7079923 0.4472136 0.2513123 -0.406711 -0.538028 -0.530994 0.4472136 0.6701663 0.5546054 0.1956464 0.0707992