similar to: nlm() problem or MLE problem?

Displaying 20 results from an estimated 200 matches similar to: "nlm() problem or MLE problem?"

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 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))
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
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'
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
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
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
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
2006 Jul 03
0
Questions concerning function 'svm' in e1071 package
Greetings everyone, I have the following problem (illustrating R-code at bottom of mail): Given a training sample with binary outcomes (-1/+1), I train a linear Support Vector Machine to separate them. Afterwards, I compute the weight vector w in the usual way, and obtain the fitted values as w'x + b > 0 ==> yfitted = 1, otherwise -1. However, upon verifying with the
2012 Jan 02
1
sm.density.compare - a lot of curves
Dear all, Let say I have a sets of numbers: rno1 = rnorm(1000) rno2 = rnorm(1000) If I write request as follow: sm.density.compare (rno, rno3, xfit=min(rno), max(rno2)) why I receive a lot of curves in my plot, while I have only two data sets? regards Przemek -- View this message in context: http://r.789695.n4.nabble.com/sm-density-compare-a-lot-of-curves-tp4253039p4253039.html Sent from the
2013 Jun 19
1
nls singular gradient ..as always..
Hi all. Sorry for posting again such a topic but I went through previous posts but couldn't find a solution. I use the following code to fit an exponential model to my data. I have 4 different datasets. For 3 datasets nls seems to work fine and I have no error messages. But for 1 dataset I am getting the "world known" singular gradient error. xfit.dNEE <-
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.
2004 Aug 25
3
Beginners Question: Make nlm work
Hello, I'm new to this and am trying to teach myself some R by plotting biological data. The growth curve in question is supposed to be fitted to the Verhulst equation, which may be transcribed as follows: f(x)=a/(1+((a-0.008)/0.008)*exp(-(b*x))) - for a known population density (0.008) at t(0). I am trying to rework the example from "An Introduction to R" (p. 72) for my case and
2009 Oct 25
1
lsfit residuals
I'm trying to extract the points above and below a particular lsfit. I can only get the residuals from the original fit though. x = runif(100, 0, 10) plot(x) abline(lsfit(1:100, test)) abline(lsfit(1:100, test + sd(test))) #I want the points above THIS line. Is there a way to use the coefficients from the fit to do this? Thanks for any help.
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
2008 Mar 19
0
Error en nlm(logdgenexpn, p = c(vmomest[[1]], vmomest[[2]]), x = x.genexp, : valor no finito provisto por 'nlm'
Dear useRs, I am analysing the behaviour of MLE for the two parameters of a kind of exponential distribution, leaving as initial values the estimators moments produced by the variation coefficient. I do using simulations, giving them an accountant, r. But running my codes remains a problem with the nlm function. To review details wearing On one of the lines put status
2010 Jun 15
1
Error in nlm : non-finite value supplied by 'nlm'
Hello, I am trying to compute MLE for non-Gaussian AR(1). The error term follows a difference poisson distribution. This distribution has one parameter (vector[2]). So in total I want to estimate two parameters: the AR(1) paramter (vector[1]) and the distribution parameter. My function is the negative loglikelihood derived from a mixing operator. f=function(vector)
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
2003 Oct 24
1
first value from nlm (non-finite value supplied by nlm)
Dear expeRts, first of all I'd like to thank you for the quick help on my last which() problem. Here is another one I could not tackle: I have data on an absorption measurement which I want to fit with an voigt profile: fn.1 <- function(p){ for (i1 in ilong){ ff <- f[i1] ex[i1] <- exp(S*n*L*voigt(u,v,ff,p[1],p[2],p[3])[[1]]) } sum((t-ex)^2) } out <-
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