Rizwan Younis
2007-Jul-16 21:27 UTC
[Rd] Error while fitting Partial Proportional Odds model using vglm
Dear R developers: I am trying to fit a PPO model using vglm from the library VGAM, and get an error while executing the code. Here is the data, code, and error: Data: first row is the column names. a = age, and 1,2,3, 4 and 5 are condition grades. a 1 2 3 4 5 1 1 0 0 0 0 2 84 2 7 10 2 3 16 0 6 6 2 4 13 0 3 4 0 5 0 0 0 1 0 Library(VGAM) rc13<-read.table("icg_rcPivot_group2.txt",header=F) names(rc13)<-c("a","1","2","3","4","5") ppo<-vglm(cbind(rc13[,2],rc13[,3],rc13[,4],rc13[,5],rc13[,6])~a,family cumulative(link = logit, parallel = F , reverse = F),na.action=na.pass, data=rc13) summary(ppo) I get the following error: Error in "[<-"(`*tmp*`, , index, value = c(1.13512932539841, 0.533057528200189, : number of items to replace is not a multiple of replacement length In addition: Warning messages: 1: NaNs produced in: log(x) 2: fitted values close to 0 or 1 in: tfun(mu = mu, y = y, w = w, res FALSE, eta = eta, extra) 3: 19 elements replaced by 1.819e-12 in: checkwz(wz, M = M, trace = trace, wzeps = control$wzepsilon) Ironically, it works ok with Proportional Odds (change parallel = T above), but fails with PPO (parallel = F). I will appreciate any help to fix this problem. Thanks Rizwan Younis Grad Student University of Waterloo Waterloo, ON Canada
Prof Brian Ripley
2007-Jul-17 07:30 UTC
[Rd] Error while fitting Partial Proportional Odds model using vglm
Instead of repeatedly posting this message to the R lists, please contact the maintainer as the R posting guide asked you to do in the first instance. E.g. you have already sent https://stat.ethz.ch/pipermail/r-help/2007-July/136488.html https://stat.ethz.ch/pipermail/r-help/2007-July/136510.html On Mon, 16 Jul 2007, Rizwan Younis wrote:> Dear R developers: > > I am trying to fit a PPO model using vglm from the library VGAM, and get an > error while executing the code. Here is the data, code, and error: > > Data: first row is the column names. a = age, and 1,2,3, 4 and 5 are > condition grades. > > a 1 2 3 4 5 > 1 1 0 0 0 0 > 2 84 2 7 10 2 > 3 16 0 6 6 2 > 4 13 0 3 4 0 > 5 0 0 0 1 0 > > Library(VGAM) > > rc13<-read.table("icg_rcPivot_group2.txt",header=F) > names(rc13)<-c("a","1","2","3","4","5") > > ppo<-vglm(cbind(rc13[,2],rc13[,3],rc13[,4],rc13[,5],rc13[,6])~a,family > cumulative(link = logit, parallel = F , reverse = F),na.action=na.pass, > data=rc13) > summary(ppo) > > I get the following error: > > Error in "[<-"(`*tmp*`, , index, value = c(1.13512932539841, > 0.533057528200189, : > number of items to replace is not a multiple of replacement length > In addition: Warning messages: > 1: NaNs produced in: log(x) > 2: fitted values close to 0 or 1 in: tfun(mu = mu, y = y, w = w, res > FALSE, eta = eta, extra) > 3: 19 elements replaced by 1.819e-12 in: checkwz(wz, M = M, trace = trace, > wzeps = control$wzepsilon) > > > Ironically, it works ok with Proportional Odds (change parallel = T above), > but fails with PPO (parallel = F). > > I will appreciate any help to fix this problem. > Thanks > > Rizwan Younis > Grad Student > University of Waterloo > Waterloo, ON Canada > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Gavin Simpson
2007-Jul-17 07:34 UTC
[Rd] Error while fitting Partial Proportional Odds model using vglm
On Mon, 2007-07-16 at 17:27 -0400, Rizwan Younis wrote:> Dear R developers:This is *not* the correct list for help with R or contributed packages on CRAN, and please do not send your messages repeatedly to any of the lists - this is at least the 3rd time I've received this request for help. If you'd read the posting guide, it would have told you that you should email the package maintainer (in this case Thomas Yee) for help with a contributed package. If you must email the R-help list, do so only once. If you don't get a reply, take the hint that perhaps no-one has an answer - repeatedly bugging them isn't going to help! By the looks of things, there is either a problem within VGAM itself that only Thomas will be able to fix, or you are providing an argument/data that VGAM was not expecting - there appear to be some fitting problems also. Check that the data you are providing are what VGAM expects, and if the problem still persists, email Thomas with a reproducible example. G -- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Gavin Simpson [t] +44 (0)20 7679 0522 ECRC [f] +44 (0)20 7679 0565 UCL Department of Geography Pearson Building [e] gavin.simpsonATNOSPAMucl.ac.uk Gower Street London, UK [w] http://www.ucl.ac.uk/~ucfagls/ WC1E 6BT [w] http://www.freshwaters.org.uk/ %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%