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
- /
- Ordinal response Doubly repeated measures

Topic Options

- Subscribe to 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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-12-2016 05:03 AM

Hi,

I'm trying to setup a two variables, all with ordinal response scores, doubly repeated measures program where the two variables are evaluated in a number of animals by 3 observers for 3 times (time0=now, time1=after some time form time0, time2=after some time from time1).

It is of interest to state if there is a significant effect of time on scores for the two varables.

I tried the following code (after having read suggestions by Steve Dunham) about similar topic

```
proc glimmix data=mydata pconv=1e-6;
where variable='a';
class animal time evaluator;
nloptions maxiter=100;
model response = / s link=cumprobit dist=multinomial ddfm=kr2;
random int time /s sub=evaluator type=ar(1);
run;
```

Being unsure of correctness of the above code I kindly ask users for useful suggestions.

Fabio

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

Posted in reply to FabioMC

01-12-2016 11:09 AM

I might suggest something a little different: you need to accommodate animal as a subject as well as specifying time as a fixed effect in the model.

```
proc glimmix data=mydata pconv=1e-6;
where variable='a';
class animal time evaluator;
nloptions maxiter=100;
model response = time/ s link=cumprobit dist=multinomial ddfm=kr2;
random int /s sub=evaluator type=un(1);
```

random time /s sub=evaluator*animal type=ar(1);
run;

This assumes that the time points are equally spaced and that the evaluators are independent. The analysis is a marginal analysis. You may want to use a conditional analysis in this case, where the results are conditional on the random effects, rather than averaged over the random effects. To get that, add METHOD=LAPLACE to the PROC GLIMMIX statement.

Steve Denham

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

Posted in reply to SteveDenham

01-13-2016 06:55 AM

Dear Steve, thanks for the precious suggestions.

I have applied the syntax you suggested, but convergence was not obtained when covariance structures AR(1) and UN(1) was used.

I set both covariance structures to defaults and convergence was obtained.

What do you think about? Is there a way to get convergence applying covariance structures you suggested ?

I think that a cause of not getting convergence could the small number of animals (N=7).

Is there a significant impaiment of the model if default structures are used?

Here is the program that has worked

```
proc glimmix data=mydata pconv=1e-6;
where variable='a';
class animal time evaluator;
nloptions maxiter=100;
model response = time/ s link=cumprobit dist=multinomial ddfm=kr2;
random int /s sub=evaluator /*type=un(1)*/; random time /s sub=evaluator*animal /*type=ar(1)*/;
run;
```

Thanks again,

Fabio

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

Posted in reply to FabioMC

01-13-2016 08:50 AM

Have you tried without a structure for evaluator but with a structure for time?

Steve Denham

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

Posted in reply to SteveDenham

01-13-2016 09:09 AM

Yes, also in this case there is no convergence.

##- Please type your reply above this line. Simple formatting, no

attachments. -##

##- Please type your reply above this line. Simple formatting, no

attachments. -##

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

Posted in reply to FabioMC

01-14-2016 06:26 AM

Now I have reduced number of response categories and it works with AR(1) and UN(1) but G matrix is not positive definite

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

Posted in reply to FabioMC

01-14-2016 02:04 PM

That generally means that you have insufficient data to estimate all the parameters in the G matrix--some come up as zero. This should not deter you from the analysis, as something like 'Final Hessian is not positive definite' would.

For models that aren't converging, one thing you may want to check up on is the behavior of the objective function--if it is behaving relatively smoothly, and you still haven't converged, you might try increasing the maxiter= value, or relaxing the convergence criteria.

Steve Denham

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

Posted in reply to SteveDenham

01-15-2016 03:36 AM

```
proc glimmix data=mydata pconv=1e-6;
class variable animal time evaluator;
nloptions maxiter=100;
model response = variable | time / s link=cumprobit dist=multinomial ddfm=kr2;
random int /s sub=evaluator type=un(1); random time /s sub=evaluator*animal type=ar(1);
run;
```

Unfortunately the convergence process is not smooth but I think that the information of interest, i.e., difference between times has been obtained (and it is robust between models) with models modified by you suggestions, thanks.

A further improvement could be to analyse all the two response variables (that should be correlated) as a bivariate response; the two variables are correlated and both have multinomial response but one has 4 categories, the other 5.

I have tried a possible analysis for this with responses with each lesser number of categories (I attach the program) but there is no convergence.

Thanks for further help, Fabio

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

Posted in reply to FabioMC

01-15-2016 02:01 PM

Hi Fabio,

The attachment wasn't there, but it is generally a good idea as a last resort, when all else fails, to convert a multinomial (or a pair of multinomials) to a binomial. Have you considered using a different optimizer than the default quasi-Newton? I have had pretty good luck with the ridged Newton-Raphson method for these distributions. To get this add:

tech=nrridg

to the NLOPTIONS statement.

Steve Denham

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

Posted in reply to SteveDenham

01-18-2016 08:47 AM

Hi Steve,

If I convert to binary each of the response variables (class variable =

"variable",having levels "a" and "b") I can get convergence, even with the default

optimization algotythm.

Please I would like to know if the following syntax is correct to analyze

simultaneously (multivariate analysis) the two response variables "a" and "b", each

being a binary response variable, as said above.

Thanks once again, Fabio

```
title 'bivariate analysis with binary response variables ';
proc glimmix data=mydata;
nloptions maxiter=100 ;
class variable animal time evaluator;
model response = variable | time / s dist=binary;
random int /s sub=evaluator type=un(1);
random time /s sub=evaluator*animal type=ar(1);
lsmeans variable*time /diff;
run;
```

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

Posted in reply to FabioMC

01-22-2016 08:34 AM

I agree with this approach as the first attempt. The next step would be to figure out a way to incorporate any correlation between the levels of "variable". For an example, take a look at Joint Modeling of Binary and Count Data located here:

and adapt as needed.

(And then comes the deluge...)

Steve Denham

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

Posted in reply to SteveDenham

01-22-2016 09:00 AM

Thank You Steve, I will try to apply according your suggestions.

Fabio

Fabio