[R] simulating scores

kerry1912 kerry1912 at hotmail.com
Wed Feb 29 15:33:28 CET 2012


I am currently looking at rugby scores and I have predicted 'T', 'C', 'P' and
'D' by using the predict function for a weekend of results. 

score <-5*T + 2*C + 3*P+ 3*Dr
score

So the output from the score function above is 12 values, as follows. Where
1 to 12 represent the teams involved in the games.
      1                   2               3                4                
5                6               7                8 
23.58252 15.31481 22.12425 15.33689 19.50824 16.22893 25.80283 17.65662 
       9                10               11            12 
12.35336 18.78278 18.98916 16.03140 

However I know what to simulate these matches 100 times and take an average
of these scores and find the percentage of home wins, away wins and draws in
these 100 games that were simulated.
I started like below, but didn't know what to next?

Score.Team1 <- rpois(1, score[1])
Score.Team2 <- rpois(1, score[2])

Any help would greatly be appreciated.
Thanks

--
View this message in context: http://r.789695.n4.nabble.com/simulating-scores-tp4431680p4431680.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list