NHLmodel: Spatial model for NHL goal scoring probability

Description Usage Arguments Details Value

Description

Calculate spatial probability of NHL goal scoring based on shot location data.

Usage

1
NHLmodel(x, ngibbs, burnin, p.max, inits, outfile)

Arguments

x

a dataframe, specifically, output from the function shots2model.

ngibbs

numeric, number of Gibbs samples to run the model for.

burnin

numeric, number of Gibbs samples to discard as burn-in.

p.max

numeric, tuning parameter indicating the maximum probability value at the goal (should be between 0 and 1).

inits

a dataframe containing values to initiate the Gibbs sampler (see details).

outfile

output path and filename (.RData) for storing the model results (8 objects; see details).

Details

Will be expanded later on.

Value

The function returns a dataframe with the posterior mean and variance of the model which can be used to map spatial variation in NHL goal scoring probabilities.


jedalong/nhlmodelr documentation built on May 25, 2019, 6:23 p.m.