Displaying 14 results from an estimated 14 matches similar to: "generate multiple mvrnorm samples using apply-like"
2011 Aug 24
0
How to use mvrnorm?
Dear R community!
I would like to simulate distributions based on a polynomial model. It
consists of 96 values and I want to randomly select new normaly distributed
values around the modeled values. Furthermore, each value should be
correlated with the previous one. Is it correct to therefore use mvrnorm?
How do I define sigma?
Thank you very much for your help.
All the best,
Marianne
--
View
2011 Jul 06
1
Create simulated data's using mvrnorm
Hi All
This might be something very trivial but I seem to miss something in the
syntax or logic which makes me keep wandering around the problem without
arriving at a solution.
What I want to do is to simulate a sample data for performing cluster
analysis. I tried to use
x1= mvrnorm(10,rep(0.8,3),diag(3))
x2= mvrnorm(10,rep(0,3),diag(3))
x3= mvrnorm(10,rep(-0.5,3),diag(3))
x=rbind(x1,x2,x3)
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
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:
2005 May 01
2
eigen() may fail for some symmetric matrices, affects mvrnorm()
Hi all,
Recently our statistics students noticed that their Gibbs samplers were
crashing due to some NaNs in some parameters. The NaNs came from
mvrnorm (Ripley & Venables' MASS package multivariate normal sampling
function) and with some more investigation it turned out that they were
generated by function eigen, the eigenvalue computing function. The
problem did not seem to happen
2005 Jan 06
2
Generating Data mvrnorm and loops
Dear List:
I am generating N datasets using the following
Sigma<-matrix(c(400,80,80,80,80,400,80,80,80,80,400,80,80,80,80,400),4,4
)
mu<-c(100,150,200,250)
N=100
for(i in 1:N)
{
assign(paste("Data.", i, sep=''),
as.data.frame(cbind(seq(1:1000),(mvrnorm(n=1000, mu, Sigma)))))
}
With these datasets, I need to work on some of the variables and then
run each dataset
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
2019 May 13
0
[PATCH v2 0/8] vsock/virtio: optimizations to increase the throughput
On 2019/5/10 ??8:58, Stefano Garzarella wrote:
> While I was testing this new series (v2) I discovered an huge use of memory
> and a memory leak in the virtio-vsock driver in the guest when I sent
> 1-byte packets to the guest.
>
> These issues are present since the introduction of the virtio-vsock
> driver. I added the patches 1 and 2 to fix them in this series in order
> to
2020 Apr 30
2
Diagnosing IPv6 routing
I discovered that IPv6 is sort of working when I got an email rejection
from Comcast for not having an IPv6 PTR record. I discovered I could telnet
to port 25 on their MX server over IPv6! I then found I could tracroute6 to
them, but I couldn't to my Linode VPS in Fremont. It gets to the data
center and stops. Going the other way, my Linode can traceroute6 almost to
my AT&T-hosted
2020 Apr 28
3
Diagnosing IPv6 routing
On 4/28/2020 3:17 PM, Chris Adams wrote:
> - gateway sends a router solicitation and gets a router advertisement
> with "stateful config" set, which tells gateway to do DHCPv6 (but
> default route comes from RA)
I'm not seeing any outbound IPv6 traffic from my CentOS 7 box on the WAN
interface. I do see RA's emitting from the LAN interface, from radvd. Is
there
2019 May 10
18
[PATCH v2 0/8] vsock/virtio: optimizations to increase the throughput
While I was testing this new series (v2) I discovered an huge use of memory
and a memory leak in the virtio-vsock driver in the guest when I sent
1-byte packets to the guest.
These issues are present since the introduction of the virtio-vsock
driver. I added the patches 1 and 2 to fix them in this series in order
to better track the performance trends.
v1:
2019 May 10
18
[PATCH v2 0/8] vsock/virtio: optimizations to increase the throughput
While I was testing this new series (v2) I discovered an huge use of memory
and a memory leak in the virtio-vsock driver in the guest when I sent
1-byte packets to the guest.
These issues are present since the introduction of the virtio-vsock
driver. I added the patches 1 and 2 to fix them in this series in order
to better track the performance trends.
v1:
2012 May 04
7
Breaking up a Row in R (transpose)
I have the following:
Time A1 A1 B1 B1 C1 C2
x y x y x y
0 5 6 6 7 7 9
1 3 4 4 3 9 9
2 5 2 6 4 7 4
I want to change it to the following:
0 1 2
x y x y x y
A1 5 6 3 4 5 2
B1
2007 Dec 08
0
help for segmented package
Hi,
I am trying to find m breakpoints of a linear regression model. I
used the segmented package. It works fine for small number of
predicators and breakpoints.(3 r.v. 3 points). However, my model has
14 variables it even would not work even for just one breakpoints!.
The error message is always estimated breakpoints are out of range.
Since my problem is time related problem. So I