s-news
[Top] [All Lists]

[no subject]

To: s-news@lists.biostat.wustl.edu
From: "C. Spanou" <cs369@cam.ac.uk>
Date: 21 Feb 2004 20:31:09 +0000
I have already checked with the lm function and it gives me results without deleting any of the terms and without needing "singular.ok=T" so the data has a full rank lm(q23p~timep+dayp+sitep+rq2p+typep+rq4ap+rq4bp+vehicp+passp+survp+sex1p+sex2p+age1p+age2p+perp+q3p+q4p+q5p+q6ap+q6bp+q6cp+q7p+q8a2p+q8b2p+q8c2p+q9p+q10p+q11p+q12p+q13p+q14p+q15p+q16p+q17p+q18p+q19ap+q19bp+q19dp+q19ep+q20p+q21ap+q21bp+q22p+q24p+q25p+q26p+q27p+q28p+q29p+q30ap+q30bp+q30cp+q31ap+q31bp+q31cp+q31dp+q32p+q33p+segmentp+htypep+newtypep+tpriced,data=newdatap)


polr(as.ordered(q23p)~1, data=newdatap)
gives the same warning message

Just want to mention that the dependent variable takes a lot of distinct
values.Below is the table of q23p
table(q23p)
  0 1 2 3 4 5 6 7 8 9 10 12 14 15 18 19 20 25 30 34 35 40 45 50 100
145 5 1 17 4 258 6 17 17 7 493 9 1 282 3 1 126 15 169 1 1 3 10 1 49 105
115 130 140 200 215 230 300 400 500
1   1   5   1   8   2   1   1   1   3

#first and third line are the values of the dependent variable
# second and fourth the times each value is presented in the data

When I group it using cut i.e.
xxx_cut(q23p,breaks=c(-1,1,6,12,18,25,34,105,500),factor.result=T)
and then I use polr it gives the same warning message but less times
and
polr(xxx~1,data=newdatap)
gives no warning message

also when I don?t include the following terms
timep,q7p,q16p,q29p,q30ap,q30bp,q30cp to the model where xxx is the
dependent variable I am getting a no warning message answer.

Do you know why it is so? Could you suggest any reasonable reason of not
including the variables above in the data?

I also tried to find there are any variables that are highly correlated.
This would be a god reason fon notincluding some of the variables. I did
round(cor(newdatap),2)

There are some variables that are highly correlated.When I delete those
from the data I still get warning messages for both the two models above.

I would be gratfull for any kind of help. Thank you





On Feb 19 2004, Spencer Graves wrote:

      Is your design of full rank?  If you have not already done this, I
might try the same model (possibly replacing "as.ordered(q23p)" with a
vector I knew was numeric) in "lm".  If "lm" says it i s singular, you
need to simplify the model by deleting some terms.  The "singular.ok"
option in "lm" will delete terms and fit something.

      Alternatively, do you get the same error with models, e.g.:

    polr(as.ordered(q23p)~1, data=newdatap)

polr(as.ordered(q23p)~ q29p+q30ap+q30bp+q30cp+q31ap+q31bp+q31cp+
q31dp+q32p+q33p+segmentp+ htypep+newtypep+tptimedp, data=newdatap)

      hope this helps.  spencer graves

C. Spanou wrote:

> Hello Splus users, I am using the function polr in library(MASS).Below
> are the the command I use
> > polr(as.ordered(q23p)~ > timep+dayp+sitep+rq2p+typep+rq4ap+rq4bp+vehicp+passp+survp+sex1p+sex2p+age1p+age2p+perp+q3p+q4p+q5p+q6p+q7p+q8a2p+q8b2p+ > q8c2p+q9p+ q10p+q11p+q12p+q13p+ > q14p+q15p+q16p+q17p+q18p+q19p+q20p+q21ap+q21bp+q22p+q23p+q24p+q25p+q26p+q27p+q28p+ > q29p+q30ap+q30bp+q30cp+q31ap+q31bp+q31cp+ q31dp+q32p+q33p+segmentp+ > htypep+newtypep+tptimedp, data=newdatap) > > But I am getting the following warning message singularity encountered
> in: nlminb.1(temp, p, liv, lv, objective, gradient, bounds, scale)
> > Can anyone suggest what it could be wrong?
> Any hints will be appreciated
> Thank you
> Charis
> > --------------------------------------------------------------------
> This message was distributed by s-news@lists.biostat.wustl.edu.  To
> unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
> the BODY of the message:  unsubscribe s-news





<Prev in Thread] Current Thread [Next in Thread>
  • [no subject], C. Spanou <=