similar to: Problems about Derivaties

Displaying 20 results from an estimated 900 matches similar to: "Problems about Derivaties"

2007 May 26
1
bug from nlm function (PR#9711)
Full_Name: bernardo moises lagos alvarez Version: 2.4.0 OS: Windows XP professional Submission from: (NULL) (152.74.219.16) I need obtained the MLE of weibull parameters using the nlm with exact gradient an hessian. I am doing. bug report :Erro en log(b) : el argumento "b" est? ausente, sin default 1.Construction to objectiv functin with n=1 data
2007 Jan 12
1
incorrect result of deriv (PR#9449)
Full_Name: Joerg Polzehl Version: 2.3.1 OS: x86_64, linux-gnu Submission from: (NULL) (62.141.176.22) I observed an incorrect behavior of function deriv when evaluating arguments of dnorm deriv(~dnorm(z,0,s),"z") expression({ .value <- dnorm(z, 0, s) .grad <- array(0, c(length(.value), 1), list(NULL, c("z"))) .grad[, "z"] <- -(z * dnorm(z))
2001 Oct 07
1
Bug in Deriv? (PR#1119)
deriv seems to have problems with a minus-sign before a bracket. Below are four examples of the same function, the top one is wrong, all others are correct (hopefully). Rest of expression not shown, it is the same for all versions. _ platform i386-pc-mingw32 arch x86 os Win32 system x86, Win32 status major 1 minor 3.0 year 2001 month 06 day 22 language R
2011 Nov 17
3
Obtaining a derivative of nls() SSlogis function
Hello, I am wondering if someone can help me. I have the following function that I derived using nls() SSlogis. I would like to find its derivative. I thought I had done this using deriv(), but for some reason this isn't working out for me. Here is the function: asym <- 84.951 xmid <- 66.90742 scal <- -6.3 x.seq <- seq(1, 153,, 153) nls.fn <- asym/((1+exp((xmid-x.seq)/scal)))
2009 Oct 19
2
How to get slope estimates from a four parameter logistic with SSfpl?
Hi, I was hoping to get some advice on how to derive estimates of slopes from four parameter logistic models fit with SSfpl. I fit the model using: model<-nls(temp~SSfpl(time,a,b,c,d)) summary(model) I am interested in the values of the lower and upper asymptotes (parameters a and b), but also in the gradient of the line at the inflection point (c) which I assume tells me my rate of
2001 May 01
0
SSfpl self-start sometimes fails... workaround proposed
Hello, nls library provides 6 self-starting models, among them: SSfp, a four parameters logistic function. Its self-starting procedure involves several steps. One of these steps is: pars <- as.vector(coef(nls(y ~ cbind(1, 1/(1 + exp((xmid - x)/exp(lscal)))), data = xydata, start = list(lscal = 0), algorithm = "plinear"))) which assumes an initial value of lscal equal to 0. If lscal
2023 Jan 09
1
return value of {....}
?s 14:47 de 09/01/2023, akshay kulkarni escreveu: > Dear members, > I have the following code: > >> TB <- {x <- 3;y <- 5} >> TB > [1] 5 > > It is consistent with the documentation: For {, the result of the last expression evaluated. This has the visibility of the last evaluation. > > But both x AND y are created, but the
2017 Feb 17
1
Wish List: Extensions to the derivatives table
The issue is that without an extensible derivative table or the proposed extensions, it is not possible to automatically produce (without manual modification of the deriv3 output) a function that avoids catastrophic cancellation regardless of the working range. Manual modification is not onerous as a one-time exercise, but can be time consuming when it must be done numerous times, for example
2004 May 14
2
NLME model question
Dear R-helpers I have a problem related to the use of NLME I think is simply a matter of getting the nlme coding correct, but i cannot get my brain around it I am analysing some 24 growth curves of some cells , and i wanted to say that there are significant differences between the curves in two parameters that describe the pattern of growth. these parameters are from a logistic (r & k)
2001 May 06
1
deriv3 example on Venables/Ripley page 263
What does it require to run the example on page 263 of Venables/Ripley book using R 1.3.0? I got the following error and I have no clue how to correct it. Thank you very much. (If you reply to the list, please send a copy to me.) > lmix2 <- deriv3( + ~ -log(p*dnorm((x-u1)/s1)/s1 + (1-p)*dnorm((x-u2)/s2)/s2), + c("p", "u1", "s1", "u2",
2023 Jan 09
5
return value of {....}
Dear members, I have the following code: > TB <- {x <- 3;y <- 5} > TB [1] 5 It is consistent with the documentation: For {, the result of the last expression evaluated. This has the visibility of the last evaluation. But both x AND y are created, but the "return value" is y. How can this be advantageous for solving practical problems?
2017 Feb 17
4
Wish List: Extensions to the derivatives table
The derivative table resides in the function D. In S+ that table is extensible because it is written in the S language. R is faster but less flexible, since that table is programmed in C. It would be useful if R provided a mechanism for extending the derivative table, or barring that, provided a broader table. Currently unsupported mathematical functions of one argument include expm1, log1p,
2023 Jan 09
2
return value of {....}
Unless you do something special within a function, only the value(s) returned are available to the caller. That is the essence of functional-type programming languages. You need to read up on (function) environments in R . You can search on this. ?function and its links also contain useful information, but it may too terse to be explicable to you. There are of course many available references on
2002 Mar 11
1
problem with deriv3?
Using S+ 6 for Linux and R 1.4.1 Taking verbatim some lines from S-Plus that work perfectly, and running them on R, I get an unexpected error message: R : Copyright 2002, The R Development Core Team Version 1.4.1 (2002-01-30) > library(MASS) > data <- read.table("/usr/local/data/mcmanus.dat",header=T) > mcmanus.frm <-
2023 Jan 11
1
return value of {....}
I am more than a little puzzled by your question. In the construct {expr1; expr2; expr3} all of the expressions expr1, expr2, and expr3 are evaluated, in that order. That's what curly braces are FOR. When you want some expressions evaluated in a specific order, that's why and when you use curly braces. If that's not what you want, don't use them. Complaining about it is like
2007 Jul 30
2
deriv, loop
Hi, 2 questions: Question 1: example of what I currently do: for(i in 1:6){sink("temp.txt",append=TRUE) dput(i+0) sink()} x=scan(file="temp.txt") print(prod(x)) file.remove("C:/R-2.5.0/temp.txt") But how to convert the output of the loop to a vector that I can manipulate (by prod or sum etc), without having to write and append to a file? Question 2: >
2004 Mar 24
1
Question on deriv3()
Hello: Why is deriv3() functioning differently in R from that in Splus using library(MASS) ? For example deriv3(~(t1*log(t2)+lgamma(t1)+(1-t1)*log(y)+y/t2),c("t1","t2"),function(y,t1,t2)NULL) complains of lgamma. Mervyn
2007 Oct 14
1
Extending deriv3()
Hello, I was wondering if the functions deriv3(), deriv() etc. could be extended to handle psigamma() and its special cases (digamma(), trigamma() etc.). From the error message it seems that 'psigamma' needs to be added to the derivatives table. This might be easy since psigamma() has a deriv argument. Additionally, this error message is also obtained when requesting for the Hessian of
2023 Jan 09
1
return value of {....}
Perhaps the following may be of use to you. Consider: > f <- function(){ x <- 3; function(y) x+y} > x <- 5 ##What does this give? > f() ## Why? ## How about this? >f()(10) ## Why? ## If you remove "x <- 3" from the above, what will you get when you repeat the exercise? -- Bert On Mon, Jan 9, 2023 at 8:29 AM Bert Gunter <bgunter.4567 at gmail.com>
2023 Jan 09
3
return value of {....}
Dear Valentin, But why should {....} "return" a value? It could just as well evaluate all the expressions and store the resulting objects in whatever environment the interpreter chooses, and then it would be left to the user to manipulate any object he chooses. Don't you think returning the last, or any value, is redundant? We are living in the 21st century