similar to: Error in object$tables[[v]] : subscript out of bounds

Displaying 20 results from an estimated 1000 matches similar to: "Error in object$tables[[v]] : subscript out of bounds"

2010 Jan 01
1
Questions bout SVM
Hi everyone, Can someone please help me in these questions?: 1)if I use crossvalidation with svm, do I have to use this equation to calculate RMSE?: mymodel <- svm(myformula,data=mydata,cross=10) sqrt(mean(mymodel$MSE)) But if I don’t use crossvalidation, I have to use the following to calculate RMSE: mymodel <- svm(myformula,data=mydata) mytest
2007 Jun 15
2
model.frame: how does one use it?
Philipp Benner reported a Debian bug report against r-cran-rpart aka rpart. In short, the issue has to do with how rpart evaluates a formula and supporting arguments, in particular 'weights'. A simple contrived example is ----------------------------------------------------------------------------- library(rpart) ## using data from help(rpart), set up simple example myformula <-
2009 Oct 11
3
passing field name parameter to function
Hi, I am passing a data frame and field name to a function. I've figured out how I can create the formula based on the passed in field name, but I'm struggling to create a vector based in that field. for example if I hard code with the actual field name Y = df$Target, everything works fine. but if I use the passed in parameter name, it doesn't give me what I want, Y =
2010 Jan 05
1
Is the Intercept Term always in First Position?
Dear All, I have a question about formulas and model.matrix(). If one specifies a model via a formula, the corresponding design matrix can be obtained with the model.matrix() function. For example: x1 <- c(1,4,2,3,5) x2 <- c(1,1,2,2,2) myformula <- ~ x1 + factor(x2) model.matrix(myformula) My question is: If an intercept term is in the model (like in the example above), is it always
2009 Oct 10
1
field names as function parameters
Hi, I am passing a data frame and field name to a function. I've figured out how I can create the formula based on the passed in field name, but I'm struggling to create a vector based in that field. for example if I hard code with the actual field name Y = df$Target, everything works fine. but if I use the passed in parameter name, it doesn't give me what I want, Y = df$mytarget
2013 Oct 18
0
Logistic regression over LOOCV
Hello all. I have this code: myLOOCV <- function(myformula, data) { Y <- all.vars(myformula)[1] Scores<- numeric(length(data[,1])) for (i in 1:length(data[,1])) { train <- data[-i,] test <- data[i,] myModel <- lrm(myformula, train) Scores[i] <- predict(myModel, test,type="mean") }
2007 Aug 22
1
"subscript out of bounds" Error in predict.naivebayes
I'm trying to fit a naive Bayes model and predict on a new data set using the functions naivebayes and predict (package = e1071). R version 2.5.1 on a Linux machine My data set looks like this. "class" is the response and k1 - k3 are the independent variables. All of them are factors. The response has 52 levels and k1 - k3 have 2-6 levels. I have about 9,300 independent variables
2009 Dec 27
1
svm regression/classification
Hi everyone, Can anyone please tell whether there is a difference between the code for using svm in regression and code for using svm in classification? This is my code for regression, should I change it to do classification?: train <- read.table("trainingset.txt",sep=";") test <- read.table("testset.txt",sep=";") svmmodelfitness <-
2010 Jun 14
2
Multiple regressions
Hi, Could you please tell me whether SVM can do multiple regression or not? Cheers, Amy _________________________________________________________________ Browse profiles for FREE! Meet local singles online. [[alternative HTML version deleted]]
1999 Apr 10
1
R/S compatibility in passing a formula
In S3 if you are passing an evaluated formula to another function that will store it and use it in printing (such as a model-fitting function), you usually want to unclass the formula. Otherwise, the formula that gets stored looks very ugly when printed. A trick to do the unclassing is to pass form = c( myFormula ) In R this has the effect of making form a list rather than a call. It seems
2011 Apr 18
2
as.formula doesn't want to take a phrase
Hello! I am trying to create a formula object using as.formula. But it's not working: examplephraze<-"for.my.example" myformula<-as.formula(paste(examplephraze,"~group, sum, data=mydata",sep="")) What's the problem? Thanks a lot! -- Dimitri Liakhovitski Ninah Consulting www.ninah.com
2009 Dec 29
3
error logging
Yet another question... I'm wondering if there is a built in facility to log errors. I've got this statement that gives me verbose DBI errors as they come up (to standard output), but I'd like to trap and log them to a file as I running about 3000000 sql statements through this particular piece of code and I'd like to keep the loop going and deal with all the errors once the
2001 Aug 12
1
Creating a Model Matrix - keeping NAs
I am wanting to create a model matrix and keep the NAs. stratmat <- model.matrix(myformula,mydata) Is there any way to do this? model.matrix doesn't have na.action as a parameter. Elsewhere I have made use of na.keep <- function(x){x}. Many thanks, Rachel Cunliffe -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read
2010 Feb 03
4
contour function: changing colour according to different levels
Hi everybody, I am using the contour function to draw isobares. And i would like to to bold contours for an interval of 500m and weak contour for an interval of 100m. Can someone help me with this? Thanks a lot Karine _________________________________________________________________ [[elided Hotmail spam]] [[alternative HTML version deleted]]
2018 Jan 11
6
Dovecot 2.3.0 TLS
On Thu, 11 Jan 2018 12:20:45 +0200, Aki Tuomi wrote: > Was the certificate path bundled in the server certificate? No, as a separate file, provided from the local (intermediate) CA: ssl_cert = </etc/openssl/certs/server.cert ssl_key = </etc/openssl/private/server.key ssl_ca = </etc/openssl/certs/ca-cert-chain.pem Worked fine with 2.2.x, 2.3 gives % openssl s_client -connect XXX:993
2007 Jun 05
1
Question using stepAIC
Hi - I use stepAIC to automatically select the model. The stepAIC was applied on polr as follow:objPolr <- polr(formula=myformula, data=dat, method=METHOD);objPolr.step <- stepAIC(objPolr, trace=T);Then R complaints that it doesn't know about 'dat' when it executes the second line. Below is the exact error that I got when executing the stepAIC line above:Error in eval(expr,
2011 Nov 22
1
help to setting a multiple (linear) regression model with a 5% significance level (threshold) for the inclusion of the model variables.
Dear Researchers, someone know the right syntax to chose a 5% significance level (threshold) for the inclusion of the model variables in a multiple (linear) regression in backward way? I set the formula in this way, but I don't know to choose the 5% significance? lmodelV <- step(lm(formula=MyFormula[[1]],data=LR.train),direction="backward") thanks in advance gianni
2005 Jun 09
1
getting more than the coefficients
Hi there, I am trying to export a regression output to Latex. I am using the xtable function in the xtable library. Doing myfit <- lm(myformula, mydata) print.xtable(xtable(myfit), file="myfile") only returns the estimated coefficients and the correspondent standard erros, t-statiscs and p-values. But I wish to get a bit more, say, the number of observations used in the
2010 Mar 14
1
formula and class label
Hi, Could you please tell me whether there is a difference in the result of svm when using formula instead of class label? Cheers, Amy _________________________________________________________________ Browse profiles for FREE! Meet local singles online. [[alternative HTML version deleted]]
2010 Jul 11
1
The formula interface of SVM
Hi Could you please explain the line that I got from the documentation of R? does it mean that there is a difference between using and not using the formula interface with SVM ?: If the predictor variables include factors, the formula interface must be used to get a correct model matrix. Cheers, Amy _________________________________________________________________ View photos of