Displaying 20 results from an estimated 50000 matches similar to: "newbie question about beta distribution"
2011 Jul 26
2
Beta distribution- help needed
Hi, 
Well, i need some help, practical and theoretical. I am wondering why the
fitdistplus (mle function) is returning an error for this code:
[code]
x1 <- c(100,200,140,98,97,56,42,10,2,2,1,4,3,2,12,3,1,1,1,1,0,0);
plotdist(x1);
descdist(x1, boot =1000);
y<- sum(x1);
d= as.vector(length(x1));
for(i in 1:length(x1)){
  d[i] = x1[i]/y;
}
fitdist(d, "beta")
[/code] 
Error: 
2004 Nov 09
3
Strange results for Beta Distribution
Dear All,
I got these results from the example in the function "dbeta":
>x <- seq(0, 1, length=21)
>      dbeta(x, 1, 1)
 [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Any Idea?
TIA
Giovanni
dr. Giovanni Parrinello
Section of Medical Statistics
Department of Biosciences
University of Brescia
25127 Viale Europa, 11
Brescia Italy
Tel: +390303717528
Fax: +390303701157
2011 Mar 16
2
Re; Fitting a Beta distribution
I want to fit some p-values to a beta distribution. But the problem is some
of the values have 0s and 1's. I am getting an error if I use the MASS
function to do this. Is there anyway to get around this?
-- 
Thanks,
Jim.
	[[alternative HTML version deleted]]
2017 Dec 21
1
Fitting Beta Distribution
Dear All,
I need to fit a custom probability density (based on the symmetric beta
distribution B(shape, shape), where the two parameters shape1 and shape2
are identical) to my data.
The trouble is that I experience some problems also when dealing with the
plain vanilla symmetric beta distribution.
Please consider the code at the end of the email.
In the code, dbeta1 is the density of the beta
2002 Jan 22
3
Help with Beta Distribution
First let me confess that I am a R-novice.
I am trying to fit a beta distribution for a dataset using fitdistr(MASS). I
am having difficulties with it because the function tends to fit a
distribution with a range of 0 to 1 (I guess). However, my dataset is not!
Anytips or tricks will be very much appreciated.
Many Thanks.
T. S. Ramanarayanan, Ph.D.
Aventis CropScience
Research Triangle Park,
2007 May 03
1
Bayesian logistic regression with a beta prior (MCMClogit)
Dear all, 
I am trying to use the logistic regression with MCMClogit (package:
MCMCpack/Coda) and I want to put a beta prior on the parameters, but it's
giving me error message (please see output below) no matter what shape 1 or
2 I use. It works perfect with the cauchy or normal priors. Do you know if
there is a catch there somewhere? Thanks
logpriorfun <- function(beta,shape1,shape2){ 
2004 Nov 13
3
density estimation: compute sum(value * probability) for given distribution
Dear R users,
This is a KDE beginner's question. 
I have this distribution:
> length(cap)
[1] 200
> summary(cap)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  459.9   802.3   991.6  1066.0  1242.0  2382.0 
I need to compute the sum of the values times their probability of
occurence.
The graph is fine,
den <- density(cap, from=min(cap), 
       to=max(cap), give.Rkern=F)
2001 Jul 02
1
nls newbie: help approximating Weibull distribution
Hi folks, 
I tried to retain the Weibull distribution using the `nls' function
and proceeding along the lines of the example provided in the
`SSweibull' help (at least I thought so):
	t <- (1:200)/100
	v <- pweibull(t, shape=3, scale=1)
	df <- data.frame(Time=t, Value=v)
	Asym <- 1.0; Drop <- 1.0; lrc <- 0; pwr <- 1
	df.estimate <- nls(Value ~ SSweibull(Time,
2013 Jan 22
2
Approximating discrete distribution by continuous distribution
Dear all,
I have a discrete distribution showing how age is distributed across a
population using a certain set of bands:
Age <- matrix(c(74045062, 71978405, 122718362, 40489415), ncol=1,
dimnames=list(c("<18", "18-34", "35-64", "65+"),c()))
Age_dist <- Age/sum(Age)
For example I know that 23.94% of all people are between 0-18 years, 23.28%
2013 Oct 11
3
Gaussian Quadrature for arbitrary PDF
Hi all,
We know that Hermite polynomial is for
Gaussian, Laguerre polynomial for Exponential
distribution, Legendre polynomial for uniform
distribution, Jacobi polynomial for Beta distribution. Does anyone know
which kind of polynomial deals with the log-normal, Student抯 t, Inverse
gamma and Fisher抯 F distribution?
Thank you in advance!
David
	[[alternative HTML version deleted]]
2010 Jul 21
4
Chi-square distribution probability density function:
Hi to all I found
an formular of an **
***p-Value Calculator for the Chi-Square test*
*http://www.danielsoper.com/statcalc/calc11.aspx*
*with the formula*
*http://www.danielsoper.com/statkb/topic11.aspx*
*what's the gamma function of this formula in r?*
*df=5*
*ch2=25.50878*
*the following code does not give the result  <0.001 for the values above *
*p=
2004 Jan 09
4
Poisson distribution help requested
Could somebody help me to understand the syntax of R's ppois function? I'm looking to calculate the cumulative probability density of an observed value (y) given the expected mean (mu) and the level of significance (alpha). I'm coming from using SAS to do this and don't recognize the descriptions of the arguments for ppois. The definitions of lambda and p as stated in the R manuals
2004 Mar 01
6
How to plot Histogram with frequence overlaid by distribution curve
Hi,
      I am facing the problem that I want to plot a histogram chart set
freq to true and overlay with normal or weibull or exponential distribution
curve.
      The sample code is shown as below:
      >samp<-c(-8.2262,-8.2262,-8.2262,-8.20209,-8.09294,-8.07321,-8.07321,
      -8.07321,-8.07175,-8.04948,-8.04948,-8.04948,-8.03848,-8.03848,
     
2007 Oct 13
2
How to identify the two largest peaks in a trimodal distribution
Hello all
I'm trying to do a simulation that involves identifying the minimum  
point between two peaks of a (usually) bimodal distribution. I can do  
this easily if there are only two peaks:
CnBdens<-density(Ys/Xs)	#probability density function for ratio of Ys  
to Xs
	
	for(p in 1:512) ifelse(CnBdens$y[p]>CnBdens$y[p-1],peak1<-p,break)  
#identifies first peak in probability
2009 Sep 29
3
Probability of data values form DENSITY function
Hello, 
  
Could someone help me please and to tell how to get the probability from empirical DENSITY (not parametric) for each data value (R function). 
For example, for normal distribution there is such a function like: 
  
“dnorm(q, mean = 0, sd = 1, lower.tail = TRUE, log.p = FALSE)” 
  
I need the same function only for the empirical DENSITY function (which does not correspond to any typical
2011 Jun 22
1
numerical integration and 'non-finite function value' error
Dear R users,
I have a question about numerical integration in R.
I am facing the 'non-finite function value' error while integrating the
function
                               xf(x)
using 'integrate'. f(x) is a probability density function and assumed to
follow the three parameter (min = 0) beta distribution for which I have
estimated the parameters. The function is integrated
2011 Sep 14
2
Question regarding dnorm()
Hi,
I have one basic doubt. Suppose X ~ N(50,10).
I need to calculate Probability X = 50.
dnorm(50, 50, 10) gives me
[1] 0.03989423
My understanding is (which is bit statistical or may be mathematical) on a continuous scale, Probability of the type P(X = .....) are nothing but 1/Infinity i.e. = 0. So as per my understanding P(X = 50) should be 0, but even excel also gives 0.03989422. Obviously
2013 Jul 12
2
How to determine the pdf of a gamma distribution using the estimated parameters?
Hello everyone,
With th bar histogram (number of occurrences) hist<-c(24,7,4,1,2,1,1) of seven equally spaces classes ]1-4], ]5-8], ]9-12], ]13-16], ]17-20], ]21-24], ]25-28], I obtained shape=0.8276 and rate=0.1448.
I would like to know how to build the continuous pdf of a this gamma distribution knowing these two estimated parameters such that I will be able to predict the pdf of any
2009 Sep 28
2
probability density function for maximum values in repeated finite samples from a normal distribution??
this is probably not really a R specific question, if so apologies for
off-topic posting:
I'm interested in the probability density function of the maximum values
from repeated samples of size N from a normal distribution:
smp <- rnorm(N, meanval, stdev)
with some mean 'meanval' and standard deviation 'stdev'.
I would like to know what is the frequency distribution of
2009 Sep 29
1
Probability of data values form empirical distribution
Hello,
 
Could someone help me please and to tell how to get the probability from empirical distribution (not parametric) for each data value (R function).
For example, for normal distribution there is such a function like: 
 
“pnorm(q, mean = 0, sd = 1, lower.tail = TRUE, log.p = FALSE)”
 
I need the same function only for the empirical distribution (which does not correspond to any typical