similar to: question about mixtools package

Displaying 20 results from an estimated 8000 matches similar to: "question about mixtools package"

2011 Mar 04
2
How to copy data from data.frame to matrix
Hello I'm a new in R I have a large data.frame "s" (this is actualy just a table in mysql) : > names(s) [1] "symbols", "day", "value" I need to convert it to simple matrix. I have define this matrix like this: > data.matrix <- matrix(nrow=nDays, ncol=nSymbols, dimnames=list(days, symbols)) then i just copy values to the matrix using for()
2011 May 18
1
How to make array of regression objects
Dear all, I have made couple logistic regressions, what making a distribution of some event. Currently, i store it like this: o1 <- lrm(...) o2 <- lrm(...) o3 <- lrm(...) ... Then, i have made a function to peak required regression object from this variables by it number: get_object <- function(obj_name, nModel) { eval (parse(text=paste("o <- ", obj_name, nModel,
2010 Jun 29
2
Matrix operations
Hello I have a quick question. I need to compute matrix in R, like A <- t(X) %*% solve(V) %*% X, where X is a vector and V is a matrix This code works, but now i want to optimize it. I have try: A <- crossprod(X, solve(V)) %*% X Is there another, better way? WBR Dima [[alternative HTML version deleted]]
2007 Jan 10
0
Installation problem with package mixtools
I am trying to install mixtools on Debian Etch and get the following error dell-2 /usr/lib # R CMD INSTALL mixtools_0.1.0.tar.gz * Installing *source* package 'mixtools' ... ** libs gcc -I/usr/share/R/include -I/usr/share/R/include -fpic -g -O2 -std=gnu99 -c new_svalues.c -o new_svalues.o gfortran -fpic -g -O2 -c sphericaldepth.f -o sphericaldepth.o make: gfortran: Command not
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
2011 Mar 22
0
EM and Mixtools
I have 2 questions concerning the EM algorithm. Is it true that the EM algorithm gives unique answers for the means and variances of a mixture of 2 normals? I am using mixtools and I am surprised that it works better than a Bayesian program I wrote. If so can someone say why the mixing probabilities are so good? -- Thanks, Jim. [[alternative HTML version deleted]]
2010 Sep 28
1
How to convert SEXP to double
Hello All, A simple question. I get some return from the R in my C++ program (via Rcpp package). The result come, as SEXP and it should be a simple numeric variable. How to convert it to double? The code, what i use: stringstream ss; ss << "p <- predict(fit_ar11, n.ahead = 2, doplot=FALSE);" << "p$pred[1]"; SEXP ans; int iRet =
2010 Apr 27
2
How to work out 3-way probabilities
Hello. I have a quick question. I try to use logit regression, to work out probabilities in the sport event. I have work out probabilities for group of 2 players: p1 - probability, what player1 will beat player2 p2 - probability, what player2 will beat player1 pt - tie probability, p1 <- 1 - p1 - p2; Now i want to work out probabilities for group of 3 players, like: pg1 - probability, what
2009 Aug 06
0
Fitting Mixture of Non-Central Student's t Distributions
Dear Ingmar & Dave, Thanks a lot for your help and sorry for the late reply. Finally, I've found a way to separate the mixture of distributions (empirically). But the gamlss package looks great, I'm sure it will help me during my further studies. Kind regards, Susanne On 15 Jun 2009, at 20:09, Ingmar Visser wrote: > Dear Susanne & Dave, > > The gamlss package family
2011 May 07
2
MDAC problems after last Wine path
Hello all. I'm using Fedora 14. I have patched my wine yesterday using yum, ane my wine current version is: 1.3.18-1.fc14. After that, some of my programs stop to working. It seems, what something happen with MDAC component, because program can't open mdb file and can not found MDAC component from the console. The errors. what i get: err:ole:CoGetClassObject class
2013 Mar 14
3
Error: did not find expected key while parsing a block mapping
I run test: test:units lass ProductTest < ActiveSupport::TestCase test "product attributes not be empty" do product = Product.new assert product.invalid? assert product.errors[:title].any? assert product.errors[:description].any? assert product.errors[:price].any? assert product.errors[:image_url].any? end test "price musst be
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
1999 Jul 20
2
tensor() function and sets
Hi Everyone, To complete the outer() and kronecker() functions in the base, may I suggest the following tensor() function, which allows the multiplication of arrays through sets of conformable dimensions. I am happy to write a help page if required. The code also needs a setdiff() function which prompts me to ask: what about simple set functions? I expect many of us have written our own
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
2009 Jun 13
1
Fitting Mixture of Non-Central Student's t Distributions
Dear all, I am attempting to model some one-dimensional data using a mixture model of non-central Student's t distributions. However, I haven't been able to find any R package that provides this functionality. Could there be a way to "manipulate" the EM algorithms from the mixdist or mixtools package to fit the model, or do you have any other suggestions? If anyone could help
2004 Jul 25
2
file index-mail-headers.c: line 408 (index_mail_get_header): assertion failed: (ret != 0)
FreeBSD 4.10-RELEASE, dovecot-1.0-test29 crashes on sort and thread commands: Jul 25 15:12:08 owl dovecot: imap-login: Login: dima [81.19.64.101] Jul 25 15:12:26 owl dovecot: IMAP(dima): file index-mail-headers.c: line 408 (index_mail_get_header): assertion failed: (ret != 0) Jul 25 15:12:26 owl dovecot: child 20384 (imap) killed with signal 6 (gdb) bt #0 0x281e0fc4 in kill () from
2009 Mar 26
1
Weighting data with normal distribution
I have a vector of binary data ? a string of 0?s and 1?s. I want to weight these inputs with a normal kernel centered around entry x so it is transformed into a new vector of data that takes into account the values of the entries around it (weighting them more heavily if they are near). Example: - - - - - 0 1 0 0 1 0 0 1 1 1 1 If x = 3, it?s current value is 0 but it?s new
2009 Nov 03
1
fitting a confined mixture model
Hello all, I would like to fit a mixture model whose components are normal distributions confined in a closed interval. Since there are already several packages for EM, I would like to extend one of these instead of writing a new script from scratch. What would be the best way to customize such an existing package for doing that? Which one is the best in terms of extensibility? (e.g mixtools,
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)
2011 Aug 25
1
How to combine two learned regression models?
Hi All, I have a set of features of size p and I would like to separate my feature space into two sets so that p = p1 + p2, p1 is a set of features and p2 is another set of features and I want to fit a glm model for each sets of features separately. Then I want to combine the results of two glm models with a parameter beta. For example, beta * F(p1) + (1-beta) * F(p2) where F(p1) is a learned