similar to: Gaussian Quadrature for arbitrary PDF

Displaying 20 results from an estimated 4000 matches similar to: "Gaussian Quadrature for arbitrary PDF"

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
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
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
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]]
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.quad(100, kind="hermite")" which uses
2006 Feb 22
1
Gram-Charlier series
Good day everyone, I want to use the Gram-Charlier series expansion to model some data. To do that, I need functions to: 1) Calculate 'n' moments from given data 2) Transform 'n' moments to 'n' central moments, or 3) Transform 'n' moments to 'n' cumulants 4) Calculate a number of Hermite polynomials Are there R-functions to do any of the above?
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 Feb 12
1
R limits documented?
Is there documentation on R limits? That is, max matrix size, etc.? Diagnostics when limits are exceeded are not always meaningful. For example: > x <- rep(0,50000*50000) Error in rep(0, 50000 * 50000) : invalid 'times' argument In addition: Warning message: In as.vector(data) : NAs introduced by coercion Here's another example: > library(orthopolynom) > hermite <-
2011 May 29
1
Hello!
Hi, I'm a student studing for Math. & Infor. Ing. in Tirana,Albania and a have a final project in R to finish in a week, so I badly need your help... The topic of the project is "Hermite Interpolation" and a I have allready done a script that finds the approximation in a certan point x, H(x) ~f(x) but i want to find the value of his derivative H'(x)~f'(x) as well and to
2012 May 20
4
write.xls
Hello, All: The "writeFindFn2xls" function in the "sos" package tries to write an Excel file with 3 sheets ('PackageSum2', 'findFn', 'call'). Unfortunately, it is often unable to do this because of configuration problems that are not easy to fix. I've found 3 contributed packages that provide facilities to write Excel files with
2008 Jul 01
1
Orthogonal polynomials and poly
Dear All, I have found in the poly help this sentence: The orthogonal polynomial is summarized by the coefficients, which can be used to evaluate it via the three-term recursion given in Kennedy & Gentle (1980, pp. 343–4), and used in the predict part of the code. My question: which type of orthogonal polynomials are used by this function? Hrmite, legendre.. TIA Giovanni [[alternative HTML
2007 Apr 09
1
How to solve differential and integral equation using R?
Hello, I want to know if there are some functions or packages to solve differential and integral equation using R. Thanks. Shao chunxuan. [[alternative HTML version deleted]]
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)
2011 Nov 06
2
how to use quadrature to integrate some complicated functions
Hello to all, I am having trouble with intregrating a complicated 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
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
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)
2009 Aug 07
1
Gauss-Laguerre using statmod
I believe this may be more related to analysis than it is to R, per se. Suppose I have the following function that I wish to integrate: ff <- function(x) pnorm((x - m)/sigma) * dnorm(x, observed, sigma) Then, given the parameters: mu <- 300 sigma <- 50 m <- 250 target <- 200 sigma_i <- 50 I can use the function integrate as: > integrate(ff, lower= -Inf, upper=target)
2018 Jan 18
2
MCMC Estimation for Four Parametric Logistic (4PL) Item Response Model
Good day Sir/Ma'am! This is Alyssa Fatmah S. Mastura taking up Master of Science in Statistics at Mindanao State University-Iligan Institute Technology (MSU-IIT), Philippines. I am currently working on my master's thesis titled "Comparing the Three Estimation Methods for the Four Parametric Logistic (4PL) Item Response Model". While I am looking for a package about Markov chain
2010 Mar 26
1
Poisson Lognormal
Hi R Users, I'm going to estimate via. ML the parameters in Poisson Lognormal model. The model is: x | lambda ~ Poisson(lambda) lambda ~ Lognormal(a,b) Unfortunately, I haven't found a useful package allowing for such estimation. I tried to use "poilog" package, but there is no equations and it's hard to understand what exactly this package really does. Using it I get the
2005 Dec 15
1
generalized linear mixed model by ML
Dear All, I wonder if there is a way to fit a generalized linear mixed models (for repeated binomial data) via a direct Maximum Likelihood Approach. The "glmm" in the "repeated" package (Lindsey), the "glmmPQL" in the "MASS" package (Ripley) and "glmmGIBBS" (Myle and Calyton) are not using the full maximum likelihood as I understand. The