turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- error when running repeat statement

Topic Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-03-2018 11:08 PM - edited 02-04-2018 07:53 AM

Hi. Following is the code I used and I got an error message when I activate "repeated" statement.

If I mute it, it runs well. Could you please tell me what is the cause for the error? Thanks in advance.

proc mixed data=a1.dissert2 empirical covtest ic;

class SLC Group SubjectID Trial1;

model GMP_syl=Trial1 SLC Group SLC*Group/solution residual;

random intercept/subject=SubjectID type=ARH(1);

/*repeated Trial1/subject=SubjectID type=ARH(1);*/

lsmeans SLC /diff slice=SLC;

contrast 'SLC1 vs SLC2' SLC 1 -1 0;

contrast 'SLC1 vs SLC3' SLC 1 0 -1;

contrast 'SLC2 vs SLC3' SLC 0 1 -1;

run;

Accepted Solutions

Solution

02-06-2018
10:16 AM

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to nlpurumi

02-05-2018 06:48 PM

The Littell et al. text is not a one-day project I'm looking forward to the next version.

Yes, I saw your message and then when I looked again, it was gone. Odd.

GLIMMIX offers all the same covariance structures as does MIXED, except for the Kronecker products. And GLIMMIX has a few more than MIXED. GLIMMIX also provides the option of sandwich estimators ("empirical"), including modifications that perform better with small samples that are not available in MIXED. In my opinion, with few exceptions, GLIMMIX is a better tool than MIXED; I rarely use MIXED anymore.

The empirical options does not work at all well for analysis of this data set. According to an old paper by Walt Stroup (and other sources):

"This approach assumes that the number of subjects per treatment is substantially greater than the number of times of observation. When the number of observation times is equal to or greater than the number of subjects per treatment, as often happens in agricultural experiments, the empirical estimate of Var(K'b) may actually be less than the model-based estimate and the resulting test-statistics may be wildly inflated."

Using ddfm=kr2 works much better. Try both and see. (In GLIMMIX, empirical=mbn works well, too, but not the classic empirical.)

You need to specify the existence of 48 subjects rather than 24, which you can do by specifying subject=subjectid(group) rather than subject=subjectid

If the response *mean* could theoretically change with levels of Trial1, then Trial1 needs to be included as a fixed effect in the MODEL statement.

Here is what I would consider as a first pass, not necessarily final:

```
/* Import data from CSV */
PROC IMPORT OUT= WORK.dissertation
DATAFILE= "Dissertation.csv"
DBMS=CSV REPLACE;
GETNAMES=YES;
DATAROW=2;
RUN;
/* Delete unfilled columns and unfilled rows */
data dissertation;
set dissertation;
drop var20-var56;
where whole_1st= 1;
run;
/* Variable transformation */
data dissertation;
set dissertation;
gmp_syl_log = log(gmp_syl);
gmp_syl_sqrt = sqrt(gmp_syl);
run;
title1 "Coding check";
proc freq data=dissertation;
table group subjectid slc block trial1;
run;
title1 "Pattern of observations";
proc tabulate data=dissertation(where=(gmp_syl ne .));
class group subjectid slc trial1 block;
table group*subjectid, slc*trial1 / misstext="X";
run;
proc sort data=dissertation;
by group subjectid slc trial1;
run;
title1 "Observed data";
proc sgpanel data=dissertation noautolegend;
panelby slc group / columns=2;
series x=trial1 y=gmp_syl / group=subjectid markers;
run;
title1 "Observed data, log scale";
proc sgpanel data=dissertation noautolegend;
panelby slc group / columns=2;
series x=trial1 y=gmp_syl_log / group=subjectid markers;
run;
proc sgpanel data=dissertation;
panelby group subjectid / columns=6;
series x=trial1 y=gmp_syl_log / group=slc markers;
run;
title1 "AR(1) among TRIAL1 levels using MIXED";
proc mixed data=dissertation covtest ;*plots=all;
class group subjectid slc trial1;
model gmp_syl_log = group|slc|trial1 / ddfm=kr2;
random intercept / subject=subjectid(group);
repeated trial1 / subject=slc*subjectid(group) type=ar(1);
lsmeans trial1 / diff adjust=simulate(seed=98375);
lsmeans group*slc ;
run;
title1 "AR(1) among TRIAL1 levels using GLIMMIX";
proc glimmix data=dissertation plots=(studentpanel boxplot(fixed student));
class group subjectid slc trial1;
model gmp_syl_log = group|slc|trial1 / ddfm=kr2;
random intercept / subject=subjectid(group);
random trial1 / subject=slc*subjectid(group) type=ar(1) residual;
lsmeans trial1 / diff adjust=simulate(seed=98375) lines;
lsmeans group*slc / plot=meanplot(sliceby=group join cl);
lsmestimate group*slc "Group effect: SLC 1 v 2" 1 -1 0 -1 1 0,
"Group effect: SLC 1 v 3" 1 0 -1 -1 0 1,
"Group effect: SLC 2 v 3" 0 1 -1 0-1 1
/ adjust=simulate(seed=29847);
run;
```

