similar to: Questions concerning function 'svm' in e1071 package

Displaying 20 results from an estimated 100 matches similar to: "Questions concerning function 'svm' in e1071 package"

2007 Aug 23
0
weighted nls and confidence intervals
for unweighted fits using `nls' I compute confidence intervals for the fitted model function by using: #------------------- se.fit <- sqrt(apply(rr$m$gradient(), 1, function(x) sum(vcov(rr)*outer(x,x)))) luconf <- yfit + outer(se.fit, qnorm(c(probex, 1 - probex))) #------------------- where `rr' contains an `nls' object, `x' is the independent variable vector, `yfit'
2007 Aug 31
0
non-linear fitting (nls) and confidence limits
dear list members, I apologize in advance for posting a second time, but probably after one week chances are, the first try went down the sink.. my question concerns computation of confidence intervals in nonlinear fits with `nls' when weigthing the fit. the seemingly correct procedure does not work as expected, as is detailed in my original post below. any remarks appreciated. greetings
2007 Sep 25
0
non-linear fitting (nls) and confidence limits
dear list members, my question concerns computation of confidence intervals in nonlinear fits with `nls' when weigthing the fit. the seemingly correct procedure does not work as (I) expected. I'm posting this here since: (A) the problem might suggest a modification to the `m' component in the return argument of `nls' (making this post formally OK for this list) and (B) I got no
1999 Dec 09
1
nlm() problem or MLE problem?
I am trying to do a MLE fit of the weibull to some data, which I attach. fitweibull<-function() { rt<-scan("r/rt/data2/triam1.dat") rt<-sort(rt) plot(rt,ppoints(rt)) a<-9 b<-.27 fn<-function(p) -sum( log(dweibull(rt,p[1],p[2])) ) cat("starting -log like=",fn(c(a,b)),"\n") out<-nlm(fn,p=c(a,b), hessian=TRUE)
2009 Oct 09
1
Substituting the extracted coefficients into the formula, exctracted from the result of nls()
Dear all, Here I come with another stupid question. Suppose I want to use nls() to fit a series of data (here modelled by generated points), then plot the points and the fitting curve. I figured out some way of doing it: x <- runif(1:20, 0, 10) y <- 0.1*x^2 - rep(3, length(x)) + rnorm(length(x), sd = 0.5) yfit <- nls(y ~ a*x^2 + b*x + c, start = list(a = 1, b = 1, c = 1),
2010 Nov 10
1
par mfrow in "function" problem
Hi all, I defined the following ############################# myhist=function(x){ hist(x,xlab="",main="") h=hist(x) xfit=seq(min(x),max(x),length=100) yfit=dnorm(xfit,mean(x),sd=sd(x)) yfit=yfit*diff(h$mids[1:2])*length(x) lines(xfit, yfit, col="blue", lwd=2) } ############################# individually, it worked fine however, if I used par(mfrow=c(2,2))
2009 Jun 21
2
Help on qpcR package
I am using R on a Windows XP professional platform. The following code is part of a bigger one CODE press=function(y,x){ library(qpcR) models.press=numeric(0) cat("\n") dep=y print(dep) indep=log(x) print(indep) yfit=dep-PRESS(lm(dep~indep))[[2]] cat("\n yfit\n") print(yfit) yfit.orig=yfit presid=y-yfit.orig press=sum(presid^2)
2009 Sep 02
2
Howto fit normal curve into histogram using GGPLOT2
Currently, I am doing it this way. x <- mtcars$mpg h<-hist(x, breaks=10, col="red", xlab="Miles Per Gallon", main="Histogram with Normal Curve") xfit<-seq(min(x),max(x),length=40) yfit<-dnorm(xfit,mean=mean(x),sd=sd(x)) yfit <- yfit*diff(h$mids[1:2])*length(x) lines(xfit, yfit, col="blue", lwd=2) But since, ggplot2 has more appealing
2012 May 17
3
Optimization inconsistencies
I have a very simple maximization problem where I'm solving for the vector x: objective function: w'x = value to maximize box constraints (for all elements of w): low < x < high equality constraint: sum(x) = 1 But I get inconsistent results depending on what starting values I. I've tried various packages but none seem to bee the very solver in Excel. Any recommendations on
2012 Oct 31
0
pseudo R-squared for model generated with spgm (splm)
I am working with the splm package. I use the spgm function: general estimation of a panel data model. Based on this approach, I know it is possible to compute a R2, eg the ratio of variation explained by a given model. My model is : bivmod<-spgm(logIKA~NBLITRE0+NBLITRE1,data=mydatap,listw=comsKnn.nbW,spatial.error=TRUE) I know that we can calculate the R^2 as the variance of the fitted
2012 Aug 24
0
A question about GRAMMAR calculations in the FAM_MDR algorithm
Dear R developers: I am a PHD candidate student in the school of public health of Peking University and my major is genetic epidemiology. I am learning the FAM-MDR algorithm, which is used to detect the gene-gene and gene-environment interactions in the data of pedigree. The codes were written by Tom Cattaert of the University of Liege. The algorithms and the sample datasets are available at
2005 Oct 14
1
lattice with predicted values
Dear lattice wizards, I am trying to figure out how to plot predicted values in xyplot, where the intercept, but not the slope, varies among conditioning factor levels. I am sure it involves the groups, but I have been unsuccessful in my search in Pinhiero and Bate, in the help files, or in the archive, or in my attempts on my own. My example follows: FACT is a factor with levels a,b,c
2004 Aug 24
0
additional examples for R-intro.texi (PR#7195)
Here are some patches to expand some of the examples in R-intro.texi. -- Brian Gough Network Theory Ltd, Publishing the R Reference Manuals --- http://www.network-theory.co.uk/R/ --- R-intro.texi~ Tue Aug 24 11:21:37 2004 +++ R-intro.texi Tue Aug 24 11:21:37 2004 @@ -6288,6 +6288,21 @@ use @example +> help(package = "@var{name}") +@end example + +A complete list of the
2010 Feb 19
1
"Legend" question
Hi, I want to get a histogram with the legend for my data. I drew a normal density curve and kernel density curve in the histogram, and I also label mean and median in the X axis. From the code, I got two legend: One shows "Normal Density" and "Kernel Density" and their corresponding lines, the other shows "Mean = value" and "Median = value" and their
2011 Oct 21
2
Arima Models - Error and jump error
Hi people, I´m trying to development a simple routine to run many Arima models result from some parâmeters combination. My data test have one year and daily level. A part of routine is: for ( d in 0:1 ) { for ( p in 0:3 ) { for ( q in 0:3 ) { for ( sd in 0:1 ) { for ( sp in 0:3 ) { for ( sq in 0:3 ) {
2007 Jun 07
2
Nonlinear Regression
Hello I followed the example in page 59, chapter 11 of the 'Introduction to R' manual. I entered my own x,y data. I used the least squares. My function has 5 parameters: p[1], p[2], p[3], p[4], p[5]. I plotted the x-y data. Then I used lines(spline(xfit,yfit)) to overlay best curves on the data while changing the parameters. My question is how do I calculate the residual sum of squares.
2001 Oct 13
2
hist and normal curve
Dear R people: I would like to superimpose a normal curve on a histogram. I've seen this example in a book, somewhere. I know that you draw the hist, get the mean and sd of the data set, but then I'm stuck. Could you help, please? Thanks! Erin hodgess at uhddx01.dt.uh.edu -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read
2010 Jan 18
5
errors appears in my time Series regression fomula
Dear all, I found really difficult with the time series questions, please help me with this monthly airline series! I have run the following r code, and there is an error appeared at the end. The data files was enclosed in the email. I'm sorry the errors message appeared in chinese, but it says "plot.xy(xy.coords(x, y), type = type, ...) : errors in argument has more than 3
2005 Sep 25
4
hist(x, ...) with normal distribution curve
. I am looking for a histogram or box plot with the adding normal distribution curve I think that must be possible, but I am not able to find out how to do. Regards Knut
2012 Jul 10
1
RGL 3D curvilinear shapes
Dear useRs, I'm trying to simply fill in the area under a curve using RGL. Here' the set up: x <- c(0.75,75.75,150.75,225.75,300.75,375.75,450.75,525.75,600.75,675.75, 0.5,50.5,100.5,150.5,200.5,250.5,300.5,350.5,400.5,450.5, 0.25,25.25,50.25,75.25,100.25,125.25,150.25,175.25,200.25,225.25) y <- c(0.05,4.91,9.78,14.64,19.51,24.38,29.24,34.11,38.97,43.84,