similar to: SOS! error in GLM logistic regression...

Displaying 20 results from an estimated 1000 matches similar to: "SOS! error in GLM logistic regression..."

2009 Jul 07
2
Question in using e1071 svm routine
Hi all, I've got the following error message in using e1071 svm routine... Could anybody please help me? Thank you! --------------------------------- model <- svm(y=factor(mytraindata[, 1]), x=mytraindata[, -1], probability=T) Error in if (any(co)) { : missing value where TRUE/FALSE needed In addition: Warning message: In FUN(newX[, i], ...) : NAs introduced by coercion
2011 Mar 30
1
Using xlevels
I'm working on predict.survreg and am confused about xlevels. The model.frame method has the argument, but none of the standard methods (model.frame.lm, model.frame.glm) appear to make use of it. The documentation for model.matrix states: xlev: to be used as argument of model.frame if data has no "terms" attribute. But the terms attribute has no xlevels information in it, so I
2009 Jul 10
1
help! Error in using Boosting...
Here is my code: mygbm<-gbm.fit(y=mytraindata[, 1], x=mytraindata[, -1], interaction.depth=4, shrinkage=0.001, n.trees=20000, bag.fraction=1, distribution="bernoulli") Here is the error: Error in gbm.fit(y = mytraindata[, 1], x = mytraindata[, -1], interaction.depth = 4, : The dataset size is too small or subsampling rate is too large: cRows*train.fraction*bag.fraction <=
2011 Dec 26
2
glm predict issue
Hello, I have tried reading the documentation and googling for the answer but reviewing the online matches I end up more confused than before. My problem is apparently simple. I fit a glm model (2^k experiment), and then I would like to predict the response variable (Throughput) for unseen factor levels. When I try to predict I get the following error: > throughput.pred <-
2005 Aug 15
2
stepAIC invalid scope argument
I am trying to replicate the first example from stepAIC from the MASS package with my own dataset but am running into error. If someone can point where I have gone wrong, I would appreciate it very much. Here is an example : set.seed(1) df <- data.frame( x1=rnorm(1000), x2=rnorm(1000), x3=rnorm(1000) ) df$y <- 0.5*df$x1 + rnorm(1000, mean=8, sd=0.5) # pairs(df); head(df) lo <-
2009 Feb 26
1
using predict method with an offset
Hi, I have run into another problem using offsets, this time with the predict function, where there seems to be a contradiction again between the behavior and the help page. On the man page for predict.lm, it says Offsets specified by offset in the fit by lm will not be included in predictions, whereas those specified by an offset term in the formula will be. While it indicates nothings about
2009 Jul 08
1
ksvm question -- help! line search failed...
I got the data working, but now I got another problem with KSVM: line search fails -2.793708 -0.5831701 1.870406e-05 -5.728611e-06 -5.059796e-08 -3.761822e-08 -7.308871e-13Error in prob.model(object)[[p]]$A : $ operator is invalid for atomic vectors On Tue, Jul 7, 2009 at 6:45 PM, Steve Lianoglou<mailinglist.honeypot at gmail.com> wrote: > Hi, > > On Jul 7, 2009, at 6:44 PM,
2009 Jul 07
1
ksvm question -- help! cannot get program to run...
What's wrong? Very sad about this... model <- ksvm(x=mytraindata[, -1], y=factor(mytraindata[, 1]), prob.model=T) Error in .local(x, ...) : x and y don't match.
2007 Jun 15
1
subscript out of bounds error in lda
I work with Windows, R version 2.4.1 I'm trying to do a discriminant analysis and, in trying to figure out how to do it following the example from R help, I'm getting an error that says 'subscript out of bounds'. I don't know what this means and how to solve it (I'm very new with R) I'm doing everything in this made-up test matrix: group var1 var2 var3 1 1
2009 Aug 19
2
Problem with predict.coxph
We occasionally utilize the coxph function in the survival library to fit multinomial logit models. (The breslow method produces the same likelihood function as the multinomial logit). We then utilize the predict function to create summary results for various combinations of covariates. For example:
2008 Oct 05
1
Help on R Coding
Hi all, I am kind of stuck of using Predict function in R to make prediction for a model with continuous variable and categorial variables. i have no problem making the model, the model is e.g. cabbage.lm2<- lm(VitC ~ HeadWt + Date + Cult) HeadWt is a continuous variable, Date and Culte are factors. Date have three levels inside (d16,d20,d21), Cult has two levels(c39,c52). I need to
2011 Mar 23
1
predict.lm How to introduce new data?
Dear all, I've fitted a lm using 61 data (training data), and I'left 10 as test data. Training data and test data are stored in an excell. training <- read.xls("C:/...../training.xls") , the same for test. That is: v1 v2 ... v15 When I type str(training) and str(test), both sets have the same names The resulting model is lms <- lm(vd ~ log(v1) + fv2+ fv5+ fv7 )
2018 Mar 16
2
Apparent bug in behavior of formulas with '-' operator for lm
Dear R-developers, In the 'lm' documentation, the '-' operator is only specified to be used with -1 (to remove the intercept from the model). However, the documentation also refers to the 'formula' help file, which indicates that it is possible to subtract any term. Indeed, the following works with no problems (the period '.' stands for 'all terms except the
2011 Mar 03
1
Error in model.frame.default
Dear R- Community, to learn i reanalysed some data provided and analysed by Zuur et. al. in their book "Mixed effect models and Extensions in Ecology with R". When i run the last command i get a warning message i dont understand. Loyn<- read.table(file = "loyn.txt",header = TRUE) Loyn$L.AREA<- log10(Loyn$AREA) fGRAZE <-factor(Loyn$GRAZE) M0<- lm(ABUND~ L.AREA
2005 Aug 16
1
predict nbinomial glm
Dear R-helpers, let us assume, that I have the following dataset: a <- rnbinom(200, 1, 0.5) b <- (1:200) c <- (30:229) d <- rep(c("q", "r", "s", "t"), rep(50,4)) data_frame <- data.frame(a,b,c,d) In a first step I run a glm.nb (full code is given at the end of this mail) and want to predict my response variable a. In a second step, I would
2003 Sep 16
2
can predict ignore rows with insufficient info
I need predict to ignore rows that contain levels not in the model. Consider a data frame, "const", that has columns for the number of days required to construct a site and the city and state the site was constructed in. g<-lm(days~city,data=const) Some of the sites in const have not yet been completed, and therefore they have days==NA. I want to predict how many days these sites
2012 Dec 12
2
help with predict.glm, and charting with factors
Dear R Wizards, After much frustration and days of confusion I have finally broken down and am asking for help, which I don’t like doing, but I just can’t figure this one out on my own. I’ve conducted a laboratory experiment testing the effects of temperature and salinity on whether or not a biological event will occur (Go or NoGo). I’ve coded the factors temperature and salinity as factors for
2007 May 01
1
Levels attribute in integer columns created by model.frame()
The following is evidence of what is surely an undesirable feature. The issue is the handling, in calls to model.frame(), of an explanatory variable that has been derived as an unclassed factor. (Ross Darnell drew this to my attention.) ## Data are slightly modified from p.191 of MASS > worms <- data.frame(sex=gl(2,6), Dose=factor(rep(2^(0:5),2)), +
2019 Aug 30
3
inconsistent handling of factor, character, and logical predictors in lm()
Dear R-devel list members, I've discovered an inconsistency in how lm() and similar functions handle logical predictors as opposed to factor or character predictors. An "lm" object for a model that includes factor or character predictors includes the levels of a factor or unique values of a character predictor in the $xlevels component of the object, but not the FALSE/TRUE values
2005 Aug 15
1
error in predict glm (new levels cause problems)
Dear R-helpers, I try to perform glm's with negative binomial distributed data. So I use the MASS library and the commands: model_1 = glm.nb(response ~ y1 + y2 + ...+ yi, data = data.frame) and predict(model_1, newdata = data.frame) So far, I think everything should be ok. But when I want to perform a glm with a subset of the data, I run into an error message as soon as I want to predict