similar to: problem with Gauss Hermite ( x and w )

Displaying 20 results from an estimated 500 matches similar to: "problem with Gauss Hermite ( x and w )"

2004 May 28
3
gauss.hermite?
The search at www.r-project.org mentioned a function "gauss.hermite{rmutil}". However, 'install.packages("rmutil")' produced, 'No package "rmutil" on CRAN.' How can I find the current status of "gauss.hermite" and "rmutil"? Thanks, Spencer Graves
2006 Feb 27
1
gauss.hermite function
Hi, I am trying to find a function that returns simply the weights and points of an n point gauss hermite integeration, so that I can use them to fit a non-standard likelihood. I have found some documentation for the function 'gauss.hermite' written by jim lindley, but can't find the actual binary on CRAN I'm aware there are lots of functions like glmm, glmmML etc to fit mixed
2023 Nov 09
1
Dependency errors for package pracma
I tried to update my package {pracma} on CRAN from 2.4.2 (2022-09-21) to version 2.4.4 (2023-11-08). This package reverse depends / imports / suggests on 350 packages on CRAN and 25 packages on Bioconductor. The only changes are small corrections on some help files, a new function for stereographic projection, and `gcd` and `Lcm` require integer inputs now (these functions are not used in the
2012 Mar 23
3
R numerical integration
Hi all, Is there any other packages to do numerical integration other than the default 'integrate'? Basically, I am integrating: integrate(function(x) dnorm(x,mu,sigma)/(1+exp(-x)),-Inf,Inf)$value The integration is ok provided sigma is >0. However, when mu=-1.645074 and sigma=17535.26 It stopped working. On the other hand, Maple gives me a value of 0.5005299403. It is an
2013 Feb 15
1
minimizing a numerical integration
Dear all, I am a new user to R and I am using pracma and nloptr libraries to minimize a numerical integration subject to a single constraint . The integrand itself is somehow a complicated function of x and y that is computed through several steps. i formulated the integrand in a separate function called f which is a function of x &y. I want to find the optimal value of x such that the
2012 Dec 31
2
code to convert 3D geographical coordinates to Cartesian?
Is there packaged code to convert geographical coordinates (e.g., longitude, latitude, elevation) to Cartesian coordinates in 3-space? I can see how to do this using 1. a spherical-to-Cartesian conversion like pracma::sph2cart(tpr) http://cran.r-project.org/web/packages/pracma/ 2. a geographical-to-spherical conversion. This seems to involve (in roughly increasing order of difficulty or
2012 Jan 27
3
Numerical instability in new R Windows development version
I have a question concerning the new Windows toolchain for R >= 2.14.2. When trying out my package 'pracma' on the win-builder development version it will stop with the following error message: > f3 <- function(x, y) sqrt((1 - (x^2 + y^2)) * (x^2 + y^2 <= 1)) > dblquad(f3, -1, 1, -1, 1) # 2.094395124 , i.e. 2/3*pi , err = 2e-8 Warning in sqrt((1 - (x^2 + y^2)) *
2023 Aug 13
4
Noisy objective functions
While working on 'random walk' applications, I got interested in optimizing noisy objective functions. As an (artificial) example, the following is the Rosenbrock function, where Gaussian noise of standard deviation `sd = 0.01` is added to the function value. fn <- function(x) (1+rnorm(1, sd=0.01)) * adagio::fnRosenbrock(x) To smooth out the noise, define another
2013 Feb 18
2
error: Error in if (is.na(f0$objective)) { : argument is of length zero
Dear all, I tried running the following syntax but it keeps running for about 4 hours and then i got the following errors: Error in if (is.na(f0$objective)) { : argument is of length zero In addition: Warning message: In is.na(f0$objective) : is.na() applied to non-(list or vector) of type 'NULL' Here is the syntax itself: library('nloptr') library('pracma') #
2007 May 08
1
Piecewise cubic Hermite interpolation
Which function implements the piecewise cubic Hermite interpolation? I am looking for equivalent of matlab's interp1 with the method = 'pchip' Here is the reference http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/ref/interp1.html& -- View this message in context:
2006 Dec 11
1
hermite and Bezier splines
Does anyone know how to do hermite or Bezier splines in R? I can find Matlab routines, but really need to implement them in R. Failing that I'd be interested in other conformal splines. I need to smooth and interpolate animal tracking data. Antarctic Wildlife Research Unit School of Zoology University of Tasmania PO Box 252-05 Hobart TAS, 7001 Australia Phone: (0)3 6226 2645 Fax:
2012 May 16
3
triangular matrices input/output
Hi, Is there any package that deals with triangular matrices? Say ways of inputting an upper (lower) triangular matrix? Or convert a vector of length 6 to an upper (lower) triangular matrix (by row/column)? Thanks! ----- ###################### PhD candidate in Statistics Big R Fan Big LEGO Fan Big sTaTs Fan ###################### -- View this message in context:
2010 Nov 14
1
Integrate to 1? (gauss.quad)
Does anyone see why my code does not integrate to 1? library(statmod) mu <- 0 s <- 1 Q <- 5 qq <- gauss.quad(Q, kind='hermite') sum((1/(s*sqrt(2*pi))) * exp(-((qq$nodes-mu)^2/(2*s^2))) * qq$weights) ### This does what's it is supposed to myNorm <- function(theta) (1/(s*sqrt(2*pi))) * exp(-((theta-mu)^2/(2*s^2))) integrate(myNorm, -Inf, Inf)
2013 Jul 17
2
Using RasterBricks
Dear listers, I am trying to create a RasterLayer of the values of a rasterbrick object. The rasterbrick object has, for example, 100cells library(raster) r <- raster(ncol=10, nrow=10) r[]=1:ncell(r) s <- brick(r,r,r) s <- s * 1:3 Each cell of the rasterfinal will have the AREA UNDER CURVE formed by the values in each cell of the three original rasters. For example: s[4] has the
2024 Feb 24
1
Clustering Functions used by Reverse-Dependencies
Dear R Users, Are there any tools to extract the function names called by reverse-dependencies? I would like to group these functions using clustering methods based on the co-occurrence in the reverse-dependencies. Utility: It may be possible to split complex packages into modules with fewer reverse-dependencies. Package pkgdepR may offer some of the functionality; but I did not have time to
2012 Apr 02
2
Error in gamma(delta + (complex(0, 0, 1) * (x - mu))/alpha) : unimplemented complex function
I am trying to obtain the grafic of a pdf . but this error keeps showing . Here is the code MXN.fd = function(x,alpha,beta,mu,delta) { A = (2*cos(beta/2))^(2*delta) B = 2*alpha*pi*gamma(2*delta) C = (beta*(x-mu))/alpha D = abs(gamma(delta + (complex(0,0,1)*(x-mu))/alpha)^2) M = A/B*exp(C)*D M plot(x,M,type="l",lwd=2,col="red") } alpha = 0.02612297 beta = -0.50801886 mu =
2006 May 05
0
Spline integration & Gaussian quadrature (was: gauss.quad.prob)
Spencer Thanks for your thoughts on this. I did a bit of work and did end up with a method (more a trick), but it did work. I am certain there are better ways to do this, but here is how I resolved the issue. The integral I need to evaluate is \begin{equation} \frac{\int_c^{\infty} p(x|\theta)f(\theta)d\theta} {\int_{-\infty}^{\infty} p(x|\theta)f(\theta)d\theta} \end{equation} Where
2006 Apr 28
1
gauss.quad.prob
I've written a series of functions that evaluates an integral from -inf to a or b to +inf using equally spaced quadrature points along a normal distribution from -10 to +10 moving in increments of .01. These functions are working and give very good approximations, but I think they are computationally wasteful as I am evaluating the function at *many* points. Instead, I would prefer to use
2011 Nov 10
2
performance of adaptIntegrate vs. integrate
Dear list, [cross-posting from Stack Overflow where this question has remained unanswered for two weeks] I'd like to perform a numerical integration in one dimension, I = int_a^b f(x) dx where the integrand f: x in IR -> f(x) in IR^p is vector-valued. integrate() only allows scalar integrands, thus I would need to call it many (p=200 typically) times, which sounds suboptimal. The
2011 Nov 22
5
x, y for point of intersection
Hi everyone, ? I am trying to get a point of intersection between a polyline and a straight line ?.. and get the x and y coordinates of this point. For exemplification consider this: ? ? set.seed(123) ? k1 <-rnorm(100, mean=1.77, sd=3.33) ?k1 <- sort(k1) q1 <- rnorm(100, mean=2.37, sd=0.74) q1 <- sort(q1, decreasing = TRUE) plot(k1, q1, xlim <- c((min(k1)-5),