similar to: how to take derivatives of a step function

Displaying 20 results from an estimated 7000 matches similar to: "how to take derivatives of a step function"

2003 Aug 27
5
selecting by variable
Hi, I'm a recent R convert so I haven't quite figured out the details yet... How do I select one variable by another one? Ie if I want to draw the histogram of variable X only for those individuals that also have a value Y in a certain range? In STATA I would give something like: histogram X if ((Y>=A & Y<=B)) (The data is for individuals and each individual has a number of
2005 Jul 19
2
Taking the derivative of a quadratic B-spline
Hello, I have been trying to take the derivative of a quadratic B-spline obtained by using the COBS library. What I would like to do is similar to what one can do by using fit<-smooth.spline(cdf) xx<-seq(-10,10,.1) predict(fit, xx, deriv = 1) The goal is to fit the spline to data that is approximating a cumulative distribution function (e.g. in my example, cdf is a 2-column matrix with x
2003 Dec 02
1
smoothing functions
Dear all, I am trying to program an estimator which maximizes a likelihood type objective function which is basically just lots of sums of indicator functions of data and parameters. In order to make the optimization I would like to smooth these functions. Since they are either 0 or 1, one possibility is to use the normal cdf. I am wondering whether anyone is aware of a less arbitrary choice
2016 Jul 19
2
GitHub Hooks
On 19 July 2016 at 23:16, Mehdi Amini <mehdi.amini at apple.com> wrote: >> In the past, we were hit by web spiders that ignored completely the >> robots.txt file. Anton has made that better, but it can escalate if >> the spider realise we blocked them. There are ways to work around, but >> not without accidentally blocking innocent people (mostly in China). > >
2004 Jul 02
1
help computing a covariance
Hi everyone, (This is related to my posting on chi-squared from a day ago. I have tried simulating this but I am still unable to calculate it analytically.) Let y be an n times 1 vector of random normal variables mean zero variance 1 and x be an n times k vector of random normal variables mean zero variance 1. x and y are independent. Then P is the projection matrix P=x*inv(x'*x)*x'
2003 Aug 23
2
help--kernel distribution dynamics
Deall all, I'm just learning R, but unfortunately I need to urgently do a rather more complex task so I need some help. I have just learnt the very basics a few days ago and am not ready yet to deal with panels and kernel densities, so a soft guidance would be most appreciated. I have a (very) large panel data set (400,000 individuals x50 time periods) and need to display the evolution of
2016 Jul 19
2
GitHub Hooks
Perhaps it helps to know that I have access to the machines and have helped debug many of the current problems. I'm not speaking from the outside, guessing how hard things are. I also think you are assuming a lot about where services can be hosted and at which cost (labour, not hardware). So, unless you are volunteering to take care of the whole infrastructure, I suggest taking the opinion
2003 Dec 15
1
distribution of second order statistic
Hi, I am getting some weird results here and I think I am missing something. I am trying to program a function that for a set of random variables drawn from uniform distributions plots that distribution of the second order statistic of the ordered variables. (ie I have n uniform distributions on [0, w_i] for w_i different w_j and i=1..n. I want to plot the distribution of the second order
2009 Nov 20
2
Problem with Numerical derivatives (numDeriv) and mvtnorm
I'm trying to obtain numerical derivative of a probability computed with mvtnorm with respect to its parameters using grad() and jacobian() from NumDeriv. To simplify the matter, here is an example: PP1 <- function(p){ thetac <- p thetae <- 0.323340333 thetab <- -0.280970036 thetao <- 0.770768082 ssigma <- diag(4) ssigma[1,2] <- 0.229502120
2009 May 10
4
Partial Derivatives in R
Quick question: Which function do you use to calculate partial derivatives from a model equation? I've looked at deriv(), but think it gives derivatives, not partial derivatives. Of course my equation isn't this simple, but as an example, I'm looking for something that let's you control whether it's a partial or not, such as: somefunction(y~a+bx, with respect to x,
2003 May 18
2
derivatives from loess (not locpoly)?
is there a way of estimating derivative curves, similar to the ones we get from 'locpoly', from 'loess' estimation. i am interested in estimation of 1st and 2nd derivatives... --------------------------------- [[alternate HTML version deleted]]
2005 Aug 04
2
Adding "sum" to derivatives table
Hi, Trying this: deriv(expression(sum(x)), "x") Gives the error message: Function 'sum' is not in the derivatives table I'd like to add it, is this difficult? If not, where is the derivatives table? However, give how basic "sum" is, I suspect it would have been added if it were straightforward. Do functions in the derivatives table need to be
2014 Oct 08
2
[LLVMdev] lld coding style
On Wed, Oct 8, 2014 at 10:16 AM, Chandler Carruth <chandlerc at google.com> wrote: > > On Wed, Oct 8, 2014 at 9:34 AM, Chris Lattner <clattner at apple.com> wrote: > >> > On Oct 8, 2014, at 1:55 AM, Renato Golin <renato.golin at linaro.org> >> wrote: >> > >> > On 8 October 2014 05:25, Chris Lattner <clattner at apple.com> wrote:
2023 Jan 31
1
How to calculate the derivatives at each data point?
Hi Konstantinos Not exactly derivative but > diff(df[,2]) [1] -0.01 -0.01 -0.01 -0.01 0.00 0.01 -0.02 -0.03 -0.02 May be enaough for you. Cheers Petr > > -----Original Message----- > From: R-help <r-help-bounces at r-project.org> On Behalf Of konstantinos > christodoulou > Sent: Tuesday, January 31, 2023 10:16 AM > To: r-help mailing list <r-help at
2006 Aug 14
1
Help with workaround for: Function '`[`' is not in the derivatives table
# This works fine: > a <- 1 > b <- 2 > c <- 3 > E <- expression(a * exp(b*X) + c) > X <- c(0.5, 1.0, 2.0) > eval(E) [1] 5.718282 10.389056 57.598150 > D(E, "b") a * (exp(b * X) * X) > eval(D(E, "b")) [1] 1.359141 7.389056 109.196300 # But if (a,b,c) are replaced with (A[1], A[2], A[3]), how can I get a derivative
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 <
2008 May 08
1
MOH and Licensed G729 codec
Hello All, Recently, I build three Asterisk 1.4 box and installed licensed copy of G729 codec. Before installing the G729 codec I tested the MOH on all three Asterisks box and it was working fine. So I install G729 codec and retested MOH and it was all wavy... Meaning the music was going up and down and missing bits and pieces and choppy... Any idea what did I do wrong? The MOH files are the
2011 Aug 06
1
How to estimate confidential intervals for the derivatives of cubic smoothing spline
Dear all, I want to use smooth.spline to construct a cubic smoothing spline and its first derivative to my data. However, the predict.smooth.spline does not seem to provide a SE for both the fitted values and their derivatives. How should I calculate it? Thank you very much, Bingzhang
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,
2006 Nov 23
1
Partial derivatives of a matrix with respect to a single element
UseRs, We are using projection matrices in demographic analyses, and one technique is to calculate partial derivatives of a matrix with respect to a variable appearing in one or more of its elements. For example, consider the matrix A: | a*b a*c | | d d | If I'm not mistaken, the partial derivative of matrix A w/ respect to variable 'a' is the matrix: | b c | | 0 0