similar to: better example for multivariate data simulation question-please help if you can

Displaying 20 results from an estimated 10000 matches similar to: "better example for multivariate data simulation question-please help if you can"

2012 Oct 11
2
Help on probability distribution question
Dear All,   I have a questions I would like to ask about and wonder if you have any thoughts to make it work in R.   1. I work in the field of medicine where physiologic variables are often simulated, and they can not have negative values. Most often the assumption is made to simulate this parameters with a normal distribution but in the "log-domain" to avoid from negative values to be
2012 Jun 07
4
"Re-creating" distributions
Dear All,   I often have to work with certain models in which I try to "reproduce" a distribution the best I can with very little known information avaible. Is there a package or function in R that could best reproduce a probability distribution using only the mean, median and SD values availble without knowing the actual distribution type to begin with and/or the covariance matrix (for
2008 May 09
1
Multivariate simulation
Dear everyone, I am having problem simulating multivariate data. Though I was able to simulate the data, but finding the variance-covariance matrix of simulated data did not give exact covariance matrix used in simulating the data. Unlike some other packages, like stata, using command "corr2data" will simulate data having the covariance matrix exactly with the specified covariance
2012 Oct 14
0
multivariate lognormal distribution simulation in compositions
Dear All,   thanks to Berend, my question posted yesturday was solved succesfully here: http://r.789695.n4.nabble.com/hep-on-arithmetic-covariance-conversion-to-log-covariance-td4646068.html . I posted the question with the assumption of using the results with rlnorm.rplus() from compositions. Unfortunatelly, I am not getting reasonable enough outcome. Am I applying the results wrongfully? The
2004 Jun 25
2
Simulating from a Multivariate Normal Distribution Using a Correlation Matrix
Hello, I would like to simulate randomly from a multivariate normal distribution using a correlation matrix, rho. I do not have sigma. I have searched the help archive and the R documentation as well as doing a standard google search. What I have seen is that one can either use rmvnorm in the package: mvtnorm or mvrnorm in the package: MASS. I believe I read somewhere that the latter was
2002 Jan 23
6
multivariate simulation
To whom it may concern, I try to simulate a non-normal multivariate distribution. The MASS package allows by mean of "mvrnorm" command to perform a multivariate normal simulation. Is there an equivalent command for an arbitrary multivariate distribution available in the R-language? Thank you in advance. Bernard Colin Colin Bernard Professeur titulaire D?partement de Math?matiques et
2009 May 18
2
Simulation from a multivariate normal distribution
I must to create an array with dimensions 120x8x500. Better I have to make 500 simulations of 8 series of return from a multivariate normal distribution. there's the command "mvrnorm" but how I can do this repeating the simulation 500 times?" [[alternative HTML version deleted]]
2003 Sep 30
2
truncated multivariate normal
Please, I would like to know how to generate a truncated multivariate normal distribution k - dimensional, X ~ NT(mu, Sigma), where the elements of X to be non-negative (except the first), and the first dimension is strictly larger than zero. Example: X ~ NT_2(mu, Sigma), where mu=c(0.5, 0.5) and Sigma=c([120, 191], [191,154]), with X_1>0 and X_2>=0 Could anybody help
2008 Jun 26
2
constructing arbitrary (positive definite) covariance matrix
Dear list, I am trying to use the 'mvrnorm' function from the MASS package for simulating multivariate Gaussian data with given covariance matrix. The diagonal elements of my covariance matrix should be the same, i.e., all variables have the same marginal variance. Also all correlations between all pair of variables should be identical, but could be any value in [-1,1]. The problem I am
2012 Jun 15
2
Multivariate Normal and loops
Hi, i'm not english and i'm not very familiar to R, and i'm asking if you can help me. I'm wondering how to create a multivariate normal an then repeat this for a sample of T=1000, and the save this result. Thank you very much for your helping -- View this message in context: http://r.789695.n4.nabble.com/Multivariate-Normal-and-loops-tp4633504.html Sent from the R help mailing
2012 Jun 10
2
mvrnorm limits
Dear All,   I am using the following commands to generate a given dataset:   a <-c(0.348,0.007,0.503,0.58,0.21) cov <-c(0.0448,0,0,0,0,0.0001,0.0001,0,0,0,-0.0055,-0.0005,0.0495,0,0,0.0218,0.0009,-0.0253,0.1103,0,-0.0102,-0.0007,0.00631,0.0067,0.0132) b <-matrix(cov,nrow=5, ncol = 5, byrow = TRUE,dimnames = NULL) g <-mvrnorm(10000,a,b)   is there a way to place limits on the simulated
2007 Nov 16
1
generate multivariate F with specified correlation matrix
Dear all, In MATLAB, to generate multivariate F with specified correlation matrix Pn I can use the code such as Z = mvnrnd([0 0 0 0 0], Pn, N); U = normcdf(Z,0,1); X = [finv(U(:,1),5,15) finv(U(:,2),5,15) finv(U(:,3),5,15) finv(U(:,4),5,15) finv(U(:,5),5,15)]; Is there something similar in R? Thank you for your time.
2010 Aug 24
3
generate random numbers from a multivariate distribution with specified correlation matrix
Hi all, rmvnorm()can be used to generate the random numbers from a multivariate normal distribution with specified means and covariance matrix, but i want to specify the correlation matrix instead of covariance matrix for the multivariate normal distribution. Does anybody know how to generate the random numbers from a multivariate normal distribution with specified correlation matrix? What about
2002 Dec 04
1
Mixture of Multivariate Gaussian Sample Data
Hey, I am confused about how to generate the sample data from a mixture of Multivariate Gaussian ditribution. For example, there are 2 component Gaussian with prior probability of 0.4 and 0.6, the means and variances are u1=[1 1]', Cov1=[1 0;0 1] and u2=[-1 -1]', Cov2=[1 0;0 1] repectively. So how can I generate a sample of 500 data from the above mixture distribution? Thanks. Fred
2007 Mar 23
1
generating lognormal variables with given correlation
Dear R users I use simulated data to evaluate a model by sampling the parameters in my model from lognormal distributions. I would like these (lognormal distributed) parameters to be correlated, that is, I would like to have pairwise samples of 2 parameters with a given correlation coefficient. I have seen that a covariance matrix can be fixed when generating random variables from a
2013 Apr 01
1
lognormal sampleing using covariance matrix
Dear All,   wondering if someine can access the link to the randsamp code referenced in the R-help archive here: http://www.mail-archive.com/r-help@stat.math.ethz.ch/msg75645.html ? I have tried but for whatever reason I can not get trough. My problem seems to be similar to what the author originally described there, so having access to it would be great. Else, if you have any thougths on sampling
2007 Aug 13
1
simulate data from multivariate normal with pre-specified correlation matrix
For example, the correlation matrix is 3x3 and looks like 1 0.75 0 0 0 0.75 1 0 0 0 0 0 0 0 0 Can I write the code like this? p<- 3 # number of variables per observation N<- 10 # number of samples # define population correlation matrix sigma sigma<-matrix(0,p,p) #creates a px p matrix of 0 rank<-2 for (i in 1:rank){ for (j in 1:rank){ rho<-0.75
2005 May 03
1
multivariate Shapiro Wilks test
Hello, I have a question about multivariate Shapiro-Wilks test. I tried to analyze if the data I have are multivariate normal, or how far they are from being multivariate normal. However, any time I did >mshapiro.test(mydata) I get the message: Error in solve.default(R %*% t(R), tol = 1e-18) : system is computationally singular: reciprocal condition number = 5.38814e-021 I tried
2008 Dec 08
1
Multivariate kernel density estimation
I would like to estimate a 95% highest density area for a multivariate parameter space (In the context of anova). Unfortunately I have only experience with univariate kernel density estimation, which is remarkebly easier :) Using Gibbs, i have sampled from a posterior distirbution of an Anova model with k means (mu) and 1 common residual variance (s2). The means are independent of eachother, but
2010 Jun 17
1
simulating data from a multivariate dist
Sir, I am working on fitting distribution on multivariate financial data and then simulate observations from that fitted distribution. I use stepAIC.ghyp() function of 'ghyp' library which select the best fitted distribution from generalized hyperbolic distribution class on the given dataset. data(indices) # Multivariate case: aic.mv <- stepAIC.ghyp(indices, dist =