similar to: Plotting multiple curves with lattice graphs

Displaying 20 results from an estimated 5000 matches similar to: "Plotting multiple curves with lattice graphs"

2009 Sep 24
1
Fw: Re: Multiple Normal Curves
Sorry about the subject --- On Thu, 24/9/09, KABELI MEFANE <kabelimefane@yahoo.co.uk> wrote: From: KABELI MEFANE <kabelimefane@yahoo.co.uk> Subject: Re: [R] Multiply Normal Curves To: R-help@r-project.org Date: Thursday, 24 September, 2009, 11:48 AM R -helpers   i have been trying to do this problem without must success,i managed to do a graph for x, but it is not what i want to
2011 Nov 10
2
How does once import a function from an imported script?
Hi all, I am trying to import some functions into a script and am having difficulty in doing so. I am able to import a series of functions from a .tex file into my script, and call on each function by column name, however R reads them as data rather than as functions and I am struggling with the syntax to make R read them as a function instead. Below is a small set of the things I have tried:
2009 Sep 24
0
Multiply Normal Curves
R -helpers   i have been trying to do this problem without must success,i managed to do a graph for x, but it is not what i want to define,(i want to specify number of observations as well). I have also been able to do simple rendom sample.   data.frame(ID=c(1,2,3),mu=c(10000,34000,50000),sigma=c(2000,3000,5000)) curve(dnorm(x,mean=parms$mu[1],sd=parms$sigma[1]),from=2000, to=80000,
2009 Sep 24
0
Fw: Simulating and Plotting
R -helpers   i have been trying to do this problem without must success,i managed to do a graph for x, but it is not what i want to define. I have also been able to do simple rendom sample. If possible can someone help here is the code for the graph pleae help   data.frame(ID=c(1,2,3),mu=c(10000,34000,50000),sigma=c(2000,3000,5000)) curve(dnorm(x,mean=parms$mu[1],sd=parms$sigma[1]),from=2000,
2004 Jan 22
4
Fitting compartmental model with nls and lsoda?
Dear Colleagues, Our group is also working on implementing the use of R for pharmacokinetic compartmental analysis. Perhaps I have missed something, but > fit <- nls(noisy ~ lsoda(xstart, time, one.compartment.model, c(K1=0.5, k2=0.5)), + data=C1.lsoda, + start=list(K1=0.3, k2=0.7), + trace=T + ) Error in eval(as.name(varName), data) : Object
2010 Sep 09
5
Help on simple problem with optim
Dear all, I ran into problems with the function "optim" when I tried to do an mle estimation of a simple lognormal regression. Some warning message poped up saying NANs have been produced in the optimization process. But I could not figure out which part of my code has caused this. I wonder if anybody would help. The code is in the following and the data is in the attachment. da <-
2005 Nov 09
2
About: Error in FUN(X[[1]], ...) : symbol print-name too long
Hi, I??m trying to use the Win2BUGS package from R and I have a similar problem that reurns with the message: Error in FUN(X[[1]], ...) : symbol print-name too long But, there is no stray ` character in the file ( Sugestions given by: Duncan Temple Lang <duncan> Date: Mon, 26 Sep 2005 07:31:08 -0700 ) The progam in R is: library(R2WinBUGS) library(rbugs) dat <-
2009 Sep 08
1
optim() argument scoping: passing parameter values into user's subfunction
Dear useRs, I have a complicated function to be optimized with optim(), and whose parameters are passed to another function within its evaluation. This function allows for the parameters to enter as arguments to various probability distribution functions. However, I am violating some scoping convention, as somewhere within the hierarchy of calls a variable is not visible. I will give a
2006 Apr 20
2
nlminb( ) : one compartment open PK model
All, I have been able to successfully use the optim( ) function with "L-BFGS-B" to find reasonable parameters for a one-compartment open pharmacokinetic model. My loss function in this case was squared error, and I made no assumptions about the distribution of the plasma values. The model appeared to fit pretty well. Out of curiosity, I decided to try to use nlminb( ) applied to a
2005 Jul 19
2
Michaelis-menten equation
Dear R users: I encountered difficulties in michaelis-menten equation. I found that when I use right model definiens, I got wrong Km vlaue, and I got right Km value when i use wrong model definiens. The value of Vd and Vmax are correct in these two models. #-----right model definiens-------- PKindex<-data.frame(time=c(0,1,2,4,6,8,10,12,16,20,24),
2006 Aug 08
1
Fitting data with optim or nls--different time scales
Hi, I have a system of ODE's I can solve with lsoda. Model=function(t,x,parms) { #parameter definitions lambda=parms[1]; beta=parms[2]; d = parms[3]; delta = parms[4]; p=parms[5]; c=parms[6] xdot[1] = lambda - (d*x[1])- (beta*x[3]*x[1]) xdot[2] = (beta*x[3]*x[1]) - (delta*x[2]) xdot[3] = (p*x[2]) - (c*x[3]) return(list(xdot)) } I want
2007 Mar 03
3
How to convert List object to function arguments?
Dear R gurus, I have a function "goftests" that receives the following arguments: * a vector "x" of data values; * a distribution name "dist"; * the dots list ("...") containing a list a parameters to pass to CDF function; and calls several goodness-of-fit tests on the given data values against the given distribution. That is: ##### BEGIN CODE SNIP #####
2013 Feb 21
1
using and event in deSolve
Hi All Having been pointed the use of events and roots in deSolve, I was able to implement the Izchikevich model of spiking neurons. However, I'm not too sure of defining the event. The deSolve documentation says: An event is triggered when the ball hits the ground (height = 0) Then velocity (y2) is reversed and reduced by 10 percent. The root function, y[1] = 0, triggers the event: >
2006 Jan 20
1
Passing variable arguments to functions
Hi, Is there another way to pass arguments via a vector to arbitrary functions as in the following code example without using a series of if else statements? f <- test(func, x, parms, fargs1, fargs2, ...) { # parms is a vector of parameters to func. # ... is for use by f, not by func. n <- length(parms) if (n == 0) y <- func(x) else if (n == 1) y <- func(x,
2006 Mar 02
1
Named parameters in optim()
If I name the elements of the vector of initial values passed to optim(), then it attaches the names to the final result, e.g. > f <- function(parms) (parms[1]-1)^2+(parms[2]-2)^2 > optim(c(x=3,y=4), f) $par x y 0.9999635 2.0003241 $value [1] 1.063637e-07 $counts function gradient 65 NA $convergence [1] 0 $message NULL However, the vector that gets
2007 Oct 23
1
How to avoid the NaN errors in dnbinom?
Hi, The code below is giving me this error message: Error in while (err > eps) { : missing value where TRUE/FALSE needed In addition: Warning messages: 1: In dnbinom(x, size, prob, log) : NaNs produced 2: In dnbinom(x, size, prob, log) : NaNs produced I know from the help files that for dnbinom "Invalid size or prob will result in return value NaN, with a warning", but I am not able
2001 Aug 12
2
rpart 3.1.0 bug?
I just updated rpart to the latest version (3.1.0). There are a number of changes between this and previous versions, and some of the code I've been using with earlier versions (e.g. 3.0.2) no longer work. Here is a simple illustration of a problem I'm having with xpred.rpart. iris.test.rpart<-rpart(iris$Species~., data=iris[,1:4], parms=list(prior=c(0.5,0.25, 0.25))) + ) >
2013 Feb 18
1
attempt to apply non-function
Hi All I am getting the above mentioned error when I run the code below. I don't know why because I have implemented the function and I'm calling the function with a parameter. I'm obviously missing the plot ... Can someone perhaps point out the error of my ways? Error: > out<-ode(y=init, times=times, func=G1999, parms=parms, method="lsoda") Error in m_Na(v) : attempt
2017 Sep 22
0
update numeric values of list with new values...
Solved it: test <- list(a=1,b=2,c=3) new <- c(4,5,6) hold <- as.list(new) updated_test <- replace(test,c(1:3),hold) $a [1] 4 $b [1] 5 $c [1] 6 mean.parms <- as.list(mean.parms) mm.parms <- replace(far.parms,c(1:length(far.parms)),mean.parms) On 9/22/2017 10:34 AM, Evan Cooch wrote: > Suppose I have the following: > > test <- list(a=1,b=2,c=3) > > I
2002 Feb 01
1
typo and user-proofing in odesolve() (PR#1295)
A couple of minor points about the odesolve package (which I am otherwise enjoying very much): 1. "scalar" is misspelled as "scaler" in the definitions of the rtol and atol parameters 2. it is possible to crash R by doing something dumb, e.g failing to read the documentation carefully enough and (a) returning only a vector of derivatives and not a list of (derivatives,