This model has three hierarchical design levels: Subject (assigned randomly to Group), Session within Subject (assigned--not randomly--to SLC), and RepeatedMeasure nested within Session within Subject (assigned--not randomly--to Trial1).

gmp_syl is strongly skewed, but also appears to have an upper bound that plays a bit of havoc with the distribution. I do not know how this variable was obtained, but this upper bound is something to consider.

On the log-transformed scale, there is no substantial evidence of heteroscedasticity.

AR(1) was “best” relative to CS, ARH(1), AR(1)+RE, AR(1) by SLC, TOEP based on AICc.

I show code for both MIXED and GLIMMIX (which has some nice features that are not available in MIXED).

Feel free to ask questions after you have studied the syntax, consulted the documentation and the Littell et al. text, and such.

Have fun!

All Replies

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to nlpurumi

02-04-2018 02:44 PM

We don't have much to go on here. If you provide either your dataset or an example dataset that produces the same problem , plus a description of your experimental design, then we might be able to help.

Please provide your dataset in a format that is not Excel, or see How to create a data step version of your data

You don't need to specify type=arh(1) for the first random statement. Subjects are independent, and only one variance will be estimated.

If I was guessing about why the model failed, then I would suspect that you don't have enough data to support estimate of the ARH(1) structure, which attempts to estimate a variance for each level of TRIAL1. If the rest of your code is correct, try simpler TYPEs.

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-04-2018 03:16 PM

Hi. Thanks for your advice.

I changed my code to this and there was no error message, but still the result did not print. Could you please advise me one more time?

Also, I don't know how to upload the SAS datset, this webpage seems not uploading the file.

Thanks in advance.

proc mixed data=a1.dissertation2 empirical covtest ic;

class SLC Group SubjectID Trial1;

model GMP_syl=SLC Group SLC*Group/solution residual;

random intercept/subject=SubjectID;

repeated Trial1/subject=SubjectID type=ARH(1);

lsmeans SLC /diff slice=SLC;

contrast 'SLC1 vs SLC2' SLC 1 -1 0;

contrast 'SLC1 vs SLC3' SLC 1 0 -1;

contrast 'SLC2 vs SLC3' SLC 0 1 -1;

run;

Result:

SAS Output

The SAS System |

The Mixed Procedure

Model InformationData SetDependent VariableCovariance StructuresSubject EffectsEstimation MethodResidual Variance MethodFixed Effects SE MethodDegrees of Freedom Method

A1.DISSERTATION2 |

GMP_Syl |

Variance Components, Heterogeneous Autoregressive |

SubjectID, SubjectID |

REML |

None |

Empirical |

Containment |

Class Level InformationClass Levels ValuesSLCGroupSubjectIDTrial1

3 | 1 2 3 |

2 | 1 2 |

24 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |

10 | 1 2 3 4 5 6 7 8 9 10 |

DimensionsCovariance ParametersColumns in XColumns in Z per SubjectSubjectsMax Obs per Subject

12 |

12 |

1 |

24 |

60 |

Number of ObservationsNumber of Observations ReadNumber of Observations UsedNumber of Observations Not Used

