Displaying 20 results from an estimated 600 matches similar to: "Fitting 3 beta distributions"
2007 Oct 15
1
how to use normalmixEM to get correct result?
Dear R-Users,
I have a large number of data(54000) and the field of data is 50 to 2.0e9. I want to use normalmixEM (package:mixtools) to fit them in finite mixture narmal distributions,but get some mistakes.I don't know which steps make the error.
I have used the following functions before
>x<-read.table("data")
>log.x<-log10(x$V1)
>log.x<-sort(log.x)
2013 Mar 30
1
normal mixture EM not working?
Hi,
I am currently working on fitting a mixture density to financial data.
I have the following data:
http://s000.tinyupload.com/?file_id=00083355432555420222
I want to fit a mixture density of two normal distributions.
I have the formula:
f(l)=πϕ(l;μ1,σ21)+(1−π)ϕ(l;μ2,σ22)
my R code is:
normalmix<-normalmixEM(dat,k=2,fast=TRUE)
pi<-normalmix$lambda[1]
mu1<-normalmix$mu[1]
2013 Mar 18
2
Fit a mixture of lognormal and normal distributions
Hello
I am trying to find an automated way of fitting a mixture of normal and log-normal distributions to data which is clearly bimodal.
Here's a simulated example:
x.1<-rnorm(6000, 2.4, 0.6)x.2<-rlnorm(10000, 1.3,0.1)X<-c(x.1, x.2)
hist(X,100,freq=FALSE, ylim=c(0,1.5))lines(density(x.1), lty=2, lwd=2)lines(density(x.2), lty=2, lwd=2)lines(density(X), lty=4)
Currently i am using
2008 Jul 16
2
Howto view function's source code of an installed package
Hi,
Is there a way I can view the functions source code of a
package I installed in my PC.
For example I downloaded the great "mixtools" package.
I want to see the source code of one of its function "normalmixEM"
Is there a way to do it? Presumably from R command prompt?
I tried to take a look at the zip file, but somehow I can't seem
to find the file on which I can
2012 Sep 14
1
tcltk installation problem in R (Mac OS X version)
Hi all, I just installed R on my Mac OS X machine and wanted to installed
tcl/tk. So, I installed tcl/tk from this page:
http://cran.r-project.org/bin/macosx/tools/
It gets placed in /usr/local dir.
and then I installed R.
Next, in R, I set the TCL_LIBRARY variable by saying
Sys.setenv(TCL_LIBRARY="/usr/local/lib/tcl8.5")
and
Sys.setenv(TK_LIBRARY="/usr/local/lib/tk8.5")
But
2007 Oct 03
1
FW: help with mclust
> No HTML this time. Sorry
Dear all,
I am attempting to model some one-dimensional data using Gaussian mixture model with mclust.? Generally, the data that I have have 3 overlapping populations (with one of them being the majority, and the other two combining to less than 15%) and for some reason, mclust consistently ignores the smaller peaks, giving me strange values for the means
2013 Apr 09
0
[R-SIG-Finance] EM algorithm with R manually implemented?
Moved to R-help because there's no obvious financial content.
Michael
On Sat, Apr 6, 2013 at 10:56 AM, Stat Tistician
<statisticiangermany at gmail.com> wrote:
> Hi,
> I want to implement the EM algorithm manually, with my own loops and so.
> Afterwards, I want to compare it to the normalmixEM output of mixtools
> package.
>
> Since the notation is very advanced, I
2013 Mar 11
1
Distribution plus background fitting
Hi All,
I apologise if this question has been answered before, but my background is
a little different from most people using R, and the language we use seems
to be different! I am trying to analyse some nuclear physics data, which
consists of an ensemble of "energy" readings in a detector that, when
binned, form a number of Gaussian shaped peaks superimposed on a varying
background
2013 Mar 31
0
Standard error of normalmixEM fit?
I fitted a mixture denstiy of two gaussians two my data. I now want to
calculated the standard errors of the estimates via the boot.se command of
the mixtools package. My question is now, if the output is correct? It
seems a bit odd to me, so is this correct what I am doing and can I rely on
the values?
My data: http://s000.tinyupload.com/?file_id=09285782882980618119
My code:
2013 Apr 04
0
Std. error of normalmixEM with boot.se
I fitted a mixture denstiy of two gaussians two my data. I now want to
calculated the standard errors of the estimates via the boot.se command of
the mixtools package. My question is now, if the output is correct? It
seems a bit odd to me, so is this correct what I am doing and can I rely on
the values?
My data: http://s000.tinyupload.com/?file_id=09285782882980618119
My code:
2013 Apr 04
0
Std. error normalmixEM using boot.se
I tried to post this question two times, each time it seemed to fail, since
"
An embedded and charset-unspecified text was scrubbed..."
So I try it again:
I fitted a mixture density of two gaussians two my data. I now want to
caluclate the standard errors of the estimates via the boot.se command of
the mixtools package. My question is now, if the output is correct? It
seems a bit odd
2011 Jan 06
0
Set axis limits in mixtools plot
Hello,
Can the x and y axis limits be specified in a density plot with the
mixtools package for a finite mixture model? Uncommenting the xlim2/
ylim2 lines in the plot command below generates 'not a graphical
parameter' warnings (and does not change the axis settings), and
uncommenting the xlim/ylim lines generates a 'formal argument "ylim"
matched by multiple actual
2006 Apr 17
1
using betareg: problems with anova and predict
Dear R-helpers:
We have had fun using betareg to fit models with proportions as
dependent variables.
However, in the analysis of these models we found some wrinkles and
don't know where is the best place to start looking for a fix.
The problems we see (so far) are that
1. predict ignores newdata
2. anova does not work
Here is the small working example:
----------------------------
x
2011 Sep 01
3
betareg question - keeping the mean fixed?
Hello,
I have a dataset with proportions that vary around a fixed mean, is it
possible to use betareg to look at variance in the dispersion parameter
while keeping the mean fixed?
I am very new to R but have tried the following:
svec<-c(qlogis(mean(data1$scaled)),0,0,0)
f<-betareg(scaled~-1 | expt_label + grouped_hpi, data=data1, link.phi="log",
2011 Jun 24
3
Error using betareg
Dear all,
I get an error using betrag on this data set
:http://dl.dropbox.com/u/1866110/dump.csv.
I run it like this
regression f2.1=betareg(Y~X1+X2,data=dump)
summary(f2.1)
I get :
Call:
betareg(formula = Y ~ X1 + X2, data = dump)
Standardized weighted residuals 2:
Error in quantile.default(x$residuals) :
missing values and NaN's not allowed if 'na.rm' is FALSE
In addition:
2009 Feb 13
1
need help with errors in betareg analysis
Hi
I'm trying to fit a model in betareg and I'm getting errors, but have no
idea what they mean or how to solve them. Does anyone have experience with
this?
> model <- betareg(ACT ~ ST*SoilT, data = actDL_F)
Warning messages:
1: In sqrt(W) : NaNs produced
2: In sqrt(W) : NaNs produced
3: In sqrt(1 + phihat) : NaNs produced
data summaries don't give any na's or problems I
2007 Jan 18
2
The math underlying the `betareg' package?
Folks,
The betareg package appears to be polished and works well. But I would
like to look at the exact formulas for the underlying model being
estimated, the likelihood function, etc. E.g. if one has to compute
\frac{\partial E(y)}{\partial x_i}, this requires careful calculations
through these formulas. I read "Regression analysis of variates
observed on (0,1): percentages, proportions and
2007 Jul 28
4
beta regressions in R
Good morning,
Does anyone know of a package or function to do a beta regression?
Thanks,
Walt Paczkowski
_________________________________
Walter R. Paczkowski, Ph.D.
Data Analytics Corp.
44 Hamilton Lane
Plainsboro, NJ 08536
(V) 609-936-8999
(F) 609-936-3733
2011 Mar 12
3
betareg help
Dear R users,
I'm trying to do betareg on my dataset.
Dependent variable is not normally distributed and is proportion (of condom
use (0,1)).
But I'm having problems:
gyl<-betareg(cond ~ alcoh + drug, data=results)
Error in optim(par = start, fn = loglikfun, gr = gradfun, method = method, :
initial value in 'vmmin' is not finite
Why is R returning me error in optim()?
What
2014 Jun 30
0
convergence warning in betamix()
Hi, I am running some rather complex mixtures of beta regressions using the
betamix() command from the betareg package (V. 3.0-4). If I am doing
exploratory regressions with only one random starting value (nstart=1) I
obtain results which converge after about 100 iterations. However, if I run
regressions with nstart=100 random starting values I obtain solutions
amended with a warning that no