[R] Error in ORDGLM function

Jim Lindsey james.lindsey at luc.ac.be
Mon Apr 29 13:03:39 CEST 2002


> 
> I am trying this simple  model.
> 
> Following is the code:
> 
> newrate <- c(0,1,2,0,1,2,0,1,2,0,1,2)
> totalast <- c(100,200,300,120,215,280,75,145,255,125,275,310)
> ordglm(newrate~totalast,link="logit",maxiter=100, weights=1)
> 
> It runs for few seconds and get the error back
> 
> Error in ordglm(newrate ~ totalast, link = "logit", maxiter = 100, weights = 1) :
>         Object "PearsRes" not found

That error is not from my code: I do not have a PearsRes. Your three
lines work for me:

> library(gnlm)
Loading required package: rmutil 
> newrate <- c(0,1,2,0,1,2,0,1,2,0,1,2)
> totalast <- c(100,200,300,120,215,280,75,145,255,125,275,310)
> ordglm(newrate~totalast,link="logit",maxiter=100, weights=1)

Call:
ordglm(newrate ~ totalast, link = "logit", maxiter = 100, weights = 1)

-Log likelihood    149.5272 
AIC                152.5272 
Iterations         5 

Location coefficients
             estimate     s.e.
(Intercept)  -51.3812  0.05031
totalast       0.1969  3.41556

Intercept contrasts
      estimate   s.e.
b[2]    -5.513  11.46

Correlation matrix
        1       2       3
1  1.0000 -0.9890  0.7268
2 -0.9890  1.0000 -0.8065
3  0.7268 -0.8065  1.0000
> 

Jim

> 
> I tried to use the example in the package
> 
> # McCullagh (1980) JRSS B42, 109-142
> # tonsil size: 2x3 contingency table
> y <- c(0:2,0:2)
> carrier <- gl(2,3,6)
> wt <- c(19,29,24,497,560,269)
> ordglm(y~carrier, weights=wt)
> 
> 
> It works fine.  So everything is installed correctly.
> 
> may be it has something to do with the weight?
> 
> Any help is welcome.
> 
> Thanks a lot.
> 
> Kamal Desai
> 
> 
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> 

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list