search for: pmn

Displaying 2 results from an estimated 2 matches for "pmn".

Did you mean: pfn
2012 Mar 10
1
Draw values from multiple data sets as inputs to a Monte-Carlo function; then apply across entire matrix
...I have (for simplicity) 3 spatial raster data sets (each 4848 x 4053 cells) as ASCII files: -Poultry density (mean value in each cell) -Poultry density (standard deviation in each cell) -Wild bird density (single estimate in each cell) I read them into R using read.table. The data look correct: Pmn <- read.table("D:/Data/PoultryMeans.txt") Psd <- read.table("D:/Data/PoultryStDev.txt") Wde <- read.table("D:/Data/WildBirdDensity.txt") The Model: In the Monte-Carlo simulation, Poultry and Wild birds have different distributions (normal and triangle, respe...
2010 Feb 08
0
Mixed logit models with a random coefficient
...andard deviations b2<-theta[3] /*B2 P<-NULL b1<-rnorm(500,mean=m1,sd=s1) /*generate 500 random draws for B1 for(m in 0:999) { Dm<-X[(1+3*m):(3+3*m),] /*Extract the data for one person Pn<-NULL for(n in 1:500) { b<-rbind(b1[n],b2) an<-sum(exp(Dm%*%b)) Pmn<-exp(Dm%*%b)/an /*Under each B1, compute the choice probabilities Pn<-cbind(Pn,Pmn) } Pm<-rowMeans(Pn) /* The simulated probabilities for one person P<-rbind(P,Pm) /* Obtain the choice probabilities for all 1,000 people } sum(log(P)*(as.numeric(y))) /* Log-likelihood func...