similar to: using self-written functions

Displaying 20 results from an estimated 4000 matches similar to: "using self-written functions"

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)
2001 Apr 05
2
Using Gauss with R
Dear All, I am a long time S user and now a convert to R. As part of my general work in time series I occasionally assist groups of econometricians and others in the finance fraternity. In particular, that community has invested a large amount of time and effort in writing specialised code in Gauss. I am unfamiliar with Gauss (although I have used Matlab which is, I understand, a comparable
2013 Dec 04
1
option hide unreadable not work
Hi all. I thying settings the option "hide unreadable" but not work. I tested in global section and share section, follow my settings now. after various tests. # Global parameters [global] workgroup = BATLAB realm = BATLAB.CORP netbios name = GAUSS server role = active directory domain controller server services = s3fs, rpc, nbt, wrepl,
2010 Oct 26
1
Markov Switching with TVTP - problems with convergence
Greetings fellow R entusiasts! We have some problems converting a computer routine written initially for Gauss to estimate a Markov Regime Switching analysis with Time Varying Transition Probability. The source code in Gauss is here: http://www.econ.washington.edu/user/cnelson/markov/programs/hmt_tvp.opt We have converted the code to R, and it's running without errors, but we have some
2006 Jul 20
2
function names in a vector used by for (){} character problem ?
Hi there, i´m have vector of kernels. just like: kernels = c('gauss','epan','rectangular') i know there are density.default$kernels, but thats not my question here. my own kernel functions are running and working. my problem is the following is not working: dev.off() par(mfrow=c(3,3)) for(i in 1:length(bw)) { for(j in 1:length(kernels)) {
2008 Oct 30
1
A question about pairs()
Greetings R users, I am an R graphics newbie trying to produce a custom trellis plot using pairs() with R 2.7.2. I have spatial data on which I run a geographically weighted regression (gwr, using the -spgwr- package). I want to check the gwr coefficients for multicollinearity and spatial association, following Wheeler and Tiefelsdorf (2005), and I would like to summarize the results of this
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)
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 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
2006 Aug 25
2
horizontal direct product
II am translating some gauss code into R, and gauss has a matrix product function called the horizontal direct product (*~), which is some sort of variant on the Kronecker product. For example if x is 2x2 and y is 2x2 the horizontal direct product, z, of x and y is defined (in the Gauss manual) as: row 1 = x11*y11 x11*y12 x12*y11 x12*y12 row 2 = x21*y21 x21*y22 x22*y21 x22*y22 Or in R
2005 Sep 27
1
Precomputing the remaining floating pointoperations.
Firstly, running for more channels will not break my hack. All that's needed is to call RECOPLAY_MARK with different identifiers (say nb, wb or uwb) before doing the appropriate initialization. Secondly, my attempts to do the Gaussian in fixed point went like this : Define a new constant lag_factor_gauss that is manually set equal to exp(sqr(2*M_PI*lag_factor)/-2) by whoever changes the
2007 Apr 17
3
Extracting approximate Wald test (Chisq) from coxph(..frailty)
Dear List, How do I extract the approximate Wald test for the frailty (in the following example 17.89 value)? What about the P-values, other Chisq, DF, se(coef) and se2? How can they be extracted? ######################################################> kfitm1 Call: coxph(formula = Surv(time, status) ~ age + sex + disease + frailty(id, dist = "gauss"), data = kidney)
2009 Jun 26
1
The Claw Density and LOCFIT
I am trying to reproduce Figure 10.5 of Loader's book: Local Regression and Likelihood. The code provided in the book does not seem to work. I have managed (a while ago) to get the accompanied R-code for the figures in the book (file called lffigs.R) from somewhere - cannot find it on the web anymore. The code in the .R script file does not work either. Could anybody please direct me in
2003 Sep 04
1
Looking for R Equivalent of Gauss Statements
Hi, I am translating some Gauss code to R. Gauss has an interesting way of handling constraints. Observe the following code snipplet: e1 = x[.,23] .eq 0; @ remove obs with Regular Hours = 0 @ e2 = x[.,12] .gt 1; @ remove obs with non-regular work status @ e3 = x[.,4] .lt 15; @ remove obs with agricultural and mining industry code (< 15)@ esum = e1 + e2 + e3; e = esum .gt 0; @
2011 Nov 14
1
mapply then export
To use the gauss.quad function: gauss.quad(n,type) which returns two lists $nodes and $weights whose length will each equal n. I'd like to do this for n=1 to 40 (type will not change) and have a dataset with 40 rows and 81 columns with all the nodes and weights. The first record would have N1 and W1 only and N2--N40 and W2--W40 would be missing. The last record would be full. I've
2014 Aug 01
3
Fix and question apodization functions
Hi, I was doing some speed and compression comparisons with various apodization/windowing functions, and found out that the definitions for the bartlett and bartlett_hann window in the FLAC codebase have been wrong since their introduction. The attached patch fixes that. Furthermore, I found some peculiar behaviour of the gauss apodization that seems to expose bug. Using different windows
2014 Aug 10
2
[PATCH] New apodization functions
Hi all, This patch adds two new apodization functions that I developed. From my own test results (on quite a diverse dataset) they outperform the current best apodizations by 0.05% - 0.1% (depending on the specifics) on compression. Here's a selection of the test results *Apodization functions* ,Compres, Speed partial_tukey(2) tukey(0.5) , 56.50 , 37.2x partial_tukey(3)
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
2007 Apr 20
1
Approaches of Frailty estimation: coxme vs coxph(...frailty(id, dist='gauss'))
Dear List, In documents (Therneau, 2003 : On mixed-effect cox models, ...), as far as I came to know, coxme penalize the partial likelihood (Ripatti, Palmgren, 2000) where as frailtyPenal (in frailtypack package) uses the penalized the full likelihood approach (Rondeau et al, 2003). How, then, coxme and coxph(...frailty(id, dist='gauss')) differs? Just the coding algorithm, or in
2005 Apr 14
1
LOCFIT: What's it doing?
Dear R-users, One of the main reasons I moved from GAUSS to R (as an econometrician) was because of the existence of the library LOCFIT for local polynomial regression. While doing some checking between my former `GAUSS code' and my new `R code', I came to realize LOCFIT is not quite doing what I want. I wrote the following example script: