Displaying 20 results from an estimated 2000 matches similar to: "Distributional characteristics"
2004 Sep 29
2
Approximate a f(x,y)
Hi all,
Running simulations, I'm generating market response to 2 factors X&Y..
There is no closed form for the market response.. The results are store in a
matrix Z(X <- seq(.02,.98,.02), Y <- seq(.01,.19,.01))..
For optmization purpose I need to approximate the values for any factor X in
0,02-0,98 and Y in 0,01-0,19
How can I do it ?
For one factor : Xn-1 < x <= Xn
2006 Sep 01
1
integration problem with gamma function
Dear R-list members,
I have a problem with translating a mathematica script into R. The whole
script is at the end of the email (with initial values for easy
reproduction) and can be pasted directly into R. The problematic part
(which is included below of course) is
<--- Original Mathematica --->
(* p_svbar *)
UiA = Ni (Dsi - 2Di A + A^2)/2;
UiiA = Nii (Dsii - 2Dii A + A^2)/2;
psvbar =
2008 Aug 07
1
qgamma inaccuracy (PR#12324)
Full_Name:
Version: 2.7.1 (2008-06-23)
OS: windows vista
Submission from: (NULL) (216.82.144.137)
Hello,
I have been working with various probability distributions in R, and it seems
the gamma distribution is inaccurate for some inputs.
For example, qgamma(1e-100, 5e-101, lower.tail=FALSE) gives: 1.0. However, it
seems this is incorrect; I think the correct answer should be
2005 Oct 26
1
Pb encountered with demos
Hi all,
I've just installed R on my Mac & PC.
The base demo run fine.. But I'm encountering several pb with some packages
(installed using CRAN binaries using the menu)
- Lattice:
> demo(lattice,package='lattice')
demo(lattice)
---- ~~~~~~~
Type <Return> to start :
> require(grid)
[1] TRUE
> old.prompt <- grid.prompt(TRUE)
> old.settings
2005 Nov 08
1
Hybrid Monte Carlo algorithm (MCMC)
Hi all,
I'm trying to estimate a nested model (purchase decision, cloglog formula, &
quantity bought given a purchase, truncated Poisson). Some of the parameters
are mixed (6) and 4 are fixed for all the respondent.
The simulated ML (500 simulations) method forwards highly correlated
estimates.
After some research, Hybrid Monte Carlo seems to be a good alternative to
estimate the model. I
2009 May 07
1
data transformation using gamma
Hi R-users,
I have this code to uniformise the data using gamma:
> length(dp1)
[1] 696
> dim(dp1)
[1] 58 12
> dim(ahall)
[1] 1 12
> dim(bhall)
[1] 1 12
> trans_dt <- function(dt,a,b)
+ { n1 <- ncol(dt)
+ n2 <- length(dt)
+ trans <- vector(mode='numeric', length=n2)
+ dim(trans) <- dim(dt)
+ for (i in 1:n1)
+ { dt[,i] <- as.vector(dt[,i])
2006 Mar 28
2
R 2.3.0 (alpha) on FreeBSD 6.1 fails make check-all
Hi Developers,
The alpha, compiles successfully, but it is failing make check-all (on
two seperate machines, both FreeBSD 6.1).
Here is the version string:
platform i386-unknown-freebsd6.1
arch i386
os freebsd6.1
system i386, freebsd6.1
status alpha
major 2
minor 3.0
year 2006
month 03
day 27
svn rev
2013 Apr 01
1
95% Confidence Interval for a p-p plot
Hi,
I want to create upper and lower 95% confidence intervals for a p-p plot of
an empirical distribution with a theoretical gamma distribution.
This is my code:
x<-rgamma(100,shape=2, rate=1) # empirical data
fitdistr(x,"gamma") # fit a gamma distribution
dist<-pgamma(x,shape=1.9884256 ,rate=0.8765314 ) # fitted distribution,
using the loglikelihood estimated parameters
2012 Jan 04
1
KS and AD test for Generalized PAreto and Generalized Extreme value
Dear R helpers,
I need to use KS and AD test for Generalized Pareto and Generalized extreme value.
E.g. if I need to use KS for Weibull, I have teh syntax
ks.test(x.wei,"pweibull", shape=2,scale=1)
Similarly, for AD I use
ad.test(x, distr.fun, ...)
My problem is fir given data, I have estimated the parameters of GPD and GEV using lmom. But I am not able to find out the distribution
2003 Jan 30
1
vector passed to `if' in `pgamma'
In the current R-devel sources, the `pgamma' function gives a warning when
the `shape' argument is passed as a vector of length > 1. That is,
> pgamma(3, 1)
[1] 0.950213
> pgamma(3, c(1, 2))
[1] 0.9502129 0.8008517
Warning message:
the condition has length > 1 and only the first element will be used in:
if (shape <= 0) stop("shape must be strictly positive")
2004 Mar 19
3
Incomplete Gamma Functions and GammaDistribution Doc errata.
Hello all,
In the course of trying to implement the CDF of an
InverseGammaDistribution, I have run across the need for an igamma()
function. Several others have needed this function but the answers I
have found so far are not totally clear to me. I'm writing for three
reasons:
1) to present a small error in the docs
2) to clarify the approach we are expected to take
3) to request,for the
2009 Jan 19
2
pchisq error
Dear R experts,
I'm trying to call 'pchisq' from within a C subroutine. The following
error is returned:
** NON-convergence in pgamma()'s pd_lower_cf() f= nan.
This error message is not printed the first time I call 'pchisq' from
the C subroutine, but the second time or the next time I call 'pchisq'
from within R.
My session output is shown below:
2004 Oct 22
3
pgamma discontinuity (PR#7307)
Full_Name: Morten Welinder
Version: 2
OS: Solaris/space/gcc2.95.2
Submission from: (NULL) (65.213.85.217)
I changed src/nmath/standalone/test.c to read:
---------------------------------------------------------------------------------
#define MATHLIB_STANDALONE 1
#include <Rmath.h>
#include <stdio.h>
int
main()
{
double x;
for (x = 99990; x <= 100009; x++)
printf
2005 Nov 09
2
help with legacy R code
Hi there,
Could somebody help me disect this legacy R script I inherited at work, I
have two questions:
1. I've tried to upgrade our R version from 1.6.2 (yeah, I know), to R 2.0,
but some of the lines in this script are not compatible with R 2.0, could
someone help me figure out where the problem is?
2. the jpeg generated (attached) seems to be off on some of the data, is
there a better way
2001 Sep 06
1
RFC: d/p/q/rgamma
dgamma and friends in S are documented as
dgamma(x, shape, rate=1)
pgamma(q, shape, rate=1)
qgamma(p, shape, rate=1)
rgamma(n, shape, rate=1)
whereas R has
dgamma(x, shape, scale=1, log = FALSE)
pgamma(q, shape, scale=1, lower.tail = TRUE, log.p = FALSE)
qgamma(p, shape, scale=1, lower.tail = TRUE, log.p = FALSE)
rgamma(n, shape, scale=1)
Note the use of rate vs scale. Indeed, as both S and
2005 Oct 02
1
rate instead of scale in ?ks.test
I am not sure whether I'm doing something wrong or there is a bug in the
documentation of ks.test. Following the posting guide, as I'm not sure,
I haven't found this in the bug tracker, and the R FAQ says that stats
is an Add-on package of R, I think this is the place to send it.
?ks.test provides the example
<QUOTE>
# Does x come from a shifted gamma distribution with shape 3
2020 Oct 09
1
Aide pour finaliser ce code
Hello.
Here is my R code. I used the functional data . Now I need to use the
functional data by applying the kernels instead of the xi, yi functions.
Bonjour.
Voici mon code en R . J'ai utiliser les donn?es fonctionnelles . Maintenant
j'ai besoin d'utiliser les donn?es fonctionnelles en appliquant les noyaux
? la place des fontions xi, yi
library(MASS)
2009 Nov 02
1
need help in using Hessian matrix
Hi
I need to find the Hessian matrix for a complicated function from a certain
kind of data but i keep getting this error
Error in f1 - f2 : non-numeric argument to binary operator
the data is given by
U<-runif(n)
Us<-sort(U)
tau1<- 2
F1tau<- pgamma((tau1/theta1),shape,1)
N1<-sum(Us<F1tau)
X1<- Us[1:N1]
2006 Apr 28
1
Checking Goodness of Fit With Kolmogorov-Smirnov
Hi,
I'm using the power.law.fit function from the igraph package to fit a
power law distribution to some data. This function returns the power
law exponent as it's only result. I would like to have some sort of
goodness-of-fit and/or error estimate of the exponent returned. This
paper:
http://www.edpsciences.org/articles/epjb/pdf/2004/18/b04111.pdf
suggests using the
2008 Aug 25
1
Specifying random effects distribution in glmer()
I'm trying to figure out how to carry out a Poisson regression fit to
longitudinal data with a gamma distribution with unknown shape and
scale parameters.
I've tried the 'lmer4' package's glmer() function, which fits the
Poisson regression using:
library('lme4')
fit5<- glmer(seizures ~ time + progabide + timeXprog +
offset(lnPeriod) + (1|id),
data=pdata,