s-news
[Top] [All Lists]

NLME loop termination

To: <s-news@wubios.wustl.edu>
Subject: NLME loop termination
From: "Pravin" <jadhavpr@vcu.edu>
Date: Tue, 17 Feb 2004 15:48:09 -0500
Importance: Normal
In-reply-to: <001701c3f58d$a665d030$170111ac@Pravin>
Hello all,

How do I take care of this? 

After running an NLME function in the loop, I am extracting fixed effect and
random effect components along with SE estimates on all. (For var-cov
components SE estimates are back calculated from the confidence intervals).
I have a total of 50 datasets to be fitted. 

The function runs fine if I am not extracting SE estimates. 

But for some datasets SPLUS cannot get confidence intervals on var-cov
components due to non-positive definite approximate variance-covariance and
it terminates the loop.

SPLUS being not able to estimate CI for all is fine with me, but I would
like the loop to continue and get CI for all possible sets. What kind of
exclusion statement should I include so that even though a particular
parameter not available and the loop would continue?

for (i in 1:ntrial)
        {
        
        od.fit<-nlme(model),
        data=data,
        fixed=lncl+lndclm+lnv~1,
        random=lncl+lnv~1|id,
        start=c(log(clf),log(clm-clf),log(v)),subset=trial==i)
        
nlmeres[i,]<-as.numeric(c(fixed.effects(od.fit),VarCorr(od.fit)[,2],summary(
od.fit)$tTable[,2],     
        
(intervals(od.fit)$reStruct$id[,2]-intervals(od.fit)$reStruct$id[,1])/1.96))
        }                


Thanks,
 
Pravin
 
Pravin Jadhav



<Prev in Thread] Current Thread [Next in Thread>