Displaying 20 results from an estimated 1000 matches similar to: "error messages"
2012 Feb 10
4
function arrows.circular not working
I have started using the circular package but it is not recognizing the function arrows.circular. I attempted to use the example provided in the circular manual. Here is the example code using the circular package:
plot(rvonmises(10, circular(0), kappa=1))
arrows.circular(rvonmises(10, circular(0), kappa=1))
arrows.circular(rvonmises(10, circular(0), kappa=1), y=runif(10), col=2)
2009 Feb 24
0
[LLVMdev] llvm-gcc (pre-release and svn sources) fails to compile on Solaris10/SPARC
On 2009-02-24 03:28, Kshitij Sudan wrote:
> I am new to LLVM, and I'm trying to compile llvm and llvm-gcc from
> subversion on a Solaris10/SPARC machine. I have already tried building
> llvm-2.4 on this machine, but it failed.
>
> I then tried the subversion sources (rev. # 65253 fro llvm and
> rev#65263 for llvm-gcc) and llvm at least builds correctly ( I however
> have
2010 Feb 10
1
looping problem
Hi R-users,
I have this code here:
library(numDeriv)
fprime <- function(z)
{ alp <- 2.0165;
rho <- 0.868;
# simplified expressions
a <- alp-0.5
c1 <- sqrt(pi)/(gamma(alp)*(1-rho)^alp)
c2 <- sqrt(rho)/(1-rho)
t1 <- exp(-z/(1-rho))
t2 <- (z/(2*c2))^a
bes1 <- besselI(z*c2,a)
t1bes1 <- t1*bes1
c1*t1bes1*t2
}
## Newton
2009 Apr 12
2
"taking the log then later exponentiate the result" query
Hi,
I am trying to figure out the observed acceptance rate and M, using generalised rejection sampling to generate a sample from the posterior distribution for p.
I have been told my code doesn't work because I need to "take the log of the expression for M, evaluate it and then exponentiate the result." This is because R is unable to calculate high powers such as 545.501.
As
2009 Feb 24
5
[LLVMdev] llvm-gcc (pre-release and svn sources) fails to compile on Solaris10/SPARC
I am new to LLVM, and I'm trying to compile llvm and llvm-gcc from
subversion on a Solaris10/SPARC machine. I have already tried building
llvm-2.4 on this machine, but it failed.
I then tried the subversion sources (rev. # 65253 fro llvm and
rev#65263 for llvm-gcc) and llvm at least builds correctly ( I however
have not tried testing it!). I can execute binaries located in
2003 Aug 20
2
Method of L-BFGS-B of optim evaluate function outside of box constraints
Hi, R guys:
I'm using L-BFGS-B method of optim for minimization problem. My function
called besselI function which need non-negative parameter and the besselI
will overflow if the parameter is too large. So I set the constraint box
which is reasonable for my problem. But the point outside the box was
test, and I got error. My program and the error follows. This program
depends on CircStats
2009 Apr 12
0
Generalised Rejection Sampling
Hi,
I am trying to figure out the observed acceptance rate and M, using generalised rejection sampling to generate a sample from the posterior distribution for p.
I have been told my code doesn't work because I need to "take the log of the expression for M, evaluate it and then exponentiate the result." This is because R is unable to calculate high powers such as 545.501.
2007 Jun 18
1
two bessel function bugs for nu<0
#bug 1: besselI() for nu<0 and expon.scaled=TRUE
#tested with R-devel (2007-06-17 r41981)
x <- 2.3
nu <- -0.4
print(paste(besselI(x, nu, TRUE), "=", exp(-x)*besselI(x, nu, FALSE)))
#fix:
#$ diff bessel_i_old.c bessel_i_new.c
#57c57
#< bessel_k(x, -alpha, expo) * ((ize == 1)? 2. : 2.*exp(-x))/M_PI
#---
#> bessel_k(x, -alpha, expo) * ((ize == 1)? 2. :
2010 Jan 26
1
newton method for single nonlinear equation
Hi r-users,
I would like to solve for z values using newton iteration method. I 'm not sure which part of the code is wrong since I'm not very good at programming but would like to learn. There seem to be some output but what I expected is a vector of z values. Thank you so much for any help given.
newton.inputsingle <- function(pars,n)
{ runi <- runif(974, min=0, max=1)
2000 Sep 27
2
trouble logging out when using protocol version 2
Dear OpenSSH gurus,
My machine is running Red Hat Linux 6.1 and has installed all of the
6.binary rpms generated from the source rpms openssh-2.2.0p1-2.src.rpm
6.and openssl-0.9.5a-3.src.rpm.
When I use protocol version 2 (by specifying "Protocol 2,1" in
~/.ssh/config), I can establish connections properly, but they do not
shut down properly. When I run a remote command by "ssh
2009 Jun 03
2
code for double sum
Hi R-users,
I wrote a code to evaluate double sum as follows:
ff2 <- function(bb,eta,z,k)
{ r <- length(z)
for (i in 1:r)
{ sm1 <- sum((z[i]*bb/2)*(psigamma((0:k)+eta+1,deriv=0)/(factorial(0:k)*gamma((0:k)+eta+1))))
sm2 <- sum((besselI(z[i]*bb,eta)*log(z[i]*bb/2) - sm1)/besselI(z[i]*bb,eta))
sm2
}
ff2(bb,eta,z,10)
but it gave me the following message:
>
2010 Jan 26
1
Newton method
Hi r-users,
I hope somebody can help me with this code.
I would like to solve for z values using newton iteration method. I 'm not sure which part of the code is wrong since I'm not very good at programming but would like to learn. There seem to be some output but what I expected is a vector of z values. Thank you so much for any help given.
newton.inputsingle <-
2010 Jun 15
1
Error in nlm : non-finite value supplied by 'nlm'
Hello,
I am trying to compute MLE for non-Gaussian AR(1). The error term follows a difference poisson distribution. This distribution has one parameter (vector[2]).
So in total I want to estimate two parameters: the AR(1) paramter (vector[1]) and the distribution parameter.
My function is the negative loglikelihood derived from a mixing operator.
f=function(vector)
2012 Sep 25
1
how to pass a function to a function inside a function
Hi,
I'm trying to compile two functions into one function. the first funtion is
called 'fs' which is self-made function, another function is from the
built-in 'integration' function that is copy-paste-edited. If built
separatey, these functions work well. However that is not the case if
combines together, where certainly I made mistake somewhere when
constructing the code.
2001 Nov 20
1
warning message
Hello everybody.
I would like to pose a question regarding a warning message after running
a function of my own. The function I created for computing the p-value of
the dw statistic has a command line like this:
»dwf0 <- function(dw,eigen) { carfun <- function(x) {
(prod(1+2*(eigen-dw)*1i*x)^(-1/2)-prod(1-2*(eigen-dw)*1i*x)^(-1/2))/(1i*x) }
; 1/2+integrate(f=carfun,lower = 0,upper =
2007 Sep 11
1
Fitting Data to a Noncentral Chi-Squared Distribution using MLE
Hi, I have written out the log-likelihood function to fit some data I have (called ONES20) to the non-central chi-squared distribution.
>library(stats4)
>ll<-function(lambda,k){x<-ONES20; 25573*0.5*lambda-25573*log(2)-sum(-x/2)-log((x/lambda)^(0.25*k-0.5))-log(besselI(sqrt(lambda*x),0.5*k-1,expon.scaled=FALSE))}
> est<-mle(minuslog=ll,start=list(lambda=0.05,k=0.006))
2011 Jan 12
1
Integrate and subdivisions limit
Dear all,
I have some issues with integrate in R thus I would like to request your help.
I am trying to calculate the integral of f(x)*g(x).
The f(x) is a step function while g(x) is a polynomial.
If f(x) (step function) changes its value only few times (5 or 6 'steps') everything is calulated ok(verified results in scrap paper) but if f(x) takes like 800 different values I receive the
2004 Jul 08
1
(PR#7070)
> version
_
platform i686-pc-linux-gnu
arch i686
os linux-gnu
system i686, linux-gnu
status
major 1
minor 7.1
year 2003
month 06
day 16
language R
Bug:
integrate(f,lower,upper,extra_args)
where
f <- function(x,extra_args)
{
body
}
integrate doesn't pass the extra arguments when calling f.
As a first check of this finding I integrated dnorm from
2013 Jul 16
2
Problem following an R bug fix to integrate()
I have been told by the CRAN administrators that the following code generated
an error on 64-bit Fedora Linux (gcc, clang) and on Solaris machines (sparc,
x86), but runs well on all other systems):
> fn <- function(x, y) ifelse(x^2 + y^2 <= 1, 1 - x^2 - y^2, 0)
> tol <- 1.5e-8
> fy <- function(x) integrate(function(y) fn(x, y), 0, 1,
2011 Nov 23
2
How to increase precision to handle very low P-values
Hello, Rlisters
I have to compute p-values that are on the tail of the distribution,
P-values < 10^-20.
However, my current implementations enable one to estimate P-values up to
10^-12, or so.
A typical example is found below, where t is my critical value.
########### example - code adapted from Rassoc #######################
rho01 = 0.5
rho105 = 0.5
rho005 = 0.5
t = 8
z = 2