BookmarkSubscribeRSS Feed
lcw68
Calcite | Level 5

I am totally stucked in this problem. I am trying to fit a joint continuous and ordinal model using proc nlmixed, and I tried lots of times it always shows " ERROR: No valid parameter points were found." I have tried different starting values, shrinking the number of parameters, even tried to simulate simple uncorrelated continuous data, and ordinal data, while they both could run through for marginal model, in joint model I never succeeded for even one time.  

 

I attach my code here and I really need anyone's help, even remotely instruction (I'll pay for it).  

 

data sample;
  input trt time id variable $ value;
 datalines;
0 0 1 continuous 21.2080566
0 1 1 continuous 11.800
0 0 1 ordinal 5
0 1 1 ordinal 4
0 0 2 continuous 23.77209112
0 1 2 continuous 6.668272081
0 0 2 ordinal 5
0 1 2 ordinal 4
0 0 3 continuous 27.54257141
0 1 3 continuous 13.36067935
0 0 3 ordinal 5
0 1 3 ordinal 5
0 0 4 continuous 26.86563107
0 1 4 continuous 9.048611888
0 0 4 ordinal 5
0 1 4 ordinal 4
0 0 5 continuous 22.64034662
0 1 5 continuous 7.429331484
0 0 5 ordinal 5
0 1 5 ordinal 3
1 0 6 continuous 24.34331053
1 1 6 continuous 8.31258158
1 0 6 ordinal 5
1 1 6 ordinal 4
0 0 7 continuous 25.70524738
0 1 7 continuous 8.856146754
0 0 7 ordinal 5
0 1 7 ordinal 4
1 0 8 continuous 24.83456925
1 1 8 continuous 10.28819607
1 0 8 ordinal 5
1 1 8 ordinal 4
1 0 9 continuous 24.23330388
1 1 9 continuous 8.515241755
1 0 9 ordinal 5
1 1 9 ordinal 4
;

 

 

 

PROC nlmixed data=sample qpoints=10 maxiter = 100 tech = nmsimp corr ecorr;
PARMS beta0=6 beta1=-3.6 beta2=-1.5 alpha0=25 alpha1=-10 alpha2=-2 rho=0.3 sd1 = 2 sd2=1.45 sigor = 0.9154 sigcon = 2 i1 =0.49 i2=1.49 i3=3.49;
bounds i1 > 0, i2 > 0, i3>0;
if variable="continuo" then do;
pi=constant("pi");
m1=alpha0+alpha1*time+alpha2*trt+z1;
LL1=((-0.5)*log(2*pi*sigcon*sigcon)-((value-m1)**2)/
(2*sigcon*sigcon));
END;
if variable="ordinal" then do;
   eta = beta0+beta1*time+beta2*trt+z2;
   if (value=1) then p = probnorm(-eta/sigor);
   else if (value=2) then
      p = probnorm((i1-eta)/sigor) - probnorm(-eta/sigor);
   else if (value=3) then
      p = probnorm((i1+i2-eta)/sigor) - probnorm((i1-eta)/sigor);
    else if (value=4) then
      p = probnorm((i1+i2+i3-eta)/sigor) - probnorm((i1+i2-eta)/sigor);
   else p = 1 - probnorm((i1+i2+i3-eta)/sigor);
   if (p > 1e-8) then LL2 = log(p);
   else LL2 = -1e20;
END;
LL=LL1+LL2;
MODEL value ~ GENERAL(LL);
RANDOM z1 z2 ~ NORMAL([0,0],[sd1*sd1,rho*sd1*sd2,sd2*sd2]) SUBJECT=id;
*estimate "sigma2" sigor*sigor;
ods output ParameterEstimates=pars;
ods output FitStatistics=aic;
RUN;

 

 

6 REPLIES 6
StatDave
SAS Super FREQ
Have you tried fitting your joint model using PROC GLIMMIX? You might find that much easier. See the example titled "Joint Modeling of Binary and Count Data" in the GLIMMIX documentation.
lcw68
Calcite | Level 5

Thanks, I have searched for it. since I want to fit a model for ordinal data, GLMMIX does not have this option.

StatDave
SAS Super FREQ

Joint modeling is available in GLIMMIX using the DIST=BYOBS(variable) option in the MODEL statement.  This is illustrated for a joint model with Poisson and binary response data in the example I referred to that can be found here.  From there, click on Syntax>MODEL statement to see current syntax information on the option I mentioned.

lcw68
Calcite | Level 5

After further checking, I found each time when I run the model, if each subjects have k observations (k timepoints) there are always k observations not used in the final result. How could I know which k observations are not used? I can't output any result since the model failed before any result generated. (I doubt this might be a problem due to this Q&A SAS: No valid observations are found Error - Simple Regression - Stack Overflow)

lcw68_0-1690953968028.png

 

jiltao
SAS Super FREQ

Convergence issues in PROC NLMIXED are not straightforward to deal with, unfortunately.

You might want to start with a simpler model, for example, take out random effects, and see how it goes. Sometimes you might want to play with different starting values in the PARMS statement, and this takes trial and error, and luck...

Good luck,

Jill

lcw68
Calcite | Level 5

It is solved right now. I removed the "LL=LL1+LL2" and change both LL1 & LL2 to LL. 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 1632 views
  • 0 likes
  • 3 in conversation