similar to: Truncated MVN RNG?

Displaying 20 results from an estimated 20000 matches similar to: "Truncated MVN RNG?"

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
2007 Feb 13
4
Generating MVN Data
Dear All I want to generate multivariate normal data in R for a given covariance matrix, i.e. my generated data must have the given covariance matrix. I know the rmvnorm command is to be used but may be I am failing to properly assign the covariance matrix. Any help will be greatly appreciated thanks. M. R. Ahmad
2007 Oct 11
2
test for whether dataset comes from a known MVN
Dear all, I have a multivariate dataset containing 100,000 or more points. I want find the p-value for the dataset of points coming from a particular multivariate normal distribution With mean vector u Covariance matrix s2 So H0: points ~ MVN( u, s2) H1: points not ~ MVN( u, s2) How do I find the p-value in R? To me this is a likelihood ratio test problem. In H0 the parameters are
2003 May 06
4
Questons about R capabilities
Hello, 1) I am interested in performing a limited-dependent variable linear regression. By this I mean a classical linear regression, but for the case where the values of the dependent variable cannot vary from -infinity to +infinity, but are truncated and so are between two finite limits L1 and L2. Does R1.7 have this capability? If so what is (are) the relevant command(s)? 2) I am also
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
2012 Oct 12
1
better example for multivariate data simulation question-please help if you can
Dear?All, ? a few weeks ago I have posted a question on the R help listserv that?some of you have responded to with a great solution, would like to thank you for that? again.?I thought I would reach out to you with the issue I am trying to solve now. I have posted the question a few days ago, but probably it was not?clear enough, so I thought i try it again.?At times I have a multivariate example
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
2011 Jan 22
1
faster mvrnorm alternative
Hello, does anybody know another faster function for random multivariate normal variable simulation? I'm using mvrnorm, but as profiling shows, my algorithm spends approximately 50 % in executing mvrnorm function. Maybe some of you knows much faster function for multivariate normal simulation? I would be very gratefull for advices. -- View this message in context:
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
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
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
2017 May 09
3
Generating samples from truncated multivariate Student-t distribution
Dear Members, I am working with 6-dimensional Student-t distribution with 4 degrees of freedom truncated to [20; 60]. I have generated 100 000 samples from truncated multivariate Student-t distribution using rtmvt function from package ?tmvtnorm?. I have also calculated mean vector using equation (3) from attached pdf. The problem is, that after summing all elements in one column of rtmvt result
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
2000 Nov 28
4
random number generator
I have an inquire about the RNG in R It is known that when we use the " rnorm " function , we pass the arguments : 1- number of variables to be generated 2- mean vector of the normal random errors. 3- standard deviation vector of the normal random errors. my question is the following Is the a way (a function) in R that we could specify the covariance matrix in step 3, instead of the
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.
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
2018 Mar 04
2
lmrob gives NA coefficients
Thanks for your reply. I use mvrnorm from the *MASS* package and lmrob from the *robustbase* package. To further explain my data generating process, the idea is as follows. The explanatory variables are generated my a multivariate normal distribution where the covariance matrix of the variables is defined by Sigma in my code, with ones on the diagonal and rho = 0.15 on the non-diagonal. Then y
2004 Feb 02
3
mvrnorm problem
I am trying to simulate draws from a multivariate normal using mvrnorm, and am getting the following error message: Error in mu + eS$vectors %*% diag(sqrt(pmax(ev, 0)), p) %*% t(X) : non-conformable arrays I do not understand why I am getting this message, since the vector of means I am giving to the function is 13 by 1 and the variance matrix I am giving to the function is 13
2018 Mar 04
0
lmrob gives NA coefficients
What is 'd'? What is 'n'? On Sun, Mar 4, 2018 at 12:14 PM, Christien Kerbert < christienkerbert at gmail.com> wrote: > Thanks for your reply. > > I use mvrnorm from the *MASS* package and lmrob from the *robustbase* > package. > > To further explain my data generating process, the idea is as follows. The > explanatory variables are generated my a
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]]