Displaying 20 results from an estimated 10000 matches similar to: "how to define the bound between parameters in nls()"
2011 Nov 18
0
how to define the bound between parameters in nls() (Jinsong Zhao)
The multiple exponential problem you are attempting has a well-known and long history.
Lanczos 1956 book showed that changing the 4th decimal in a data set changes the
parameters hugely.
Nevertheless, if you just need a "fit" and not reliable paramters, you could
reparameterize to k1 and k2diff=k2-k1, so k2=k1+kdiff. Then kdiff has a lower bound of 0,
though putting 0 will almost
2009 May 26
2
using lsoda() and nls() together
Thanks to Dieter Menne and Spencer Graves I started to get my way through
lsoda()
Now I need to use it in with nls() to assess parameters
I have a go with a basic example
dy/dt = K1*conc
I try to assess the value of K1 from a simulated data set with a K1 close to
2.
Here is (I think) the best code that I've done so far even though it crashes
when I call nls()
2007 Oct 24
1
Error in nls model.frame
Error in model.frame
When I run the following nls model an error message appears and I dont
know how to solve that. Could you help me??
mat = c(1,2,3,4,5,6,7,8,9,12,16,24,36,48,60)
for (i in 1:length(j30)) {
bliss = nls(c(j[i,1:length(mat)]) ~ b0 + b1*((1-exp(-k1*mat))/(k1*mat)) +
b2*(((1-exp(-k2*mat))/(k2*mat))-exp(-k2*mat)),
start = list(k1=0.1993, k2=0.1993, b0= 22.0046,
2007 Sep 22
0
error messages
Hi,
I have a density that I need to get MLEs from, which includes definite integrals both in the denominator and in the numerator of the density function. It looks like the outcome depends on the initial values given. My program is shown below:
library(circular)
########################################
4 parameters
########################################
z<-rvonmises(100,0,1)
2010 Jun 30
1
Solution to differential equation for nls function
Hello,
I am trying to find the analytical solution to this differential equation
dR/dt = k1*R (1-(R/Rmax)^k2); R(0) = Ro
k1, k2, and Rmax are parameters that need to fitted, while Ro is the
baseline value (which can be fitted or fixed). The response (R) increases
initially at an exponential rate governed by the rate constant k1.
Response has a S-shaped curve as a function of time and it
2004 Jan 23
0
cmptl_analy.R
Dear Michael,
One key is adjustment of nls optimizer tolerance. I notice it has to be
higher than usual, but, I recovered your noisy "known" parameter values
with an error of K1 (-7%) and k1 (-6%):
#### Miller problem with Dalgaard modifications
## Linares 1/22/2004
## Solution 1
nls(noisy ~ lsoda(xstart, time, one.compartment.model, c(K1=K1,
k2=k2))[,2],
data=C1.lsoda,
2006 Mar 11
1
Non-linear Regression : Error in eval(expr, envir, enclos)
Hi..
i have an expression of the form:
model1<-nls(y~beta1*(x1+(k1*x2)+(k1*k1*x3)+(k2*x4)+(k2*k1*x5)+(k2*k2*x6)+(k3*x7)+(k3*k4*x8)+(k3*k2*x9)+(k3*k3*x10)+ (k4*x11)+(k4*k1*x12)+(k4*k2*x13)+(k4*k3*x14)+(k4*k4*x15)+(k5*x16)+(k5*k1*x17)+(k5*k2*x18)+(k5*k3*x19)+
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
2012 Jun 14
0
fixed trimmed mean for j-group
Hello...i want to find the empirical rate for type 1 error using fixed
trimmed mean. To make it easy, i'm referring to journal given by this
website
http://www.academicjournals.org/ajmcsr/PDF/pdf2011/Yusof%20et%20al.pdf.
I already run the programme and there is no error in it but i got zero for
the empirical rate of type 1 error. The empirical rate for the type 1 error
given in the journal
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
2007 Jun 27
1
Another loop avoidance question.
Hi
I want to sum over one of the dimensions of a n x k1 x k2 array in
which each column is the product of the corresponding columns from two
matrices with dimensions n x k1 and n x k2. I can see two approaches:
a loop on k1 and a loop on k2. But I cannot figure a solution that
avoids the loop? Is it possible? (I don't refer to apply or lapply etc
either as they are just hidden loops so,
2012 Jul 07
0
fixed trimmed mean for group
Hello,
I haven't found errors in your code. I implemented the test in the paper
(the first, fixed symetric mean) and it also gives me zero Type I
errors, when alpha = 0.05. Try to see the value of min(pv) or to plot
the histogram of 'pv', hist(pv) and you'll see that there are no
significant p-values, at that level.
Anyway I'll continue to look at it, but my first
2010 Aug 20
5
paired samples, matching rows, merge()
Hi everyone!
I'm matching two samples to create one sample that have
pairs of observations equal for the k1 variable. Merge()
doesn't work because I dont't want to recycle the values.
x <- data.frame(k1=c(1,1,2,3,3,5),
k2=c(20,21,22,23,24,25))
x
y <- data.frame(k1=c(1,1,2,2,3,4,5,5),
k2=c(10,11,12,13,14,15,16,17))
y
merge(x,y,by="k1")
k1 k2.x k2.y
1 1 20
2009 Jul 23
1
[PATCH] Remove code duplication in comp_keys
comp_keys is duplicating what is done in btrfs_comp_cpu_keys, so just
call it.
Signed-off-by: Diego Calleja <diegocg@gmail.com>
---
fs/btrfs/ctree.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
Index: linux/fs/btrfs/ctree.c
===================================================================
--- linux.orig/fs/btrfs/ctree.c 2009-07-24 00:47:20.936410297 +0200
+++
2003 Mar 06
2
question about model formula
Dear R Gang,
I'm interested in using R and the nls package for fitting kinetic
models. I'm having some difficulty getting a model specified for
nls though. The math for the model that I want to fit is
dg(t)/dt = K1 f(t) - k2 g(t)
where g(t) and f(t) are measured data at a sequence of times t.
K1 and k2 are the parameters of the model. If I solve this, the
solution is
g(t) = K1
2018 Feb 25
0
include
Jim has been exceedingly patient (and may well continue to be so), but this smells like "failure to launch". At what point will you start showing your (failed) attempts at solving your own problems so we can help you work on your specific weaknesses and become self-sufficient?
--
Sent from my phone. Please excuse my brevity.
On February 25, 2018 7:55:55 AM PST, Val <valkremk at
2015 Jun 23
2
Call for testing: OpenSSH 6.9
On Tue, 23 Jun 2015, Jakub Jelen wrote:
>
> On 05/29/2015 09:12 AM, Damien Miller wrote:
> > Hi,
> >
> > OpenSSH 6.9 is almost ready for release, so we would appreciate testing
> > on as many platforms and systems as possible. This release contains
> > some substantial new features and a number of bugfixes.
> Tested basic configuration on Fedora 22. With
2013 Apr 11
0
plotting the cumulative hazard function of a process whose intensity function is specified
I would like to simulate a stochastic process by specifying an intensity function, say
lambda(t)=0.05 + 3 exp(鈭抰)
I have the following code, but it has a number of problems. One issue I have is I do not know where the time variable is. I would appreciate your help with this code.
library("survival")
n <- 5000
lamc<-0.08
k1<-0.05
k2<-3
ld<-function(t){k1+k2}
2011 May 04
0
Fwd: simple question
Sorry I had typo in previous email,
this typo corrected version:
Dear R experts
I have simple question, please execuse me:
#example data, the real data consists of 20000 pairs of variables
K1 <- c(1,2,1, 1, 1,1); K2 <- c(1, 1,2,2, 1,2); K3 <- c(3, 1, 3, 3, 1, 3)
M1a <- rep( K1, 100); M1b <- rep(K2, 100)
M2a <- rep(K1, 100); M2b <- rep(K1, 100)
M3a <- rep(K1, 100); M3b
2018 Feb 25
2
include
HI Jim and all,
I want to put one more condition. Include col2 and col3 if they are not
in col1.
Here is the data
mydat <- read.table(textConnection("Col1 Col2 col3
K2 X1 NA
Z1 K1 K2
Z2 NA NA
Z3 X1 NA
Z4 Y1 W1"),header = TRUE,stringsAsFactors=FALSE)
The desired out put would be
Col1 Col2 col3
1 X1 0 0
2 K1 0 0
3 Y1 0 0
4 W1 0 0
6 K2 X1