[R] How to ask for *fixed* number of distributions under parameterized Gaussian mixture model.

2008-04-03 Thread Hung-Hsuan Chen (Sean)
Dear R users: I am wondering how to ask for *fixed* number of distributions under parameterized Gaussian mixture model. I know that em() and some related functions can predict the parameterized Gaussian mixture model. However, there seems no parameter to decide number of distributions to be mixed

[R] plot 3dimensional points with log axes

2008-03-31 Thread Hung-Hsuan Chen (Sean)
Dear R users I am looking for functions that can plot 3 dimensional figures *with logarithmic axes*. I tried scatterplot3d (under package scatterplot3d) but the log parameter is not implemented (although log appears in the parameter list). Does anyone has some suggestions? Thanks a lot Austin

[R] How to set type of censored data in coxph regression

2008-03-13 Thread Hung-Hsuan Chen (Sean)
Dear R users, I tried to analysis the hazard function of some data by coxph function in survival package. The type of the data include left-censored, right-censored, both right-censored and left-censored (btw, does this has a technical term?), and complete ones. I noticed that event (one

[R] How to plot raw data and fit curve on the same figure and how to decide how good the fitting is?

2008-03-13 Thread Hung-Hsuan Chen (Sean)
Dear R users, I have two group of data (say X1 and X2) that (may) fit bivariate normal distribution. I used mvnxxx (a function in mclust library) to fit the data to a bivariate normal distribution. Now I want to plot the data (each (X1, y1) represents a point on the xy plane) and the estimated

[R] Questions about EM algorithm

2008-02-14 Thread Hung-Hsuan Chen (Sean)
Dear all: Assume I have 3 distributions, x1, x2, and x3. x1 ~ normal(mu1, sd1) x2 ~ normal(mu2, sd2) x3 ~ normal(mu3, sd3) y1 = x1 + x2 y2 = x1 + x3 Now that the data I can observed is only y1 and y2. It is easy to estimate (mu1+m2), (mu1+mu3), (sd1^2+sd2^2) and (sd1^2+sd3^2) by EM algorithm