search for: quadratur

Displaying 20 results from an estimated 113 matches for "quadratur".

Did you mean: quadrature
2007 Mar 21
2
Gaussian Adaptive Quadrature
Hi all, Does anybody know any function that performs gaussian adapative quadrature integration of univariate functions? Thanks in advance, Regards, Caio __________________________________________________ [[alternative HTML version deleted]]
2006 May 05
0
Spline integration & Gaussian quadrature (was: gauss.quad.prob)
...\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 p(x|\theta) is the likelihood for the Rasch item response theory model and f(\theta) is the population distribution. Originally, I was using numerical quadrature by summing from -10 to 10 in increments of .01 for the denominator and from c to 10 for the numerator. This worked, but was rather expensive. Now, the gauss.quad.prob function provides weights that I can use for the denominator via: > gauss.quad.prob(49, dist='normal', mu=mu, sigma=sig...
2009 May 08
1
ADAPTIVE QUADRATURE WEIGHTS AND NODES
Can anyone help me on how to get the nodes and weights of the adaptive quadrature using R. Best wishes Boikanyo. ----- The University of Glasgow, charity number SC004401
2010 Apr 14
2
Gaussian Quadrature Numerical Integration In R
Hi All, I am trying to use A Gaussian quadrature over the interval (-infty,infty) with weighting function W(x)=exp(-(x-mu)^2/sigma) to estimate an integral. Is there a way to do it in R? Is there a function already implemented which uses such weighting function. I have been searching in the statmode package and I found the function "gauss....
2008 Sep 27
3
Double integration - Gauss Quadrature
Hi, I would like to solve a double integral of the form \int_0^1 \int_0^1 x*y dx dy using Gauss Quadrature. I know that I can use R's integrate function to calculate it: integrate(function(y) { sapply(y, function(y) { integrate(function(x) x*y, 0, 1)$value }) }, 0, 1) but I would like to use Gauss Quadrature to do it. I have written the following code (using R's statmod package) which works...
2008 Mar 12
3
Types of quadrature
Dear R-users I would like to integrate something like \int_k^\infty (1 - F(x)) dx, where F(.) is a cumulative distribution function. As mentioned in the "integrate" help-page: integrate(dnorm,0,20000) ## fails on many systems. This does not happen for an adaptive Simpson or Lobatto quadrature (cf. Matlab). Even though I am hardly familiar with numerical integration the implementation seems to be fairly straightforward. My questions: - Is this extension of the function "integrate" planned for upcoming versions of R? - Do there exist packages / workarounds? I'm using R...
2011 Nov 06
2
how to use quadrature to integrate some complicated functions
...icated uni-dimensional function of the following form Phi(x-a_1)*Phi(x-a_2)*...*Phi(x-a_{n-1})*phi(x-a_n). Here n is about 5000, Phi is the cumulative distribution function of standard normal, phi is the density function of standard normal, and x ranges over (-infty,infty). My idea is to to use quadrature to handle this integral. But since Phi has not cloaed form, I don't know how to do this effeciently. I appreciate very much if someone has any ideas about it. Thanks! Jeff -- View this message in context: http://r.789695.n4.nabble.com/how-to-use-quadrature-to-integrate-some-complicated-func...
2011 Apr 16
1
spatstat regression troubles
...4] units > people_empty planar point pattern: 2828 points window: rectangle = [73, 135] x [18, 54] units > Now, I also have observed values for two covariates, Z1 and Z2 for both the 944 and 2828 points in dataframe form. Finally, following the documentation, I was able to create one quadrature Q, with 944 points and 2828 dummy points that correctly takes the points where we had an event (people_exist) and the points where we don't have an event (people_empty). > people_quadrature Quadrature scheme 944 data points, 2828 dummy points Total weight 1098.64 How do I use the Quadr...
2013 Oct 11
3
Gaussian Quadrature for arbitrary PDF
Hi all, We know that Hermite polynomial is for Gaussian, Laguerre polynomial for Exponential distribution, Legendre polynomial for uniform distribution, Jacobi polynomial for Beta distribution. Does anyone know which kind of polynomial deals with the log-normal, Student抯 t, Inverse gamma and Fisher抯 F distribution? Thank you in advance! David [[alternative HTML version deleted]]
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 true Gaussan Quadrature an...
2006 Aug 22
1
a generic Adaptive Gauss Quadrature function in R?
Hi there, I am using SAS Proc NLMIXED to maximize a likelihood with multivariate normal random effects. An example is the two part random effects model for repeated measures semi-continous data with a cluster at 0. I use the "model y ~ general(loglike)" statement in Proc NLMIXED, so I can specify a general log likelihood function constructed by SAS programming statements. Then the
2011 Apr 28
0
fit a marked poisson process using a quadrature scheme with 'spatstat'
...t one of the covariates is hard to handle as an image. This covariate represents the type of roads. As there aren't roads at every location of the map, one cannot specify the value of the covariate at any point on a grid, which is necessary to specify an image. To tackle this, I wanted to use a quadrature scheme and use points on the roads as dummy points instead of a data point pattern as the outcome variable. The problem I now encounter is, that I can't give marks to the dummy points, since they are no "real" observations (and omitting the marks gives an error). Does somebody know,...
2002 Dec 18
0
Multidimensional quadrature using "integrate"
Hi: I was wondering if someone could give me some examples of how to use the "integrate" function to perform multi-dimensional quadrature? I have a posterior density (up to a constant), for which I'd like to evaluate the normalizing constant. thanks for any help, Ravi.
2010 Sep 29
1
nlminb and optim
...The integral cannot be easily evaluated so I approximate it as: \begin{equation} \label{eqn:marginal2} L(\beta) \approx \prod_{s=1}^N \sum_{q=1}^Q \prod_{i=1}^K\frac{e^{x_{is}(\theta_{q}-\beta_i)}} {x_{is}!e^{e^(\theta_{q}-\beta_i)}} w_q \end{equation} \noindent where $\theta_{q}$ is the node at quadrature point $q = 1, \ldots, Q$ and $w_q$ is the weight at quadrature point $q$. For now, I am assuming $f(\theta)$ is Uniform but this may change and that is not a major issue. Now, I have written a function using both nlminb and optim. I have copied my function below where the arguments are the data s...
2010 Oct 08
1
Trapezoid Rule
Dear R Users, I've never used R before and my professor has asked us to do some pretty intense programming (or it's intense to me at least). Here is the question: Modify the function myquadrature inside the script so that it returns the quadrature of descrete data using the trapezoidal rule. Modify the call to the function at the bottom of the script so that is uses your modifies routine to compute the total volume flux through a transect using descrete observations of bathymetry and vert...
2008 Aug 21
2
Help Regarding 'integrate'
...sitive, B) can not occur. Also, the theory tells me that the infinite integral actually exists and is finite, so A) can not occur. That means there are certain problems with the usage of function 'integrate' which I do not understand. The help document tells me that 'integrate' uses quadrature approximation to evaluate integrals numerically. Since I do not come from the numerical methods community, I would not know the pros and cons of various methods of quadrature approximation. One naive way that I thought of evaluating the above integral was by first locating the maximum of the funct...
2011 Sep 23
1
Cross Spectrum : Conversion of 2-D spectrum into a single complex array
Hi, I'm wondering why the spectrum() phase of quadrature couple isn't purely +/-pi. But mostly, I'm looking for a recommended way to take a 2-D spectrum and convert it into a single complex array. Kindly consider: # 10 Hz sine wave 10 seconds long sampled at 50 Hz deltaT = 1/50 t = seq(0, 10, deltaT) w = 2 * pi * 10 x = ts( sin(...
2018 Jan 17
1
mgcv::gam is it possible to have a 'simple' product of 1-d smooths?
...for discrete data might be: 1) Y_i = a + sum_t[ L_t * X_it * Beta_t ] (2) Y_i = a + sum_t[ L_t * F{X_it} * Beta_t ] (3) Y_i = a + sum_t[ L_t * F{X_it,t} ] where Y_i are scalar outcomes for the i-th subject, and X_i(t) is a functional covariate observed at times t in [0,1,...T], and L are the quadrature weights. Beta() and/or F{} are the functions to be estimated. Intuitively, model 1 is a linear functional model with a (potentially non-linear) time-dependent regression coefficient (beta()) for the covariate. Model 2 allows for a non-linear function of the covariate (F{}), but which is consta...
2012 Aug 02
3
Need Help in Finite Element Analysis
...x dy? And assume the following bilinear interpolation shape functions are used to discretize the spatial geometric variable x and y: N1= ? (1-z)(1-e) N1= ? (1+z)(1-e) N1= ? (1+z)(1+e) N1= ? (1-z)(1+e) Where -1 ? z , e ? 1 for the local coordinates, z & e Determine the value of g using Guass quadrature numerical integration method. Explain any similarity or difference between your answer and the exact solution. Please advise Thanks to all -- View this message in context: http://r.789695.n4.nabble.com/Need-Help-in-Finite-Element-Analysis-tp4638943.html Sent from the R help mailing list...
2010 Sep 21
3
bivariate vector numerical integration with infinite range
...numerical integration I wish to perform. The integrand f takes two real arguments x and y and returns a vector of constant length N. The range of integration is [0, infty) for x and [a,b] (finite) for y. Since the integrand has values in R^N I did not find a built-in function to perform numerical quadrature, so I wrote my own after some inspiration from a post in R-help, library(statmod) ## performs 2D numerical integration ## using Gauss-Legendre quadrature ## with N points for x and y vAverage <- function(f, a1,b1, a2,b2, N=5, ...){ GL <- gauss.quad(N) nodes <- GL$nodes weights...