similar to: Re; Fitting a Beta distribution

Displaying 20 results from an estimated 1000 matches similar to: "Re; Fitting a Beta distribution"

2008 Dec 25
3
Percent damage distribution
R version: 2.7.0 Running on: WinXP I am trying to model damage from fire losses (given that the loss occurred). Since I have the individual insured amounts, rather than sampling dollar damage from a continuous distribution ranging from 0 to infinity, I want to sample from a percent damage distribution from 0-100%. One obvious solution is to use runif(n, min=0, max=1), but this does not seem to be
2007 Feb 01
3
Help with efficient double sum of max (X_i, Y_i) (X & Y vectors)
Greetings. For R gurus this may be a no brainer, but I could not find pointers to efficient computation of this beast in past help files. Background - I wish to implement a Cramer-von Mises type test statistic which involves double sums of max(X_i,Y_j) where X and Y are vectors of differing length. I am currently using ifelse pointwise in a vector, but have a nagging suspicion that there is a
2005 Feb 15
1
shrinkage estimates in lme
Hello. Slope estimates in lme are shrinkage estimates which pull the OLS slope estimates towards the population estimates, the degree of which depends on the group sample size and the distance between the group-based estimate and the overall population estimate. Although these shrinkage estimates as said to be more precise with respect to the true values, they are also biased. So there is a
2011 Mar 20
3
Part of a density plot
Suupose I have y <- rbeta(10000, 2, 5) and I only want to see only the density plot from x = 0 to x = 1 How do I do this? -- Thanks, Jim. [[alternative HTML version deleted]]
2007 Jul 19
1
R
Hello! I am using for logistic regression in survey data the svyglm procedure. I wondered how does the strata effect estimates SE (in addition to the weights given proportional to population size). I know that for simple regression measurements of each strata is assumed to have different variance. But in a logistic model this is not the case. Can anyone help me here? Thank you Ron [[alternative
2006 Jun 24
2
smoothing splines and degrees of freedom
Hi, If I set df=2 in my smooth.spline function, is that equivalent to running a linear regression through my data? It appears that df=# of data points gives the interpolating spline and that df = 2 gives the linear regression, but I just want to confirm this. Thank you, Steven
2007 May 17
4
R2 always increases as variables are added?
Hi, everybody, 3 questions about R-square: ---------(1)----------- Does R2 always increase as variables are added? ---------(2)----------- Does R2 always greater than 1? ---------(3)----------- How is R2 in summary(lm(y~x-1))$r.squared calculated? It is different from (r.square=sum((y.hat-mean (y))^2)/sum((y-mean(y))^2)) I will illustrate these problems by the following codes:
2009 Nov 08
2
negative log likelihood
I have two related variables, each with 16 points (x and Y). I am given variance and the y-intercept. I know how to create a regression line and find the residuals, but here is my problem. I have to make a loop that uses the seq() function, so that it changes the slope value of the y=mx + B equation ranging from 0-5 in increments of 0.01. The loop also needs to calculate the negative log
2011 Dec 01
3
Change the limits of a plot "a posteriori"
Hi all How can I change the limits (xlim or ylim) in a plot that has been already created? For example, consider this naive example curve(dbeta(x,2,4)) curve(dbeta(x,8,13),add=T,col=2) When adding the second curve, it goes off the original limits computed by R for the first graph, which are roughly, c(0,2.1) I know two obvious solutions for this, which are: 1) passing a sufficiently large
2001 Jun 06
3
error in dbeta (PR#970)
Full_Name: Hans Peter Wolf Version: 1.2.1 OS: hpux10.20 Submission from: (NULL) (129.70.84.25) dbeta computes a wrong result with parameters (1.3,1) > version platform hppa2.0-hp-hpux10.20 arch hppa2.0 os hpux10.20 system hppa2.0, hpux10.20 status major 1 minor 2.1 year
2011 Aug 01
3
Beta fit returns NaNs
Hi, sorry for repeating the question but this is kind of important to me and i don't know whom should i ask. So as noted before when I do a parameter fit to the beta distr i get: fitdist(vectNorm,"beta"); Fitting of the distribution ' beta ' by maximum likelihood Parameters: estimate Std. Error shape1 2.148779 0.1458042 shape2 810.067515 61.8608126 Warning
2008 Nov 01
2
sampling from Laplace-Normal
Hi, I have to draw samples from an asymmetric-Laplace-Normal distribution: f(u|y, x, beta, phi, sigma, tau) \propto exp( - sum( ( abs(lo) + (2*tau-1)*lo )/(2*sigma) ) - 0.5/phi*u^2), where lo = (y - x*beta) and y=(y_1, ..., y_n), x=(x_1, ..., x_n) -- sorry for this huge formula -- A WinBUGS Gibbs sampler and the HI package arms sampler were used with the same initial data for all parameters. I
2012 Jan 03
6
calculate quantiles of a custom function
Hi, I guess that my problem has an obvious answer, but I have not been able to find it. Suppose I create a custom function, consisting of two beta-distributions: myfunction <- function(x) { dbeta(x,2,6) + dbeta(x,6,2) } How can I calculate the quantiles of myfunction? I have not seen any continous function treated in the docs, and applying the "quantile function" gives me an
2010 Jan 04
3
how to plot multiple density functions in one graph
Hello, I am new to R and have two easy questions. How can you plot multiple density functions in one graph? I have five beta densities that I would like to plot in one graph. I understand how to plot one beta density as a line: plot (x,(dbeta(x,shape1=,shape2=,), type ="l") Does the Pareto distribution need to be added to R with an additional package? thanks, John [[alternative
2013 Sep 18
1
dbeta may hang R session for very large values of the shape parameters
Dear all, we received a bug report for betareg, that in some cases the optim call in betareg.fit would hang the R session and the command cannot be interrupted by Ctrl-C? We narrowed down the problem to the dbeta function which is used for the log likelihood evaluation in betareg.fit. Particularly, the following command hangs the R session to a 100% CPU usage in all systems we tried it (OS X
2007 Nov 24
2
how to compute highest density interval?
Suppose i want to compute a 95% highest density for a beta distribution beta(a,b) the two end points x1 and x2 shoudl satisfy the following two equations: pbeta(x1,a,b)-pbeta(x2,a,b)=95% dbeta(x1,a,b)=dbeta(x2,a,b) Is there any fast way to compute x1 and x2 in R? [[alternative HTML version deleted]]
2008 Sep 30
2
R's integrate function
Hello, I am trying to use R's integrate function to calculate the following integral for z=423: integrate(function(y,z){ sapply(y, function(y,z){ integrate(function(x,z) 1/x*dbeta(0.01,x/(0.005/1.005),(1-x)/(0.005/1.005))*dbeta(y,x/(0.005/1.005),(1-x)/(0.005/1.005))*(1-y)^z,0,1,423)$value }) },0,1,423)$value but I receive an error message saying that the maximum number of subdivisions is
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
2010 Apr 14
2
Gaussian Quadrature Numerical Integration In R
Hi All, I am trying to use A Gaussian quadrature over the interval (-infty,infty) with weighting function W(x)=exp(-(x-mu)^2/sigma) to estimate an integral. Is there a way to do it in R? Is there a function already implemented which uses such weighting function. I have been searching in the statmode package and I found the function "gauss.quad(100, kind="hermite")" which uses
2012 Jul 05
3
Histogram
I have a column of 1000 datapoints from the normal distribution with mean 2 and variance 4. How can I get a histogram of these observations with 20 bins with each bin having 50 observations? -- Thanks, Jim. [[alternative HTML version deleted]]