similar to: Example using Rdqags

Displaying 20 results from an estimated 3000 matches similar to: "Example using Rdqags"

2004 Sep 09
3
Dyn.load of sharing object with GSL library
Following the recommendation of Prof. Ripley, I have created the Makevars file with the line: PKG_LIBS="-L/usr/lib/libm -lm -L/usr/local/lib/libgsl -lgsl -L/usr/local/lib /libgslcblas -lgslcblas" in the working directory. Now I have the code file Example3.c which computes the Bessel function value (the example is taken from the GSL reference book). I am running: R CMD SHLIB Example3.c
2005 Mar 24
2
Bivariate lognormal distribution
Dear experts! Is there a package that enables to create the bivariate log-normal variables? Thanks a lot, Vicky Landsman. [[alternative HTML version deleted]]
2005 Mar 16
8
Summing up matrices in a list
Dear all, I think that my question is very simple but I failed to solve it. I have a list which elements are matrices like this: >mylist [[1]] [,1] [,2] [,3] [1,] 1 3 5 [2,] 2 4 6 [[2]] [,1] [,2] [,3] [1,] 7 9 11 [2,] 8 10 12 I'd like to create a matrix M<-mylist[[1]]+mylist[[2]] [,1] [,2] [,3] [1,] 8 12 16 [2,] 10 14 18
2005 Mar 24
1
How to stop the minimization when the condition does not hold
Dear experts! I have a minimization problem with non-linear constraint and Objective function(theta)=lambda*(Constr)^2-f(x,theta). Theta is a vector of parameters. I'd like to stop the optimization after the value of the constraint is less or equal some constant value, say d, and save the last computed value of the function. For this purpose, I thought to define the Objective function like
2004 Jul 11
2
How to bring an Splus object into R
>From the `R Data Import/Export' manual, shipped with R, as well as available from the official R web site (last three paragraphs of Section 3.1, describing functions in the `foreign' package): Function read.S which can read binary objects produced by S-PLUS 3.x, 4.x or 2000 on (32-bit) Unix or Windows (and can read them on a di erent OS). This is able to read many but not all S
2005 Feb 27
2
Help with constrained optimization
Dear all, I need an advice in the following problem. I have to maximize two functions of the form f1(x)=f(y1,x,alpha1,beta1) and f2(x)=(y2,x,alpha2,beta2), the maximization is with respect to alpha1, alpha2, beta1, beta2. I can maximize each function separately using nlm. The problem is that I have to add the constraint of the form g(alpha1)=g(alpha2). The total number of parameters is
2004 Jul 14
1
Running the optimization on the subset of parameters
Dear all, I'd like to find a minimum of (-loglik) function which is a function of k parameters. I'd like to run the minimization algorithm for the different subsets of the parameters and assign the fixed values to the complementary subset. How should I define my (-loglik) function such that it can be passed to the optim or other optimization function? Much thanks for any suggestions.
2004 Sep 09
1
Adding GSL library path to SHLIB
Dear R-list people, I asked a similar question a few hours before. I will try to be more specific. We like to add the GSL library to the file SHLIB in order to make it possible to run the C code using GSL functions from R. We read that the path to the libgsl.a should be added to the line shlib_libadd=' ' in the file SHLIB but it does not work on our system. Dyn.load fails with error
2004 Nov 18
0
Calling Rdqags doesn't produce correct result.
Does anyone has a clue what went wrong in the following attempt? I am trying to call the R built-in function Rdqags() from my C program for numerical integration. Following are the C program and the corresponding R program: C program --------- void test(double *a, double *b, double *epsabs, double *epsrel, double *result,
2006 Jul 03
1
Problem with try()
Dear R-experts, I am running a large simulation exercise where the enough complicated integration is required. The integral is computed within a C-function called Denom by use of function qags from the gsl library. Here is a piece of R-code: denom<-try(.C("Denom",as.double(x),as.integer(n), as.integer(p), as.double(param),
2005 May 09
2
use "integrate" for functions defined in C, not R
Dear all, I am trying to use the C code for "integrate" function ( that calls Rdqagi and Rdqags) so that I can integrate a function defined in C, instead of passing from R. Is there a way for doing this? My unsuccessful attempt: I looked into the files (including integrate.c, Applic.h) and 1. modified the definition of "integr_fn" by droping the environment
2006 Dec 12
1
include libraries for C code called from R
I hope that someone on this list can help me with this issue. I have searched through all of the documentation and mail archives for a solution, but have been unable to find an answer that addresses my particular problem directly. Suppose I am writing some C code that I want to access from R through the .C function. As part of the C function, I want to include an external C library, such as the
2005 Apr 07
1
ks.test for conditional distribution Y|x
Couldn't you do this by subtracting 0.5 + x from your y values and checking for normality with mean 0 and sd = 1 (using ks.test or another test of normality). If you fail, you'll have to do additional work to find out whether pairs with some particular x value (or range of x values) is causing the problem, but I think this fits the question as stated. Of course, if you have discrete x
2004 Oct 12
2
Statistical analysis of a large database
Deall all, We need to perform a statistical analysis of a large database (40,000 entries with approximately 500 fields in each entry) currently handled in Oracle. The data contains categorical variables only. At the current stage we suggest classification and clustering analysis. We are planning to perform the analysis in R and would be very grateful for any
2004 Sep 27
1
Numerical two-dimensional integration
Dear all, I need to compute (numerically) the two-dimensional integral: int(int f(x,y)dy)dx. What is the more efficient(fast) way to do it? Is adapt function appropriate for this problem? I will much appreciate your help and attention. Vicky. [[alternative HTML version deleted]]
2011 May 30
1
Fwd: Re: Fwd: cgroup OOM killer loop causes system to lockup (possible fix included) - now pinpointed to openssh-server
Just did some testing.. root at vicky:~# cat /var/log/auth.log | grep "Set" May 30 21:41:05 vicky sshd[1568]: Set /proc/self/oom_adj from -17 to -17 May 30 21:41:07 vicky sshd[1574]: Set /proc/self/oom_adj to -17 root at vicky:~# ps faux | grep 1574 root 1574 0.0 0.0 70488 3404 ? Ss 21:41 0:00 \_ sshd: root at pts/1 root at vicky:~# ps faux | grep
2007 Jan 04
1
Parameter changes and segfault when calling C code through .Call
I am experiencing some odd behavior with the .Call interface, and I am hoping someone out there can help me with it. Below is a simple example (in that there are R packages that do exactly what I want), but this code illustrates the problem. Thanks in advance for any help you can provide. Suppose I want to compute the log density of a multivariate normal distribution using C code and the gsl
2005 Jul 25
1
Rmath library problems
Hello, Has anybody successfully called the Rmath library from C using the MS Visual Studio compiler (I am using Visual Studio 6.0)? I have compiled the Rmath library using gcc, and the 'test.c' program (which makes a call to qnorm) works fine when compiled with gcc. However, I get a fatal memory error when I run it after compiling it with Visual C. Would this memory problem be related
2011 Jan 20
1
GPU packages and 'Debian R Policy'
Hi there, Moving this request for info over from an R-HPC-SIG list thread as the issue is less HPC than something that has bitten me as a result of trying to install HPC (read CUDA) R packages. Background to this is that I have both a Ubuntu host for a Tesla card that some researchers are looking to do CUDA-related R computation on, and a prototype, RHEL-based, cluster that is being used to
2010 Jun 10
1
Rmath.dll importing in VB6 problem
Hi, I am facing a problem which i think i need to explain it to you with some background. I need to use the Project R pnorm function in Visual Basic 6.0. I have already installed R and this is how i perform and get back the result: > pnorm(2, 15) [1] 6.117164e-39 which is what i need. I have already installed R, i generated the Rmath.DLL file out so i can import it into my VB6 and use it.