1440 |

1317 |

123 |

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to nlpurumi

02-04-2018 04:13 PM

It looks like your data set has not been imported correctly. Note that in the "Class level information" table, the variable names (in the first column of the table) are "3", "2", "24", and "10", rather than "SLC", "Group", "SubjectID", and "Trial1". You'll need to fix that first.

Be sure to check the log for NOTEs, WARNINGs, and ERRORs. With this sort of import problem, surely some message about your attempt to run code would show up in the log.

The link I included to the dataset upload process works for me. You should be able to just click on it, if you have access through your internet provider. If it continues to not work for you, then you can attach your dataset as a text file. If you still have trouble with import, then you'll need to include that code as well.

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-04-2018 04:17 PM

It did actually import pretty well. I could not copy paste the exact screen I saw in SAS.

Here I am attaching the screen shot again.

Please let me know if you still think the data was not imported correctly.

Thanks.

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to nlpurumi

02-04-2018 04:34 PM - edited 02-04-2018 04:52 PM

Yes, you're right, it does look fine. Pasting the output into the message does not format well.

You are *still* using TYPE=ARH(1) in the REPEATED statement. Try something simpler. ARH(1) estimates a variance for each level of Trial1 (of which there are 10), and you do not have enough subjects (n=24) to estimate all the parameters specified by the model.

Edit: Or it is still possible that your model is not specified correctly. For example, I suspect that you have 24 x 3 x 2 = 1440 subjects, but the syntax you are using, given the way you have coded the variable levels, tells the procedure that you have only 24. But you have not described the experimental design, so I am just guessing.

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-04-2018 05:35 PM - edited 02-04-2018 05:49 PM

Thanks for your advice. I have 24 subjects in each group and there are two groups. So there are 48 participants altogether.

The SLC has three levels of experimental conditions each participant participated. Each participants attempt each task ten times in each SLC condition. These ten trials were indicated by the variable name "Trial1".

I had to go with ARH (1) because homoscedasticity assumption did not meet.

Does this explanation help you help me better?

Also, I wonder if I can email you my dataset and my codes from importing dataset to testing assumptions.

Thanks in advance for your help.

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to nlpurumi

02-04-2018 06:50 PM

Thank you for the additional information. Were the SLC levels applied in the same order to each participant?

First try attaching the data as a csv file, in case anyone else wants to participate.

For mixed models in SAS, SAS for Mixed Models, 2nd ed is an invaluable resource; an updated version ( SAS® for Mixed Models: An Introduction) is supposed to be released soon. If you run mixed models, you will benefit from reading it.

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-05-2018 08:09 AM - edited 02-13-2018 09:08 PM

Thanks for your information. I am reading the book, but if anyone can help me that will be great, too!

Somehow my reply yesterday was not saved so I am writing again.

Yes, although the order of stimuli presentation was randomized, the order was pre-determined and every participant underwent the same tasks in the same order.

Also, I am attaching my data file with the codes.

The additional question I have is whether I need to stick to proc mixed with empirical statement because proc glimmix does not provide complicated covariance structure when homoscedasticity assumption does not meet. Thanks for your further advice in advance.

libname a1 'C:\Data Analysis\Experimental Results\SAS';

proc import datafile="C:\Data Analysis\Experimental Results\SAS\dissertation.csv"

out=a1.Dissertation

dbms=csv

replace;

run;

data a1.dissertation1;

set a1.dissertation;

where Whole_1st=1;

run;

proc mixed data=a1.dissertation1 ic;

class SubjectID SLC Group Trial1;

model GMP_syl= Trial1/solution;

random intercept Trial1/sub=SubjectID;

run;

proc sort data=a1.dissertation1 out=a1.dissertation2;

by SLC Group;

run;

proc mixed data=a1.dissertation2 ic;

class SubjectID SLC Group Trial1;

model GMP_syl= Trial1 /solution outp=R;

random intercept Trial1/sub=SubjectID;

run;

data R1; set R;

absr=ABS(RESID);

run;

proc glm data=R1;

class SLC Group;

model ABSR=;

run;

proc mixed data=a1.dissertation2 covtest method=ml ;

class SLC Group SubjectID Trial1;

model GMP_syl=SLC Group SLC*Group/solution outp=R;

random intercept Trial1/subject=SubjectID type=ARH(1);

run;

proc mixed data=a1.dissertation2 covtest method=ml ;

class SLC Group SubjectID Trial1;

model GMP_syl=SLC Group SLC*Group/solution outp=R;

random intercept Trial1/subject=SubjectID type=CSH;

run;

ods graphics on;

proc univariate data=R normal;

BY SLC Group;

var Resid;

histogram / normal

ctext = blue;

run;

proc mixed data=a1.dissertation2 empirical covtest ic;

class SLC Group SubjectID Trial1;

model GMP_syl=SLC Group SLC*Group/solution ddfm=bw outp=R;

random intercept Trial1/type=ARH(1) subject=SubjectID g;

run;

proc mixed data=a1.dissertation2 empirical covtest ic;

class SLC Group SubjectID Trial1;

model GMP_syl=SLC Group SLC*Group/solution residual;

random intercept/subject=SubjectID solution;

repeated Trial1/subject=SubjectID type=ARH(1);

lsmeans SLC /diff slice=SLC;

contrast 'SLC1 vs SLC2' SLC 1 -1 0;

contrast 'SLC1 vs SLC3' SLC 1 0 -1;

contrast 'SLC2 vs SLC3' SLC 0 1 -1;

run;

proc glimmix data=a1.dissertation2;

class SLC Group SubjectID Trial1;

model GMP_syl=SLC Group SLC*Group/dist=gamma;

random intercept /subject=SubjectID;

run;

Solution

02-06-2018
10:16 AM

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to nlpurumi

02-05-2018 06:48 PM

The Littell et al. text is not a one-day project I'm looking forward to the next version.

Yes, I saw your message and then when I looked again, it was gone. Odd.

GLIMMIX offers all the same covariance structures as does MIXED, except for the Kronecker products. And GLIMMIX has a few more than MIXED. GLIMMIX also provides the option of sandwich estimators ("empirical"), including modifications that perform better with small samples that are not available in MIXED. In my opinion, with few exceptions, GLIMMIX is a better tool than MIXED; I rarely use MIXED anymore.

The empirical options does not work at all well for analysis of this data set. According to an old paper by Walt Stroup (and other sources):

"This approach assumes that the number of subjects per treatment is substantially greater than the number of times of observation. When the number of observation times is equal to or greater than the number of subjects per treatment, as often happens in agricultural experiments, the empirical estimate of Var(K'b) may actually be less than the model-based estimate and the resulting test-statistics may be wildly inflated."

Using ddfm=kr2 works much better. Try both and see. (In GLIMMIX, empirical=mbn works well, too, but not the classic empirical.)

You need to specify the existence of 48 subjects rather than 24, which you can do by specifying subject=subjectid(group) rather than subject=subjectid

If the response *mean* could theoretically change with levels of Trial1, then Trial1 needs to be included as a fixed effect in the MODEL statement.

Here is what I would consider as a first pass, not necessarily final:

