similar to: nls singular gradient ..as always..

Displaying 20 results from an estimated 100 matches similar to: "nls singular gradient ..as always.."

2011 Oct 19
1
hypothetical prediction after polr
Dear R-Help listers, I am trying to estimate an proportional odds logistic regression model (or ordered logistic regression) and then make predictions by supplying a hypothetical x vector. However, somehow this does not work. I guess I must have missed something here. I first used the polr function in the MASS package, and I create a data frame and supply it to the predict function (see below):
2016 Apr 05
1
Heatmap Colnames
Hello, please see below my code for a heatmap. Unfortunately my column names do not completely appear. Can you please send me the appropriate code to visualise them? Many Thanks! Nils library(GMD) dat<-data.frame(EntryA=as.numeric(c(4.24,3,1.66,1.28,1.2,-1.32,-1.88)), EntryB=as.numeric(c(4.16,4.82,-1.82,-3.02,0.99,1.1,-3.31)))
2010 Jun 07
2
mgcv
Hello Sir, I am using mgcv package for my data. My model is y~x1+f(x2),I want to find out the function f(x2) . Following is the code.   sm1=gam(y~x1+s(x2),family=binomial, f) summary(sm1) plot(sm1,residuals=TRUE, xlab="AGE",pch=20)   In this plot I am getting S(x2,1.93) on y axixs  How should I get the function for x2 from this plot.or Is there anyother procedure in R  to get this
2011 May 11
3
Vermunt's LEM in R
I don't know of any R package that can match all the functionality of LEM eg fitting equality constraints to model parameters a la LISREL. WRT dumping tables, I would have thought that as.data.frame.table does pretty much what you want, [not tested] newtab <- as.data.frame(table(a,b,c)) cat("dim\n") for(i in seq(1, ncol(newtab)-1) { cat(nlevels(newtab[,1]," ") }
2012 Jul 25
3
creating Pivot
Hi Friends, I'm new to R.I have a data frame : xxx having columns color name values R XXX 10 G YYY 4 Y ZZZ 5 G XXX 2
2003 Dec 11
1
packaging standards for rda files?
Dear everybody: We used the fine foreign library to bring in an SPSS dataset that was about 9 megabytes and I can squeeze it into a much smaller R object using compression with save(ndat, file="NatAnnES2000.rda", compress=T). I can use load() to get the "ndat" dataframe back, that's all good as far as I can see. If I put that file in the data subdirectory, then the
2013 Jun 20
0
R-help Digest, Vol 124, Issue 21
And it could be that you should try nlmrt or minpack.lm. I don't think you were at my talk in Jena May 23 -- might have been very helpful to you. JN On 13-06-20 06:00 AM, r-help-request at r-project.org wrote: > Message: 47 > Date: Wed, 19 Jun 2013 13:17:29 -0500 > From: "Adams, Jean"<jvadams at usgs.gov> > To: pakoun<pkount at bgc-jena.mpg.de> > Cc: R
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 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
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
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
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
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 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.
2005 Aug 08
1
bug found in predict.locfit in locfit package (PR#8057)
Full_Name: Somkiat Apipattanavis Version: 2.1.1 OS: Windows Submission from: (NULL) (128.138.44.123) Bug found in predict.locfit for density estimation # Example of bug found in prdict.locfit (Locfit) library('locfit') # generate data y =c(4281,2497,4346,5588,5593,3474,4291,2542,5195,4056, 3114,2864,4904,7625,3377,4001,4999,7191,8062,5668) x1=c( 0.258729, 1.460156, 0.192323,
2007 Jun 16
1
mardia's test
In the R code of Mardia's test, what does the line " x1 = x[x[, p] == i, -p]" mean? Thanks a lot! function (x) { p = dim(x)[2] f = p - 1 clases = length(table(x[, p])) for (i in 1:clases) { x1 = x[x[, p] == i, -p] ndat = dim(x1)[1] mo3 = mo3(x1) mard1 = ndat * mo3/6 cat("Mardia's test for class", i,
2005 Oct 05
0
bug found in predict.locfit in locfit package ( PR#8057)
Apologies for the coming to this late... 1. By now I hope Somkiat has realized that R-bugs is not the place to report problems in contributed packages. Please direct such reports to the package maintainer. 2. This is really user error. predict() expect the newdata to be a data frame containing variables with the same names as those used in the fitting process. E.g., you fitted the model with
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
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
2000 Nov 09
2
simple mixture
Dear All, I am trying to do some simple mixture analyses. For instance, I have a sample of n observations and I suspect they come from two different exponential distributions with parameters rate1 and rate2, respectively. So, I want to estimate rate1, rate2, and the proportions of both kinds of individuals in the sample. I had a look at the packages mda and mclust, but they do not seem to do this