Displaying 1 result from an estimated 1 matches for "thetay".
Did you mean:
theta
2007 Oct 16
1
simulation
...as below, I want the function to be able give many replicates, can
somebody advise?
thanks
Oarabile
#alpha,n sdx and sdy are constant, and N is a vector of length n.
unstructured<-function(n,N,alpha,sdx,sdy){
Vx<-rnorm(n,mean=0,sd=sdx)
Vy<-rnorm(n,mean=0,sd=sdy)
thetax<-exp(alpha+Vx)
thetay<-exp(alpha+Vy)
X<-rpois(n,N*thetax)
Y<-rpois(n,N*thetay)
data.frame(X,Y)
}
set.seed()
unstructured()
--
Mrs Oarabile Ruth Molaodi
Department of Statistics and Modelling Science
University of Strathclyde
Livingstone Tower
26 Richmond Street
Glasgow
G1 1XH
United Kingdom
Tel: +44 141 548...