```
/* Import data from CSV */
PROC IMPORT OUT= WORK.dissertation
DATAFILE= "Dissertation.csv"
DBMS=CSV REPLACE;
GETNAMES=YES;
DATAROW=2;
RUN;
/* Delete unfilled columns and unfilled rows */
data dissertation;
set dissertation;
drop var20-var56;
where whole_1st= 1;
run;
/* Variable transformation */
data dissertation;
set dissertation;
gmp_syl_log = log(gmp_syl);
gmp_syl_sqrt = sqrt(gmp_syl);
run;
title1 "Coding check";
proc freq data=dissertation;
table group subjectid slc block trial1;
run;
title1 "Pattern of observations";
proc tabulate data=dissertation(where=(gmp_syl ne .));
class group subjectid slc trial1 block;
table group*subjectid, slc*trial1 / misstext="X";
run;
proc sort data=dissertation;
by group subjectid slc trial1;
run;
title1 "Observed data";
proc sgpanel data=dissertation noautolegend;
panelby slc group / columns=2;
series x=trial1 y=gmp_syl / group=subjectid markers;
run;
title1 "Observed data, log scale";
proc sgpanel data=dissertation noautolegend;
panelby slc group / columns=2;
series x=trial1 y=gmp_syl_log / group=subjectid markers;
run;
proc sgpanel data=dissertation;
panelby group subjectid / columns=6;
series x=trial1 y=gmp_syl_log / group=slc markers;
run;
title1 "AR(1) among TRIAL1 levels using MIXED";
proc mixed data=dissertation covtest ;*plots=all;
class group subjectid slc trial1;
model gmp_syl_log = group|slc|trial1 / ddfm=kr2;
random intercept / subject=subjectid(group);
repeated trial1 / subject=slc*subjectid(group) type=ar(1);
lsmeans trial1 / diff adjust=simulate(seed=98375);
lsmeans group*slc ;
run;
title1 "AR(1) among TRIAL1 levels using GLIMMIX";
proc glimmix data=dissertation plots=(studentpanel boxplot(fixed student));
class group subjectid slc trial1;
model gmp_syl_log = group|slc|trial1 / ddfm=kr2;
random intercept / subject=subjectid(group);
random trial1 / subject=slc*subjectid(group) type=ar(1) residual;
lsmeans trial1 / diff adjust=simulate(seed=98375) lines;
lsmeans group*slc / plot=meanplot(sliceby=group join cl);
lsmestimate group*slc "Group effect: SLC 1 v 2" 1 -1 0 -1 1 0,
"Group effect: SLC 1 v 3" 1 0 -1 -1 0 1,
"Group effect: SLC 2 v 3" 0 1 -1 0-1 1
/ adjust=simulate(seed=29847);
run;
```

This model has three hierarchical design levels: Subject (assigned randomly to Group), Session within Subject (assigned--not randomly--to SLC), and RepeatedMeasure nested within Session within Subject (assigned--not randomly--to Trial1).

gmp_syl is strongly skewed, but also appears to have an upper bound that plays a bit of havoc with the distribution. I do not know how this variable was obtained, but this upper bound is something to consider.

On the log-transformed scale, there is no substantial evidence of heteroscedasticity.

AR(1) was “best” relative to CS, ARH(1), AR(1)+RE, AR(1) by SLC, TOEP based on AICc.

I show code for both MIXED and GLIMMIX (which has some nice features that are not available in MIXED).

Feel free to ask questions after you have studied the syntax, consulted the documentation and the Littell et al. text, and such.

Have fun!

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-05-2018 07:51 PM

This paper is a good resource for different covariance structures.

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-05-2018 11:46 PM - edited 02-06-2018 10:26 AM

Thanks a lot for your help. I am surprised by the level of help I can get from this SAS community. Thank you!

I have a few questions regarding the codes you provided.

1. I understood that you chose AR(1) after transforming the data by log. However, I don't see any code to test normality/homoscedasticity assumption except you included codes to observe the distribution of the data. I wonder how you test (or code) it. Or do you think I can use the same codes I used to test these two assumptions?

2. I see many places where it says "98375." Where is this number coming from?

3. In the second to the last commands where it starts with "proc mixed" I wonder if I can include "group*slc" next to your code in the model statement to check interaction effect. Or is the vertical line that divides independent variables already include meaning of any possible interactions among these variables?

4. In this proc mixed command, I do not see the empirical statement.

As far as I know, if errors in your data is not normally distributed, you have to use "empirical" statement to accommodate it.

Do I not need it because it is normally distributed after the log tranformation??

After writing above question, I read your explanation about why my data does not meet the requirement for empirical statement.

You cited that "this approach assumes that the number of subjects per treatment is substantially greater than the number of times of observation. When the number of observation times is equal to or greater than the number of subjects per treatment, as often happens in agricultural experiments, the empirical estimate of Var(K'b) may actually be less than the model-based estimate and the resulting test-statistics may be wildly inflated."

However, now I am curious isn't my data number of subject (24 for each group) exceeds the number of observation (10 for each condition)? Or is the degree too small?

