lab5 - Stat 402A, HW 5 answers. General Notes: I had lots...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Stat 402A, HW 5 answers. General Notes: I had lots of questions about these problems. Some of you tried to run my SAS code with the new variable names. That didn’t give you what you needed, because the design of these studies diFered from the design in my example. ±or example, in problem 2, both sources of variability (lots and samples(lots)) are random. There is no fixed eFect (other than the implicit intercept). In general, the place to start if you have to do something like this again is to write out the sources of variability (i.e. the terms in a model) then determine which are fixed and which are random. Another common issue was to include sample(lot) in the random statement. If you write out the model (or the sources of variation in the ANOVA table), you see that the ERROR term is sample(lot). SAS includes an error by default. If you include sample(lot) in the random statement, SAS tries to estimate both and can’t. The result is a residual variance that is almost zero (e.g. 1E-6 or 1E-12) and a residual d.f. that is 0. ±inally, a common problem was to forget the $ when reading variables with character (non- numeric) information. The input statement has to be tailored to the characteristics of the data to be read. It will be diFerent for each data set. 1. Variability in hydrxoyl measurements My code for all parts: data hydroxy; infile ’hydroxy.txt’; input compound $ lab day y; proc mixed method=type3; class compound lab day; model y = compound; random lab(compound) day(lab*compound); lsmeans compound; run; proc means mean stddev stderr; /* se’s based on group-specific sd */ class compound; var y; run; proc glm; /* se’s based on pooled sd */ class compound; model y = compound;
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/27/2010 for the course STAT 402 taught by Professor Staff during the Spring '08 term at Iowa State.

Page1 / 4

lab5 - Stat 402A, HW 5 answers. General Notes: I had lots...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online