similar to: question about SVM in e1071

Displaying 20 results from an estimated 400 matches similar to: "question about SVM in e1071"

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
2007 Jul 17
1
distance function (analogue)
Hello R-Users, its again me with a question. I´m using R 2.5.0 on Mac Power Book running Mac OS X 10.4.10 I try to calculate distances betweeen two data tables looking like this V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11 V12 V13 V14 V15 V16 V17 V18 V19 V20 V21 V22 V23 V24 V25 V26 V27 V28 V29 V30 V31 V32 V33 V34 V35 V36 1 1 0 0 0 1 1 0 1 0 0 0 1 0 0 0 0 0 1 0 0
2006 Feb 08
1
adding variable into dataframe by indice
R-Helpers, I am trying to insert a value into a dataframe. This value is a proportion calculated by counting the number of those individuals with that value and then inserting the proportion at the end of the dataframe to only those individuals with the given value. The problem I am running into is that the proportions are not being attached to only those individuals with the specified value
2006 Jan 09
1
trouble with extraction/interpretation of variance structure para meters from a model built using gnls and varConstPower
I have been using gnls with the weights argument (and varConstPower) to specify a variance structure for curve fits. In attempting to extract the parameters for the variance model I am seeing results I don't understand. When I simply display the model (or use "summary" on the model), I get what seem like reasonable values for both "power" and "const". When I
2007 Jan 03
1
problem with logLik and offsets
Hi, I'm trying to compare models, one of which has all parameters fixed using offsets. The log-likelihoods seem reasonble in all cases except the model in which there are no free parameters (model3 in the toy example below). Any help would be appreciated. Cheers, Jarrod x<-rnorm(100) y<-rnorm(100, 1+x) model1<-lm(y~x) logLik(model1) sum(dnorm(y, predict(model1),
2010 Apr 01
2
Adding regression lines to each factor on a plot when using ANCOVA
Dear R users, i'm using a custom function to fit ancova models to a dataset. The data are divided into 12 groups, with one dependent variable and one covariate. When plotting the data, i'd like to add separate regression lines for each group (so, 12 lines, each with their respective individual slopes). My 'model1' uses the group*covariate interaction term, and so the coefficients
2011 Sep 08
1
predict.rma (metafor package)
Hi (R 2.13.1, OSX 10.6.8) I am trying to use predict.rma with continuous and categorical variables. The argument newmods in predict.rma seems to handle coviariates, but appears to falter on factors. While I realise that the coefficients for factors provide the answers, the goal is to eventually use predict.rma with ANCOVA type model with an interaction. Here is a self contained example
2006 Feb 17
0
trouble with extraction/interpretation of variance struct ure para meters from a model built using gnls and varConstPower
Works perfectly. Thank you. -Hugh Rand -----Original Message----- From: Spencer Graves [mailto:spencer.graves at pdf.com] Sent: Sunday, January 15, 2006 6:41 PM To: Rand, Hugh Cc: 'r-help at lists.R-project.org' Subject: Re: [R] trouble with extraction/interpretation of variance structure para meters from a model built using gnls and varConstPower How about this: >
2009 Mar 09
1
lme anova() and model simplification
I am running an lme model with the main effects of four fixed variables (3 continuous and one categorical – see below) and one random variable. The data describe the densities of a mite species – awsm – in relation to four variables: adh31 (temperature related), apsm (another plant feeding mite) awpm (a predatory mite), and orien (sampling location within plant – north or south). I have read
2008 Jun 26
0
geoR : Passing arguments to "optim" when using "likfit"
Hi everyone !   I'm am trying to fit a kriging model to a set of data. When I just run the "likfit" command I can obtain the results. However when I try to pass additional arguements to the optimization function "optim" I get errors. That is I want to obtain the hessian matrix so matrix (hessian=TRUE).   Heres a little example( 1-D). Can anyone shed some light?  Where am I
2008 Jun 26
0
geoR : Passing arguments to "optim" when using "likfit"]
Mzabalazo Ngwenya wrote: > Hi everyone ! > > I'm am trying to fit a kriging model to a set of data. When I just run > the "likfit" command I can obtain the results. However when I try to > pass additional arguements to the optimization function "optim" I get > errors. That is I want to obtain the hessian matrix so matrix > (hessian=TRUE). >
2011 May 27
1
Error with BRugs 0.53 and 0.71, on Win7 with R 2.12.2 and 2.13.0 (crashes R GUI)
I've run into persistent problems with OpenBUGS crashing when using BRugs .53 and .71, and am hoping someone has suggestions. There is obviously something unusual going on in my environment, but I'm at a loss as to where to begin to try to solve it. In a nutshell, what happens is that, as soon as I call "modelCheck()" in BRugs, it gets an error or crashes ... but only some of
2008 Oct 02
1
An AIC model selection question
Dear R users, Assume I have three models with the following AIC values: model AIC df model1 -10 2 model2 -12 5 model3 -11 2 Obviously, model2 would be preferred, but it "wastes" 5 df compared to the other models. Would it be allowed to select model3 instead, simply because it uses up less df and the delta-AIC between model2 and model3 is just 1? Many thanks for any
2009 Jul 02
0
MCMCpack: Selecting a better model using BayesFactor
Dear R users, Thanks in advance. I am Deb, Statistician at NSW Department of Commerce, Sydney. I am using R 2.9.1 on Windows XP. This has reference to the package “MCMCpack”. My objective is to select a better model using various alternatives. I have provided here an example code from MCMCpack.pdf. The matrix of Bayes Factors is: model1 model2 model3 model1 1.000 14.08
2011 Apr 14
1
mixed model random interaction term log likelihood ratio test
Hello, I am using the following model model1=lmer(PairFrequency~MatingPair+(1|DrugPair)+(1|DrugPair:MatingPair), data=MateChoice, REML=F) 1. After reading around through the R help, I have learned that the above code is the right way to analyze a mixed model with the MatingPair as the fixed effect, DrugPair as the random effect and the interaction between these two as the random effect as well.
2004 Oct 26
3
GLM model vs. GAM model
I have a question about how to compare a GLM with a GAM model using anova function. A GLM is performed for example: model1 <-glm(formula = exitus ~ age+gender+diabetes, family = "binomial", na.action = na.exclude) A second nested model could be: model2 <-glm(formula = exitus ~ age+gender, family = "binomial", na.action = na.exclude) To compare these two GLM
2005 Apr 24
2
A question on the library lme4
Hi, I ran the following model using nlme: model2<-lme(log(malrat1)~I(year-1982),random=~1|Continent/Country,data=wbmal10) I'm trying to run a Poisson GlMM to avoid the above transformation but I don't know how to specify the model using lmer in the lme4 library: model3<-lmer((malrat1)~I(year-1982) + ??,data=wbmal10,family=poisson) How can I introduce a random factor of the
2006 Sep 12
4
variables in object names
Is there any way to put an argument into an object name. For example, say I have 5 objects, model1, model2, model3, model4 and model5. I would like to make a vector of the r.squares from each model by code such as this: rsq <- summary(model1)$r.squared for(i in 2:5){ rsq <- c(rsq, summary(model%i%)$r.squared) } So I assign the first value to rsq then cycle through models 2 through
2010 Oct 03
5
How to iterate through different arguments?
If I have a model line = lm(y~x1) and I want to use a for loop to change the number of explanatory variables, how would I do this? So for example I want to store the model objects in a list. model1 = lm(y~x1) model2 = lm(y~x1+x2) model3 = lm(y~x1+x2+x3) model4 = lm(y~x1+x2+x3+x4) model5 = lm(y~x1+x2+x3+x4+x5)... model10. model_function = function(x){ for(i in 1:x) { } If x =1, then the list
2009 Jan 16
2
Predictions with GAM
Dear, I am trying to get a prediction of my GAM on a response type. So that I eventually get plots with the correct values on my ylab. I have been able to get some of my GAM's working with the example shown below: * model1<-gam(nsdall ~ s(jdaylitr2), data=datansd) newd1 <- data.frame(jdaylitr2=(244:304)) pred1 <- predict.gam(model1,newd1,type="response")* The problem I am