Error In Lims I Subscript Out Of Bounds
Contents |
in threaded view ♦ ♦ | Report Content as Inappropriate ♦ ♦ error: subscript out of r subscript out of bounds in matrices bounds? Hi all, I want to get results for cox
Error In Pi[[j]] : Subscript Out Of Bounds Rbind
proportional hazards on SNP data. I'm trying to get HRs, CI's, & p-values for each individual
Error In * Tmp * Subscript Out Of Bounds
SNP - this is represented by cov[,i]. When I run my code, I get the following error: subscript out of bounds. I don't know why I
Error During Wrapup: Subscript Out Of Bounds
am getting this error. I have looked through the R logs, but nothing that has been previously suggested has helped so far. What am I doing wrong? DS3 = time variable, S3 = censor/event variable, cov = my dataset, which is in a data.frame format: ********************************************************* CODE: test<-NULL bb=names(cov) col = dim(cov)[2] for(i solving problems of subscript out of bounds in r in 19:col) { mod=coxph(Surv(cov$DS3,cov$S3)~cov[,i]+AGE+sex,data=cov) aa<-summary(mod) test<-rbind(test,c(bb[i],aa$coef[1,1],aa$coef[1,3],aa$coef[1,5],aa$conf.int [1,1],aa$conf.int[1,3],aa$conf.int [1,4],aa$coef[2,5],aa$coef[3,5],aa$coef[4,5])) } write.table(test,"result.txt",quote=F) Thanks! -CC [[alternative HTML version deleted]] ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code. jholtman Threaded Open this post in threaded view ♦ ♦ | Report Content as Inappropriate ♦ ♦ Re: error: subscript out of bounds? You need to learn how to debug your program. When the error occurs, look at the value of the indices in the offending statement -- you will find that the problem is subscript out of bounds. Put the following statement in your code: options(error=utils::recover) and then do ?browser to learn how to use the browser for debugging. On Mon, Jun 14, 2010 at 6:48 PM, Yesha Patel <[hidden email]> wrote: > Hi all, > > I want to get results for cox proportional hazards on SNP data. I'm trying > to get HRs, CI's,
date ] [ thread ] [ subject ] [ author ] On Tue, 2004-07-20 at 13:12, Marie-Pierre Sylvestre wrote: > Hi > > I am running a simulation that involves a loop calling rbind subscript out of bounds three 2 > functions that I have written. Everything works fine when the subscript out of bounds shiny inside > of the loop is performed up to 1000 times (for (i in 1:750)). > > However, I sometimes options(error=recover) get : ''Error: subscript out of bounds'' if I try > to increase the loop 'size' to 1000. I am thinking it has to to with > memory but I am not sure. I http://r.789695.n4.nabble.com/error-subscript-out-of-bounds-td2255195.html have increased my memory size to 512M but > it does not solve my problem. > > It would take to much place to copy and paste my code here. It would > be helpful if you could tell me whether my problem may or may not be > related to memory size. > > Beside, what's the difference between > > Error: subscript out of bounds https://stat.ethz.ch/pipermail/r-help/2004-July/054733.html > Error: subscript out of range ? > > > Regards > > M-P Sylvestre If this was a memory error, you would probably get a "cannot allocate ..." type of error message. More than likely, the object upon which you are using the loop has dimensions which are smaller than the value(s) that your loops are using for indexing into the object. The use of either dim(object) or str(object) will give you more information here. When you increase the loop size, presumably, you have not increased the size of your underlying object in kind. For example, if your object (say a matrix) has dimensions of 500 rows and 10 columns, your loop is trying to index object[510, 12], which is 'out of bounds' for your object. A search of the R source code using grep suggests that the 'out of bounds' message is generally used when trying to index (subset) an object with a value or values that are not correct as I have above. This could also be a single dimension vector, BTW. For example, trying to index object[100] when your vector is only 50 elements in size. In the case of the 'out of range'
nomogram in R from a logistic regression. This project was successfully completed by numberNmatrix for $25 AUD in a day. Get free quotes https://www.freelancer.com/projects/r/need-someone-produce-nomogram-from/ for a project like this Completed by: numberNmatrix Unbelievable! Provided exactly what I wanted in 5 minutes, yes 5. And it was all correct and accurate.Definitely using this guy again. Skills Required R Programming Language Project Budget $10 - $30 AUD Completed In 1 day Total Bids 2 Project Description I have csv file with a binary outcome variable (0/1) subscript out and 5 predictor variables (1 continuous, 4 categorical) from which I have derived a logistic regression. I now want to turn this logistic regression model into a nomogram. I have attempted to use the nomogram function from the "rms" package but having trouble getting it to run. I suspect the problem may be in part due to having no idea how subscript out of to set the data up. This is the code I have used: library(rms) setwd("/Users/General/Dropbox/NOMOGRAM/test_data") mydata <- [url removed, login to view]("[url removed, login to view]", header=TRUE, sep=",") attach(mydata2) f <- glm(Non_Responder ~ BMI__40 + K_L__4 + WOMAC_Total_score_preop, family=binomial(logit), data=mydata) nom <- nomogram(f, fun=function(x)1/(1+exp(-x))) Everything works fine until I get to the nomogram function where I keep getting the following error: "Error in lims[[i]] : subscript out of bounds" Something to do with the dataset set-up? With how I am using the nomogram code? What I am after is this: - Code required to go from my csv file to a nomogram - Nomogram itself Happy to negotiate price. Thanks!
Looking to make some money? Set your budget and the timeframe Outline your proposal Get paid for your work Apply for this Job See more: to do fun, someone fun, how to use binary, how to do binary, how to code in binary, how to code binary, fun and function, binary problem, regression, regression model, r package, nom, LIMS, in r, need someone binary, regression run, glm code, glm, run re