similar to: R2.4 xyplot + panel.number problem

Displaying 20 results from an estimated 10000 matches similar to: "R2.4 xyplot + panel.number problem"

2011 Apr 20
1
How can I 'predict' from an nls model with a fit specified for separate groups?
Following an example on p 111 in 'Nonlinear Regression with R' by Ritz & Streibig, I have been fitting nls models using square brackets with the grouping variable inside. In their book is this example, in which 'state' is a factor indicating whether a treatment has been used or not: > Puromycin.m1 <- nls(rate ~ Vm[state] * + conc/(K[state] + conc), data = Puromycin,
2009 Nov 17
1
Define lm/glm object without evaluating them
For e.g. lm/glm type models I would like to separate model specification and model fitting and then only fit the models later 'when data arrives'. To be specific, I would like make a specification like m1 <- lm(rate~conc) m2 <- lm(rate~I(conc^2)) and then later I want to 'put data into' the objects and evaluate (fit the model), e.g. something like update(m1, data=Puromycin)
2003 Oct 30
2
'nls' and its arguments
Dear R experts! I'd to fit data by 'nls' with me-supplied function 'fcn'. 1) I'd like 'fcn' to accept arbitrary arguments, i.e. I defined it as f(...) {<body>}. (Ok, that's not actually impotant). 2) Second, I would NOT like to supply every parameter in the formula. To illustrate this, let's look at the last example of 'nls' help
2004 May 21
1
Buglet/omission in nls package (PR#6901)
Dear all, I noticed the following under R 1.8.1 (when nls was still a separate package) but the same problem occurs under R 1.9.0 (where most (all?) of nls is now in the stats package): > data(Puromycin) > fm <- nls(rate~SSmicmen(conc,b0,b1), Puromycin, subset = state=="treated") > coef(summary(fm)) NULL The problem seems to be that summary.nls uses the name
2003 Oct 28
2
Confidence ellipse for correlation
Hello, SAS' point and click interface has the option of produce a scatterplot with a superimposed confidence ellipse for the correlation coefficient. Since I generally like R so much better, I would like to reproduce this in R. I've been playing with the ellipse package. In order to have the points and the ellipse on the same graph I've done the following. (Load ellipse
2008 Nov 03
2
standard errors for predict.nls?
Dear all, Is there a way to retrieve standard errors from nls models? The help page tells me that arguments such as se.fit are ignored... Many thanks and best wishes Christoph -- Dr. rer.nat. Christoph Scherber University of Goettingen DNPW, Agroecology Waldweg 26 D-37073 Goettingen Germany phone +49 (0)551 39 8807 fax +49 (0)551 39 8806 Homepage http://www.gwdg.de/~cscherb1
2005 Jul 11
2
Weighted nls
Dear R Community, I am attempting to perform a weighted non-linear least squares fit. It has already been noted that the weights option is not yet implemented for the nls function, but no one seems to offer any suggestions for getting around this problem. I am still curious if a) anyone has code they have written which includes a weight options for nls, or b) if there is another model which
2004 Feb 02
1
Robust nonlinear regression - sin(x)/x?
You reall have only one parameter in your model, c = a/b. You can't identify both a and b from your model, therefore, you should fit the linear model: lm(z ~ c* sin(x)/x) Ravi. ----- Original Message ----- From: cstrato <cstrato at aon.at> Date: Monday, February 2, 2004 2:28 pm Subject: [R] Robust nonlinear regression - sin(x)/x? > Dear all > > Since I did not receive any
2004 Nov 08
2
Nonlinear weighted least squares estimation
Hi there, I'm trying to fit a growth curve to some data and need to use a weighted least squares estimator to account for heteroscedasticity in the data. A weights argument is available in nls that would appear to be appropriate for this purpose, but it is listed as 'not yet implemented'. Is there another package which could implement this procedure? Regards, Robert Brown
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.
2009 Aug 13
1
R code to reproduce (while studying) Bates & Watts 1988
Hi R users, I'm here trying to understand correlated residuals in nonlinear estimation. I'm reading/studying the book Bates, D. M. and D. G. Watts, (1988), /Nonlinear regression analysis and its applications/, Wiley, NY. pages 92-94, trying to reproduce the figures and to find out the code in R to perform the necessary calculations. I also consulted Pinheiro and Bates, but without
2009 Mar 22
1
Estimating LC50 from a Weibull distribution
I am attempting to estimate LC50 (analogous to LD50, but uses exposure concentration rather than dose) by fitting a Weibull model; but I can't seem to get it to work. From what I can gather, I should be using survreg() from the survival package. The survreg() function relies on time-to-event data; my data result from 96 h exposures (i.e., dead or alive after a fixed period; 96 h). I've
2009 Aug 17
1
[Fwd: Re: R code to reproduce (while studying) Bates & Watts 1988]]]
Kevin Wright wrote: > library(nlme) > m2 <- gnls(conc ~ t1*(1-t2*exp(-k*time)), > data = df.Chloride, > start = list( > t1 = 35, > t2 = 0.91, > k = 0.22)) So my error was to use nls instead that gnls. Thanks a lot, Kevin. > summary(m2) > plot(m2) > lag.plot(resid(m2), do.lines=FALSE) >
2014 Mar 17
5
LD50
Quiero comparar varias dosis letales 50% (LD50) usando análisis probit. He seguido un ejemplo que viene en paquete DRC, pero no obtengo el resultado esperado. Lo que quiero es saber si las LD50s, son diferentes y si la diferencias son estadísticamente significativas. Gracias de antemano. José Arturo e-mail. jafarfan@uady.mx <grejon@uady.mx> e-mail alterno. jafarfan@gmail.com
2007 Feb 21
3
Different gridlines per panel in xyplot
In the example R script below, horizontal gray gridlines are drawn at y coordinates where the points are drawn with the code: panel.abline(h=y, v=xScale, col.line="gray") How do I change this so that the horizontal gray gridlines are drawn at y coordinates where the y labels are drawn? The challenge is that each panel has different y-ranges (in my real example the y-ranges and
2006 Dec 14
2
xyplot: discrete points + continuous curve per panel
I have a number of x, y observations (Time, Conc) for a number of Subjects (with subject number Subj) and Doses. I can plot the individual points with xyplot fine: xyplot(Conc ~ Time | Subj, Groups=Dose, data=myData, panel = function(x,y) { panel.xyplot(x, y) panel.superpose(???) # Needs more here } ) I also like to plot on
2011 Aug 16
1
deSolve, extracting variable values from inside ode function
I'm just getting to grips with using ode function and have used the examples and vignettes to produce a small model of a one-pool, michaelis-menten, enzyme kinetic reaction. The rate of flux of substrate into pool A is constant (fluxoa) however the rate of flux out of pool A is controlled by the HMM equation (v = Vmax/ ( 1 + (Km / Concentration A )) ). This function works fine and
2009 Dec 18
2
NLS-Weibull-ERROR
Hello I was trying to estimate the weibull model using nls after putting OLS values as the initial inputs to NLS. I tried multiple times but still i m getting the same error of Error in nlsModel(formula, mf, start, wts) : singular gradient matrix at initial parameter estimates. The Program is as below > vel <- c(1,2,3,4,5,6,7,8,9,10,11,12,13,14) > df <- data.frame(conc, vel) >
2012 Nov 08
2
Comparing nonlinear, non-nested models
Dear R users, Could somebody please help me to find a way of comparing nonlinear, non-nested models in R, where the number of parameters is not necessarily different? Here is a sample (growth rates, y, as a function of internal substrate concentration, x): x <- c(0.52, 1.21, 1.45, 1.64, 1.89, 2.14, 2.47, 3.20, 4.47, 5.31, 6.48) y <- c(0.00, 0.35, 0.41, 0.49, 0.58, 0.61, 0.71, 0.83, 0.98,
2004 Jul 16
1
highlighting subset of point with xyplot (or Hmisc(xYplot))
Hello all, I am trying to use xyplot to give a six panel plot and to highlight only points (in any panel) that meet a certain criterion. With the plot command I would do something like: plot.default(filein$Site,filein$circ.conc) points(filein$Site,filein$circ.conc,type="p", pch=ifelse(filein$p.value<5e-02,19,21)) I had thought I could just stick in the pch line from above into