Displaying 20 results from an estimated 1000 matches similar to: "d, p, q, r - What are the math relations with each other of this functions?"
2008 Aug 21
1
pnmath compilation failure; dylib issue?
(1) ...need to speed up a monte-carlo sampling...any suggestions about
how I can get R to use all 8 cores of a mac pro would be most useful
and very appreciated...
(2) spent the last few hours trying to get pnmath to compile under os-
x 10.5.4...
using gcc version 4.2.1 (Apple Inc. build 5553) as downloaded from
CRAN, xcode 3.0...
...xcode 3.1 installed over top of above after
2011 Jul 30
2
NAN problem
Hi All,
Did anyone else have a problem like this? I am sorry if its a small issue, I
seem to not understand what to do to get rid of this error.
> Sigma
[1] 0.1939025
> MuRest
[1] 8.512772
> TauZero
[1] 0.1
> curve(qlnorm(x,-TauZero+MuRest, Sigma,lower.tail=F), xlim=c(4000,9000),
ylim=c(0,.99),xlab="", ylab="")
Warning message:
In qlnorm(p, meanlog, sdlog,
2007 Mar 15
1
Creating q and p functions from a self-defined distribution
Hello all,
I am fishing for some suggestions on efficient ways to make qdist and
pdist type functions from an arbitrary distribution whose probability
density function I've defined myself.
For example, let's say I have a distribution whose pdf is:
dRN <- function(x,d,v,s)
# d, v, and s are parameters
return(d/x^2/sv/sqrt(2*pi)*exp(-(d-v*x)^2/2/(sv^2*x^2)))
this is a legitimate
2009 Mar 17
3
R does not compile any more on FreeBSD 8.0-CURRENT
On a recent FreeBSD 8.0-CURRENT (i386) building R (any version) breaks
with the following messages:
----------------------------------------------------------------------
[...snip...]
gcc -std=gnu99 -I. -I../../src/include -I../../src/include
-I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c wilcox.c -o wilcox.o
gcc -std=gnu99 -I. -I../../src/include -I../../src/include
-I/usr/local/include
2002 May 03
6
problems with rexp ?
Does anyone know if R have any problems with the exponential random number
generation (function rexp)?
I comment it because I executed
data<-sort(rexp(100))
plot(data,dexp(data)/(1-pexp(data)),type="l")
and the graphic isn't constant.
(Note: exponential distribution have a constant hazard failure rate).
Thank you,
Juan
2003 Aug 28
2
ks.test()
Dear All
I am trying to replicate a numerical application (not computed on R) from an
article. Using, ks.test() I computed the exact D value shown in the article
but the p-values I obtain are quite different from the one shown in the
article.
The tests are performed on a sample of 37 values (please see "[0] DATA"
below) for truncated Exponential, Pareto and truncated LogNormal
1997 Jun 25
3
R-alpha: lbeta, ctrl-C and crashes
1. lbeta and beta do not work properly: lbeta returns its first
argument and beta gives the lbeta result.
In names.c lines 245-6, the codes for these should be 2 and 3 instead
of 1 and 2
2. crtl-C does not work (except the first time) on Red Hat elf Linux
(which has many many other problems as well) nor on the previous
version of Linux for Amiga. It worked on Slackware aout Linux and now
works
1997 Jun 25
3
R-alpha: lbeta, ctrl-C and crashes
1. lbeta and beta do not work properly: lbeta returns its first
argument and beta gives the lbeta result.
In names.c lines 245-6, the codes for these should be 2 and 3 instead
of 1 and 2
2. crtl-C does not work (except the first time) on Red Hat elf Linux
(which has many many other problems as well) nor on the previous
version of Linux for Amiga. It worked on Slackware aout Linux and now
works
2013 Nov 04
2
transform one probability distribution into another
Hi guys
Given a exponential curve, is there any function on r that can generate exponential distributed random numbers?
in General I want an function that can transform one probability distribution into another??
Regards
******************************************************************
Bander
*************************************
[[alternative HTML version deleted]]
Latin Hypercube Sampling when parameters are defined according to specific probability distributions
2017 May 27
2
Latin Hypercube Sampling when parameters are defined according to specific probability distributions
>May 26, 2017; 11:41am Nelly Reduan Latin Hypercube Sampling when parameters are >defined according to specific probability distributions
>Hello,
> I would like to perform a sensitivity analysis using a Latin Hypercube Sampling (LHS).
>Among the input parameters in the model, I have a parameter dispersal distance which is defined according to an exponential probability
2012 Apr 23
2
zipfR help
Hi,
I have a question on generating random variables based on zipf-mandelbrot
distribution.
So when I execute the following lines:
ZM = lnre ("zm", alpha = 2/3, B=0.1)
zmsample = rlnre (ZM, n =100)
zmsample
It generates 100 random values based on a zipf-mandelbrot distribution as
below. But how do I make sure the generated random number is within the
range of 1 - 6000 only? Can I
2011 Aug 29
1
maximum number of subdivisions reached
Why I am getting
Error in integrate(f, x1, x1 + dx) :
maximum number of subdivisions reached
and can I avoid this?
func <- function(y, a, rate, sad){
f3 <- function(z){
f1 <- function(y,a,n){
dpois(y,a*n)
}
f2 <- function(n,rate){
dexp(n,rate)
}
f <- function(n){
f1(y,a,n)*f2(n,rate)
}
r <- 0
r1 <- 1
x1 <- 0
dx <- 20
while(r1 >
2013 May 03
0
Empirica Copula
Dear users
I am reposting this and hope it will be accepted this time.
I am using copula package to fit my bivariate data and simulation. As
explained in package documentation we can use our own data distribution to
feed on copula as long as we have d, p and q (pdf, cdf and quantile)
functions are available. Hence my code for those are:
# Make the functions for data distribution
1997 Jul 09
1
R-beta: Problem with `rpois'
There is a problem with `rpois'. It does seem to take care about the
order of the arguments. This is an example:
> rpois(n=1,lambda=2)
[1] 3
> rpois(lambda=2,n=1)
[1] 2 0
It obviously uses the first argument as the number of samples to be
drawn, which is wrong.
I used Version 0.49 Beta (April 23, 1997).
Fredrik
1997 Jul 09
1
R-beta: Problem with `rpois'
There is a problem with `rpois'. It does seem to take care about the
order of the arguments. This is an example:
> rpois(n=1,lambda=2)
[1] 3
> rpois(lambda=2,n=1)
[1] 2 0
It obviously uses the first argument as the number of samples to be
drawn, which is wrong.
I used Version 0.49 Beta (April 23, 1997).
Fredrik
Latin Hypercube Sampling when parameters are defined according to specific probability distributions
2017 Jun 01
1
Latin Hypercube Sampling when parameters are defined according to specific probability distributions
Thank you very much Rob for your answer. I have some difficulties to understand how to apply my agent-based model to each parameter combination generated by the LHS, in particular when parameters are defined by probability distributions. Indeed, I have multiple parameters in my model: parameters which are defined by a single value (like ?temperature", "pressure?) and parameters which are
2007 Apr 11
3
Help with pexp( )
Dear all,
Sorry for bringing up an old issue:
>pexp(50, 0.5)
[1] 1
In some cases, pexp() gives CDF=1. I read some discussion in 2002 saying it
has been patched. However it's not working in "R2.4.1Patched". Could anyone
help me out?
Thanks a lot,
Jeann
_________________________________________________________________
Fine Dining & Fancy Food. Check Out This
2006 Feb 03
2
Problems with ks.test
Hi everybody,
while performing ks.test for a standard exponential distribution on samples
of dimension 2500, generated everytime as new, i had this strange behaviour:
>data<-rexp(2500,0.4)
>ks.test(data,"pexp",0.4)
One-sample Kolmogorov-Smirnov test
data: data
D = 0.0147, p-value = 0.6549
alternative hypothesis: two.sided
>data<-rexp(2500,0.4)
2012 Dec 20
3
Optmatch Package Question
Hello ,
My optmatch package is loaded on R and otherwise running fine.
I get an error after lcds successfully completes a logistic regression and
I then try to obtain a propensity score:
pdist <- pscore.dist(lcds)
Error: could not find function "pscore.dist"
Does anyone know if pscore.dist is part of the optmatch package,
or is it contained in another package that I need to
2018 Feb 09
1
R Compilation gets stuck on Windows 64
Please note that building R on Windows is documented in "R Installation
and Administration", including links to external software. Particularly
there is a link to texinfo which is part of Rtools. The documentation is
maintained and it is a sufficient source of information for building R
on Windows.
https://cran.r-project.org/doc/manuals/r-release/R-admin.html