Or is this citation talking about the size of number of subject (48 altogether) and the number of observation at the whole study level (30*48=1440)?

When you mentioned to use "ddfm=kr2", does it mean to replace empirical statement in proc mixed?

When you said, "you need to specify the existence of 48 subjects rather than 24, which you can do by specifying subject=subjectid(group) rather than subject=subjectid.", do you mean when I try to replace "empirical statement" to "ddfm=kr2"?

If the response *mean* could theoretically change with levels of Trial1, then Trial1 needs to be included as a fixed effect in the MODEL statement. --> Thanks for your advice! I see that you included them after model in both proc mixed and proc glimmix.

5. I see that glimmix provides really neat results. When I try to justify the reason for going with glimmix, I wonder if I can describe my study following the flow chart of CH1 in Littell, et al. (2006). How do you view my design?

Response:

Non-normal

Errors: Correlated

Random Effects:

Yes

Non-linearity:

None

Tool in SAS/STAT:

Glimmix

6. Regarding the levels of the design: I view a little differently from yours, and I wonder if it will change any of the SAS codes.

Subject (was not assigned randomly to Group, native English vs. native Mandarin speakers), Session within Subject (assigned--not randomly--to SLC), and RepeatedMeasure nested within Session within Subject (assigned--not randomly--to Trial1).

Could you please help me to answer above questions further?

Thanks so much again!

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to nlpurumi

02-06-2018 12:10 PM

I'm glad you've found it useful.

(1) I rarely use formal tests to assess normality and homogeneity of variance, relying instead on graphical assessments of residuals (and lots of analysis experience). Many (even most?) of my applied stat colleagues take the same approach.

(2) I made it up. It is the seed for a random number generator used in the simulate method. Read the documentation for the LSMEANS statement in MIXED (or GLIMMIX) and GLM.

(3) If you run the code, you'll see that interaction in the results. " | " is an expansion operator. Read Specification of Effects

(4) No, the empirical estimate has nothing to do with whether the data follow a normal distribution.

The empirical estimate and the Kenward-Rogers method are two different approaches to reducing the bias of standard errors. Read the Stroup paper I linked to in a previous message. You use one or the other; you cannot use both at the same time.

Your sample size is too small for the classic empirical estimate to work. I've seen references stating that you need 2 orders of magnitude more observations than times.

No, specification of subject=<> has nothing to do with empirical or KR. It has everything to do with correctly specifying your experimental design. You have 48 subjects, but you have coded them 1, ..., 24 within each of two groups. If you use "subject=subjectid" then you have told the procedure that you have *only 24 subjects* which is not correct. To fix that, you could either recode subjectid to have 48 unique values, or you can use "subject=subjectid(group)"; the latter approach works better with the estimation of denominator degrees of freedom and is algorithmically more efficient. Keep reading Littell et al.

(5) Using GLIMMIX requires no more justification than using MIXED. GLIMMIX is capable of accommodating data with distributions other than normal, but it does normal as well and generally duplicates exactly what you would get for the same model using MIXED.

(6) Ideally levels of an experimental factor are randomly assigned to experimental units, but in practice that often is impossible (for example, gender or time or your "group"). Typically we don't fret about that (we "pretend" that we have random assignment), but it is important to keep in mind that random assignment minimizes bias, and that lack of random assignment may induce bias that needs to be considered in interpretation of results. I do not see that the model needs to be adjusted.

The statistical model required for the analysis of this study is fairly complicated, and certainly more complicated than you were and are prepared for. Keep reading! Then read more! Take a class, either in person or online (e.g., https://onlinecourses.science.psu.edu/stat502/). And if you are at a university, see whether you can find a statistician to consult with. It's a lot easier across a table than across the internet.

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-06-2018 12:33 PM

Thank you! Yes, I will continue to study about SAS.

Thanks so much!

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-06-2018 11:31 PM - edited 02-07-2018 10:56 AM

Could you please explain me what this one line means? There is not enough explanation in the proc mixed manual except that it says, "ADJUST=SIMULATE< (sim-options) >".

lsmeans trial1 / diff adjust=simulate(seed=98375);

Thanks in advance!