similar to: Simulating Gaussian Mixture Models

Displaying 20 results from an estimated 700 matches similar to: "Simulating Gaussian Mixture Models"

2008 Sep 16
5
How to find the index
Dear R experts, i have a vector z , i have to do something after z is sorted. how can i find the original index, i.e., before sorting, of a certain element in the sorted vector . thanks in advance regards ----------------------------------------------- Peng Jiang ?? ,Ph.D. Candidate Antai College of Economics & Management ???????? Department of Mathematics ??? Shanghai Jiaotong
2008 Jul 08
1
about EM algorithm
Hi, dear R experts . is there any package contain an universal EM procedure, that is , for arbitrary d.f. , not just the one in mclust . thanks in advance best regards ----------------------------------------------- Peng Jiang ?? ,Ph.D. Candidate Antai College of Economics & Management ???????? Department of Mathematics ??? Shanghai Jiaotong University (Minhang Campus) 800 Dongchuan Road
2008 Jul 03
2
what can we do when R gives no response
Hi, dear R experts , I am new. I met this problem when I am trying to learn how to use the nlminb() function. I tried the example which the document provides ( as the following code ) and R gives no response . I don't know whether it is running or not and it takes a very long time but still output nothing so I just close the session window. my question is is there any method
2008 Jun 24
2
How to solve empty cells in the contingency table?
Hi,Dear all R experts, I am trying to do the 2-way contingency table analysis by fitting the loglinear models. However, I found my table has several empty cells which are theoretically missing values.I have no idea of how to solve them coz we cannot compute the simulated p-value with zero marginals.Does someone have some suggestions? Please help me out, thanks a lot! Cheers, Yan
2008 Jun 27
1
binomial distribution
Hi all, I am a biological student and need your help in statistics. I have two sets of binomial distributed numbers: {a1, a2, ..., an} and {b1, b2, ..., bn}. How can I get the distribution of the ratios of the two sets of numbers {a1/b1, a2/b2, ..., an/bn}? Is there a formula to transform the distributions? Or where I can start if I want to learn necessary techniques? Thank you a lot! xiechao
2008 Jun 28
2
String concatenation
Hi, Is the following function built in somewhere? concat = function(v) { res = "" for (i in 1:length(v)) res = paste(res,v[i],sep="") res } e.g. > concat(c("12","3","45")) [1] "12345" Cheers, Andy -- Andy Fugard, Postgraduate Research Student Psychology (Room F3), The University of Edinburgh, 7 George
2008 Jul 01
2
if one of 4 conditions is not satisfied
I'm trying to do realize the following: I have 4 condtions. If all conditions are satisfied I will paste("PASS") If any of these is not satisfied I will paste("FAIL"). But I have to paste the corresponding failure. ifelse is a good solution but for a 2 conditions. Maybe switch or something like this. Does anyone have an idea how to do? Thanks in advance. Adel -- View
2008 Jun 18
3
Cluster on both categorical and numerical data
Hello there. Is there any function in R that can do cluster on a set of data that has both categorical and numerical variables? thanks. siangli
2008 Jul 05
5
help about random generation of a Normal distribution of several variables
Hello. Somebody knows how can I generate a set of n random vectors of a normal distribution of several variables? For example, I want to generate n=100 random vectors of two dimensions for a normal with mean c(0,1) and variance matrix: matrix(c(2,1,1,3),2,2). Thanks in advance, Arnau.
2008 Jun 30
6
Plotting three time series on the same graph
Dear R Users, I would like to plot three time series on the same graph, two axis on the left and one axis on the right. The time series that I am graphing on the left do not share a similar scale: one has a range of 1:100 and the other a range of 25000:70000. How can I display the tick marks for both on the left hand side without superimposing them, i.e. one set of tick marks in black right
2010 Jan 07
1
faster GLS code
Dear helpers, I wrote a code which estimates a multi-equation model with generalized least squares (GLS). I can use GLS because I know the covariance matrix of the residuals a priori. However, it is a bit slow and I wonder if anybody would be able to point out a way to make it faster (it is part of a bigger code and needs to run several times). Any suggestion would be greatly appreciated. Carlo
2005 Nov 09
8
Element-by-element multiplication operator?
Is there an element-by-element multiplication in R, like the .* operator in Matlab? eg: A (2x3) B (2x3) C=A.*B C (2x3) C = [[a11*b11 a12*b12 a13*b13]; [a21*b21 a22*b22 a23*b23]] I can't find one... Thanks -Mike Gates
2008 Jun 30
0
Fwd: cannot install the package RMySQL
Hi, I first report the installing error to the r-sig-mac mailing list but it seems nobody ever encounter this annoying problem and I got no replies. so I am trying to forward it to this list, hope it never bothers. Anyone had the same problem, or what does the warning message mean ? Thank you in advance ! Begin forwarded message: > From: Peng Jiang <jp021@sjtu.edu.cn> > Date:
2009 May 19
4
nlrwr package. Error when fitting the optimal Box-Cox transformation with two variables
Dear all: I'm trying to fit the optimal Box-Cox transformation related to nls (see the code below) for the demand of money data in Green (3th Edition) but in the last step R gives the next error message. Error en `[.data.frame`(eval(object$data), , as.character(formula(object)[[2]])[2]) : undefined columns selected. ?Any idea to solve the problem? Thanks in advance,
2007 Mar 10
3
long character string problem
Hi All I am having 2 very long character strings (550chars) and I want to put them as expressions together with c(). The problem is that I also get these double-quotes, as seen below in 'fct'. How can I remove these double-quotes? I tried as.name() but it did not work (because of size?). These are creating trouble with subsequent programs, which I tested with strings that for some
2008 Nov 29
2
Reading mixed tables
Dear R buddies, This weekend I became interested in solving Google Code Jam problems using R. I guess R may work very well in this kind of contests but the input of file has been a problem for me. Take this case for example (http://code.google.com/codejam/contest/dashboard?c=agdjb2RlamFtchALEghjb250ZXN0cxjRzBQM), the files are usually of the form: A(number of lines for group 1) a11 a12 a13 a21
2006 Dec 31
7
zero random effect sizes with binomial lmer
I am fitting models to the responses to a questionnaire that has seven yes/no questions (Item). For each combination of Subject and Item, the variable Response is coded as 0 or 1. I want to include random effects for both Subject and Item. While I understand that the datasets are fairly small, and there are a lot of invariant subjects, I do not understand something that is happening
2008 Feb 13
2
Newbie HLM with lme4 questions
Dear R listers, I know I'm breaking the rules by asking a "homework" related question-- I hope you'll forgive me. I am a social psychology graduate student, and the only one in my department who uses R. I successfully completed my multiple regression and structural equation modeling courses using R (John Fox's car and sem packages were a big help, as was his book).
2010 Apr 13
1
Lapack, determinant, multivariate normal density, solution to linear system, C language
r-devel list, I have recently written an R package that solves a linear least squares problem, and computes the multivariate normal density function. The bulk of the code is written in C, with interfacing code to the BLAS and Lapack libraries. The motivation here is speed. I ran into a problem computing the determinant of a symmetric matrix in packed storage. Apparently, there are no explicit
2010 Dec 23
1
Reconcile Random Samples
Is there a way to generate identical random samples using R's runif function and SAS's ranuni function? I have assigned the same seed values in both software packages, but the following results show different results. Thanks! R === > set.seed(6) > random <- runif(10) > random [1] 0.6062683 0.9376420 0.2643521 0.3800939 0.8074834 0.9780757 0.9579337 [8] 0.7627319 0.5096485