similar to: Help finding the proper function

Displaying 20 results from an estimated 6000 matches similar to: "Help finding the proper function"

2011 May 01
2
Question on where samples are grouped in rmvnorm{mvtnorm}
Dear All, For function: rmvnorm{mvtnorm} in (library mvtnorm, not splus2R), if I generate 2 bivariate normal samples as follows: > rmvnorm(2,mean=rep(0,2),sigma=diag(2)) [,1] [,2] [1,] 2.0749459 1.4932752 [2,] -0.9886333 0.3832266 Where is the first sample, it is stored in the first row or the first column? Does this function store samples row-wise or column-wise? Thank
2018 Apr 12
3
Bivariate Normal Distribution Plots
R-Help I am attempting to create a series of bivariate normal distributions. So using the mvtnorm library I have created the following code ... # Standard deviations and correlation sig_x <- 1 sig_y <- 1 rho_xy <- 0.0 # Covariance between X and Y sig_xy <- rho_xy * sig_x *sig_y # Covariance matrix Sigma_xy <- matrix(c(sig_x ^ 2, sig_xy, sig_xy, sig_y ^ 2), nrow = 2, ncol = 2)
2001 Aug 30
1
MCMC coding problem
Dear All, I am trying to convert some S-plus code that I have to run MCMC into R-code. The program works in S-plus, but runs slowly. I have managed to source the program into R. R recognizes that the program is there; for example, it will display the code when I type the function name at the prompt. However, the program will not run. When I try to run the program, I get the following error
2002 Oct 02
4
T-Distribution
Dear sir, I would ask if there are in R some code to generate a random sample from a mvariate student distribution like that one wich generate the multivariate normal one i mean( rmvnorm(n, mu, sigma) Second question : if R can plot density 3Dcurve I don't mean de histogram but de hole density function(normal for example). I use a windows version of The R software Thank you in advance wiyh
2008 Jul 03
1
Problem in applying conditional looping
Respected All, I hope you are enjoying good health, I am tring to write a program in R but could not be very sucessful. My program draws random sample form bivariate normal distribution and then compute a variable PIJ. For certian samples some entries of variable PIJ is apearing as negative, which result in negative variance estimator. I want to introduce a loop in my program that verify the each
2012 Sep 13
2
simulate from conditional distribution
Dear all, Y, X are bivariate normal with all the parameters known. I would like to generate numbers from the distribution Y | X > c where c is a constant. Does there exist an R function generating random numbers from such a distribution? Thank you very much. hannah [[alternative HTML version deleted]]
2006 Jul 01
5
generate bi-variate normal data
Dear all, I would like to generate bi-variate normal data given that the first column of the data is known. for example: I first generate a set of data using the command, x <- rmvnorm(10, c(0, 0), matrix(c(1, 0, 0, 1), 2)) then I would like to sum up the two columns of x: x.sum <- apply(x, 1, sum) now with x.sum I would like to generate another column of data, say y, that makes
2010 Oct 20
1
Generate variable with Bivariate Normal Distribution
Dear All I want to generate variable with Bivariate Normal Distribution by use mean1 = a, variance1 = b, mean2 = c, variance2 = d, rho = e. How I can do this. Many Thanks. IRD [[alternative HTML version deleted]]
2002 Mar 02
1
pmvnorm?
Dear all, The MASS library provides a mvrnorm function to generate random numbers from a multivariate normal distribution, similar to S-Plus's rmvnorm, but is there an R-equivalent to pmvnorm, which generates probabilities from a multivariate normal? With thanks, John Field -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read
2013 Sep 15
1
DataEllipse versus Ellipse Function in R
Hi: Does Ellipse and dataellipse function in R produce the same ellipse? I wanted to see how the radius for the Ellipse function in R calculated. Also what is the var-covariance matrix, if any, assumed for the dataellipse function? Heres an example of the code where I am generating Multivariate normal data and creating ellipse using the 2 functions: library(car) library(mvtnorm) mu =
2006 May 11
2
Maximum likelihood estimate of bivariate vonmises-weibull distribution
Hi, I'm dealing with wind data and I'd like to model their distribution in order to simulate data to fill-in missing values. Wind direction are typically following a vonmises distribution and wind speeds follow a weibull distribution. I'd like to build a joint distribution of directions and speeds as a VonMises-Weibull bivariate distribution. First is this a stupid question? I'm
2000 Jan 12
0
Problems creating a random sample
> Date: Wed, 12 Jan 2000 13:05:21 +0100 (CET) > From: Adriane Leal <loparic at student.fsa.ucl.ac.be> > To: r-help at stat.math.ethz.ch > Subject: [R] Problems creating a random sample > > Hi! > > I'm supposed to create a random sample bivariate normal variates of size > equal to 250 with mean vector (-1,1) and cov matrix (1,0.95,0.95,1) > > In S
2006 Nov 30
1
data.frame within a function (PR#9294) (cont'd)
This continues the message "data.frame within a function (PR#9294)" that was posted on 2006/10/12. Duncan Murdoch kindly replied. I'm using the current version R 2.4.0, but the same issue exists. Just copy and paste the following code under R, and compare the output of f1() and f2() and the output of f3() and f4(). Does anybody have any idea? Thanks.
2008 Oct 23
15
VEC Operator in R
Can anyone please tell whether there is any R function to act as "VEC" and "VECH" operator on Matrix? Yes of course, I can write a user-defined-function for that or else, I can put dim(mat) <- NULL. However I am looking for some R function. Your help will be highly appreciated. Regards, -- View this message in context:
2004 Nov 16
2
help on EM Algorithm for bivariate normal
Hi, I woul like to know if it is possible to have a "R code" to generate EM Algorithm for a normal bivariate mixture. Best regard, S.F.
2006 May 12
3
Maximum likelihood estimate of bivariate vonmises-weibulldistribution
Thanks Dimitris!!! That's much clearer now. Still have a lot of work to do this weekend to understand every bit but your code will prove very useful. Cheers, Aziz -----Original Message----- From: Dimitrios Rizopoulos [mailto:Dimitris.Rizopoulos at med.kuleuven.be] Sent: May 12, 2006 4:35 PM To: Chaouch, Aziz Subject: RE: [R] Maximum likelihood estimate of bivariate
2007 May 26
1
Why ?rmvnorm not working
Hi, My R version is 2.4.1 and I installed the the packages MASS and run command library("MASS"), however when I type ?rmvnorm, no help topic found, it worked before. I tried to ype ?rinvgamma from "MCMCpack" which works great. Anybody have idea? I also reinstalled MASS package, but when I try to type rmvnorm(), no functions found. Pat
2012 Sep 27
2
Generating an autocorrelated binary variable
Hi R-fellows, I am trying to simulate a multivariate correlated sample via the Gaussian copula method. One variable is a binary variable, that should be autocorrelated. The autocorrelation should be rho = 0.2. Furthermore, the overall probability to get either outcome of the binary variable should be 0.5. Below you can see the R code (I use for simplicity a diagonal matrix in rmvnorm even if it
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
2004 May 04
2
Sampling 1000 times from a bivariate normal distibution
Dear expert, I have two coefficients and covariance matrix. My objective is sampling 1000 times from the mean and covariance matrix. In order to get that, what kind of commend should I use? If you do not mind, could you tell me the comment in detail about parameter used in that commend also? Thank you. Sung. [[alternative HTML version deleted]]