similar to: Using a deriv function in nlme

Displaying 20 results from an estimated 1000 matches similar to: "Using a deriv function in nlme"

2006 Oct 30
1
nlme Error: Subscript out of bounds
Hello, I am new to non-linear growth modelling in R and I am trying to reproduce an analysis that was done (successfully) in S-Plus. I have a simple non-linear growth model, with no nesting. I have attempted to simplify the call as much as possible (by creating another grouped object, instead of using subset= and compacting the fixed and random expressions.) This is a what the grouped
2011 Jun 10
2
Plotting NLS profiles
Hello list, I'm trying to plot nls profiles, but the plot.profile.nls function in R doesn't seem to accept any plot.default variables. Specifically, I'd like to be able to change the x-axis title and the colors to black and white. Has anyone had any luck with this? If not, is there a way to override to plotting colors, perhaps in par()? Thanks, Sam fm1 <- nls(demand ~
2012 Aug 14
3
self-starter functions for y = a + b * c^x
Hi there are some predefined self-start functions, like SSmicmen, SSbiexp, SSasymp, SSasympOff, SSasympOrig, SSgompertz, SSflp, SSlogis, SSweibull, Quadratic, Qubic, SSexp (nlrwr) Btw, do you know graphic examples for this functions? The SSexpDecay (exponential decay) for y = (y0 - plateau)*exp(-k*x) + plateau from
2007 May 31
1
predict.nls - gives error but only on some nls objects
Dear list, I have encountered a problem with predict.nls (Windows XP, R.2.5.0), but I am not sure if it is a bug... On the nls man page, an example is: DNase1 <- subset(DNase, Run == 1) fm2DNase1 <- nls(density ~ 1/(1 + exp((xmid - log(conc))/scal)), data = DNase1, start = list(xmid = 0, scal = 1)) alg = "plinear", trace =
2006 Nov 22
0
questions about garchFit
Hi all, I was trying garchFIt() of fSeries to fit volatility of monthly log returns of S&P500. I tried residuals of normal, student t, skew normal, skew t. But all innovations except normal got exaxtly same coefficients, even if I changed their parameters of skew and shape. Is this correct for the data or something wrong? I am attaching the code, thank you. Muster #GARCH analysis of
2006 Nov 22
2
problems with garchFit
Hi all, I post it on both r-help and r-finance since I don't know where is most appropriate for this topic. Sorry if it bothers you. I did garch fitting on S&P500 monthly returns with garchFit from fSeries. I got same coefficients from all cond.dist except normal. I thought that is probabaly usual for the data. But when I play with it, I got another question. I plot skew normal with
2006 Apr 13
1
Guidance on step() with large dataset (750K) solicited...
Hi. Background - I am working with a dataset involving around 750K observations, where many of the variables (8/11) are unordered factors. The typical model used to model this relationship in the literature has been a simple linear additive model, but this is rejected out of hand by the data. I was asked to model this via kernel methods, but first wanted to play with the parametric
2006 Aug 20
2
how to the p-values or t-values from the lm's results
Dear friends, After running the lm() model, we can get summary resluts like the following: Coefficients: Estimate Std. Error t value Pr(>|t|) x1 0.11562 0.10994 1.052 0.2957 x2 -0.13879 0.09674 -1.435 0.1548 x3 0.01051 0.09862 0.107 0.9153 x4 0.14183 0.08471 1.674 0.0975 . x5 0.18995 0.10482 1.812 0.0732 . x6 0.24832 0.10059 2.469 0.0154 * x7
2006 Nov 22
1
plotting a groupedData object
Hello all, I am plotting a groupedData object and the key at the top of the graph runs off the page. I don't want to set key=F because it is useful (or would be if I could see it). Is it possible to explicitly cause the key to wrap? I have used this function before with no trouble but now I have just 5 groups with rather long descriptions (which I can't meaningfully shorten).
2012 Apr 02
1
Error: (subscript) logical subscript too long
Hello, I am trying to perform a logistic regression using counts. For example: cedegren <- read.table("http://www.cloudstat.org/index.php?do=/attachment/download/id_95 /", header=T) attach(cedegren) ced.del <- cbind(sDel, sNoDel) ced.logr <- glm(ced.del ~ cat + follows + factor(class), family=binomial("logit")) This works. However, if I change the family to
2005 Jan 07
0
Missing functionality in Blowfish for crypt(3)
The blowfish crypt(3) mechanism supports the use of a "cost value" for password encryption. The cost value is encoded into the encrypted password that is stored in master.passwd. On OpenBSD, this cost value can be set in login.conf. FreeBSD does not currently support the cost value. The cost value is the base-2 logarithm of the number of rounds of encryption to use so
2006 Nov 23
1
nonlinear regression-getting the explained variation
Hi, I'm trying to teach myself R, and by the way, re-learning statistics using Crawley's "Statistics: an introduction using R". I've reached the regression chapter, and when it deals with non-linear regresion using the nls library I face the following problem: I follow the steps--- >deer<-read.table("c:\\temp\\jaws.txt",header=T) ---data available at
2006 May 18
0
Showing SQL in script/console
Is there an easy way to display the SQL in script/console (similar to what is done in development.log)? The following works but it''s ugly: $ script/console Loading development environment. >> class ActiveRecord::ConnectionAdapters::AbstractAdapter >> def logger= (logr) >> @logger = logr >> end >> end => nil >>
2012 Jan 03
1
higher derivatives using deriv
Dear everyone, the following is obviously used to compute the nth derivative, which seems to work (deriv(sqrt(1 - x^2),x,n)) However, before using this, I wanted to make sure it does what I think it does but can't figure it out when reading the ?deriv info or any other documentation on deriv for that matter: deriv(expr, namevec, function.arg = NULL, tag = ".expr", hessian = FALSE,
2002 Apr 22
1
predict.*bSpline() bugs extrapolating for deriv >= 1 (PR#1473)
I've already fixed the bugs, but as with the last one, this is not critical enough to allow breaking current R-devel's code freeze. I hope I will have corrected it for 1.5.1.. ## Here is code reproducing the problems; ## I use try(.) whenever I know the current versions of R would ## give an error: library(splines) x <- c(1:3,5:6) y <- c(3:1,5:6) (isP <- interpSpline(x,y))#
2011 Apr 04
1
Deriving formula with deriv
Dear list, Hi, I am trying to get the second derivative of a logistic formula, in R summary the model is given as : ### >$nls >Nonlinear regression model >model: data ~ logistic(time, A, mu, lambda, addpar) >data: parent.frame() > A mu lambda >0.53243 0.03741 6.94296 ### but I know the formula used is #
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
2010 Jul 29
2
how to get higher derivatives with "deriv"
Dear ExpeRts, I have trouble implementing a function which computes the k-th derivative of a specified function f and returns it as a function. I tried to adapt what I found under ?deriv but could not get it to work. Here is how it should look like: ## specify the function f <- function (x,alpha) x^alpha ## higher derivatives DD <- function(expr, variable, order = 1) { if(order <
2001 May 28
0
bugs in deriv(*, *, function.arg = ) (PR#953)
Also, this should have gone in R-bugs quite a while ago : ------- start of forwarded message ------- From: Martin Maechler <maechler@stat.math.ethz.ch> To: R-core@stat.math.ethz.ch Subject: PROTECT() bugs in deriv(*, *, function.arg = ) Date: Mon, 16 Apr 2001 21:02:10 +0200 In R versions 0.50 and 0.64.2 , the following worked > deriv(expression(sin(cos(x) * y)),