search for: squaredr2b

Displaying 1 result from an estimated 1 matches for "squaredr2b".

Did you mean: squared_2
2012 Dec 04
1
Winbugs from R
...1 )beta0 ~ dnorm( 0.0, 1.0E-4)beta1 ~ dnorm( 0.0, 1.0E-4)beta2 ~ dnorm( 0.0, 1.0E-4)# definition of sigmas2<-1/taus <-sqrt(s2)# calculation of the sample variancefor (i in 1:n){ c.time[i]<-time[i]-mean(time[]) }sy2 <- inprod( c.time[], c.time[] )/(n-1)# calculation of Bayesian version R squaredR2B <- 1 - s2/sy2# Expected y for a typical delivery timetypical.y <- beta0 + beta1 * mean(cases[]) + beta2 * mean(distance[])}INITSlist( tau=1, beta0=1, beta1=0, beta2=0 )DATA (LIST)list( n=25,time = c(16.68, 11.5, 12.03, 14.88, 13.75, 18.11, 8, 17.83,79.24, 21.5, 40.33, 21, 13.5, 19.75, 24, 29,...