similar to: mixture models/latent class regression comparison

Displaying 20 results from an estimated 800 matches similar to: "mixture models/latent class regression comparison"

2011 Feb 23
0
negative binomial latent class regression in package flexmix
Hello list, Has anyone had any luck creating an M-step driver for negative binomial regression for use with package flexmix? I've had a look here: http://cran.r-project.org/web/packages/flexmix/vignettes/flexmix-intro.pdf as well as poking around in the flexmix source, but I haven't had much luck getting anything to work. I can't figure out how to a) come up with an initial estimate
2011 Dec 21
0
Estimating a latent class multinomial logit regression with flexmix
I am trying to estimate a latent class multinomial logit regression with flexmix. I am not sure if I should do it as follows: m4<-flexmix(cbind(y,1-y)~x1+x2|id,model=FLXMRglm(family="binomial"),data=NPreg,k=2) , where id links each row with the corresponding respondent. Each respondent has 4 alternatives to chose from. y takes the value 1 only for the alternative chosen; x1 and
2005 Apr 12
1
R Package: mmlcr and/or flexmix
Greetings I'm a relatively new R user and I'm trying to build a latent class model. I've used the 'R Site Search' and it appears there's not much dialogue on these packages On mmlcr, I've gotten it working, but not sure if I'm using it correctly. On flexmix, I can only seem to get results for one class. I'm attaching my code below - if anyone
2009 Dec 04
0
flexmix and mclust help
Hello, I'm trying out flexmix and mclust for the first time on some univariate data which is typically best described as lognormal, but can sometimes be gamma distributed as well. I first tried using EM on mclust assuming the data was lognormally distributed and could only get it to work in "E" mode, i.e. the equal variance mode. I could never get it to work on "V" mode [
2007 Nov 08
1
finite mixture model (or latent class)
Dear Listers, My post might be somewhat OT. Currently, I am trying to use flexmix to build a finite mixture model. For instance, I am getting the prior probability and coefficients for each latent class from training data. Is there a way to get the posterior probablity and prediction of a new dataset? What I am thinking is to apply the prior prob and coefficient from training set to testing data
2006 Feb 09
2
latent class modle for rater agreement
Hello there, I would like to test the agreement amongst 6 raters for nominal data on a scale from 1-4, and conduct a latent class analysis in R. How should the data be formatted and what code should I use? Thank you very much Lisa Wang Princess Margaret Hospital Biostatistics tel:416 946 4501
2005 Jun 02
3
How to change all name of variables
Dear R-helpers, First I apologize if my question is quite simple I have a large datasets which more 100 variables. For a research I need to change all name of variables with add one or more letters on each variables. For example, > data(Pima.tr) > Pima.tr[1:5,] npreg glu bp skin bmi ped age type 1 5 86 68 28 30.2 0.364 24 No 2 7 195 70 33 25.1 0.163 55 Yes 3 5
2011 Feb 28
0
Gamma mixture models with flexmix
I've been trying with no success to model mixtures of Gamma distributions using the package flexmix (see examples below). Can anyone help me get it to model better? Thanks very much. -Ben ## ## Please help me get flexmix to correctly model mixtures of ## Gamma distributions. See examples below. ## library('flexmix') ## ## Plot a histogram of dat and the Gamma mixture model given
2008 May 30
1
existing package (mmlcr) modification -- appropriate process?
All: I am new to R and would like your help in identifying the appropriate process to follow in order to modify the output from an existing package. I've had difficulty finding an answer online, perhaps because I am using incorrect terminology. A package that I am using (mmlcr) invokes another package (multinom). An output of multinom is the standard errors, but this output is not
2008 Jan 15
1
bug in mmlcr ? (PR#10576)
Hi the list. Is there a bug in mmlcr package ? The following code does not compile: mmlcrTest <- function(dataW){ dataL <- reshape(dataW,idvar="id",timevar="T",varying=list("T0","T1","T2"),direction="long",v.names="score") resultR <- mmlcr(outer= ~ 1 | id, components = list(list(formula =
2005 Mar 18
1
How to show which variables include in plot of classification tree
Dear all For my research, I am learning classification now. I was trying some example about classification tree pakages, such as tree and rpart, for instance, in Pima.te dataset have 8 variables (include class=type): library(rpart) library(datasets) pima.rpart <- rpart(type ~ npreg+glu+bp+skin+bmi+ped+age,data=Pima.te, method='class') plot(pima.rpart, uniform=TRUE) text(pima.rpart)
2011 Dec 23
2
Latent class multinomial (or conditional) logit using R?
Hi everyone? Does anybody know how can I estimate a Latent class multinomial (or conditional) logit using R? I have tried flexmix, poLCA, and they do not seem to support this model. thanks in advance adan -- View this message in context: http://r.789695.n4.nabble.com/Latent-class-multinomial-or-conditional-logit-using-R-tp4230083p4230083.html Sent from the R help mailing list archive at
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,
2005 Sep 08
1
clustering: Multivariate t mixtures
Hi, Before I write code to do it does anyone know of code for fitting mixtures of multivariate-t distributions. I can't use McLachan's EMMIX code because the license is "For non commercial use only". I checked, mclust and flexmix but both only do Gaussian. Thanks Nicholas
2012 Mar 05
1
Fitting & evaluating mixture of two Weibull distributions
Hello, I would like to fit a mixture of two Weibull distributions to my data, estimate the model parameters, and compare the fit of the model to that of a single Weibull distribution. I have used the mix() function in the 'mixdist' package to fit the mixed distribution, and have got the parameter estimates, however, I have not been able to get the log-likelihood for the fit of this model
2011 Mar 31
1
rank of Matrix
Dear list, Can anyone tell me how to obtain the rank of a sparse Matrix, for example from package Matrix (class dgCMatrix)? Here is an example of QR decomposition of a sparse matrix (from the sparseQR class help). library(Matrix) data(KNex) mm <- KNex$mm str(mmQR <- qr(mm)) Similarly, using the functions/classes from the relatively new MatrixModels package: library(MatrixModels)
2006 Mar 21
0
finite mixture model, using flexmix
Dear R-users, I would like to use the package flexmix to fit latent classes to a regression model. My data are repeated measurements of bernouilli variables so I can use the binomial family link to the glm function. The design is not balanced, meaning that for some individuals in my data set I have 10 measurements or more, for others I only have 5 or even less. My question is the following. Can
2011 Mar 01
1
Problem on flexmix when trying to apply signature developed in one model to a new sample
Problem on flexmix when trying to apply signature developed in one model to a new sample. Dear R Users, R Core Team, I have a problem when trying to know the classification of the tested cases using two variables with the function of flexmix: After importing the database and creating a matrix: BM<-cbind(Data$var1,Data$var2) I see that the best model has 2 groups and use: ex2
2007 Feb 08
1
smartpred depends on fitted() in flexmix?
Hi, I was going through the examples in smartpred. It seems there's an unstated dependency on the fitted() function in package flexmix. n = 20 set.seed(86) x = sort(runif(n)) y = sort(runif(n)) library(splines) fit = lm(y ~ ns(x, df=5)) plot(x, y) lines(x, fitted(fit)) # won't work w/o prior loading of the flexmix package. newx = seq(0, 1, len=n) points(newx, predict(fit,
2010 Jun 17
1
plotting radial dendrograms
Dear list, I am trying to plot a radial dendrogram using the ape package, which requires my data to be of class 'phylo'. Currently I have my dendrogram stored as an object of class 'dendrogram' which was produced from an outside bit of C code, but was made into an object of class 'igraph.eigenc' and converted to a dendrogram using 'as.dendrogram()' from the igraph