I need an R programmer to write a function for me
Budget: $10 – $30 USD
Write a function that given two glm models returns the p-value of the deviance test. (Hint:
You will need to calculate the degrees of freedom inside the function. The function needs to be
self-contained. Use the help command to see what output is supplied for you from glm.) Print the
function and run your function on the Gamma model above comparing the null model to the
model with all of the variables showing the command and its output. The command should be
one line with two arguments: deviance.test(null.model, fitted.model)where you have
defined the fitted.model and the null.model above in #1.
You will need to calculate the degrees of freedom inside the function. The function needs to be
self-contained. Use the help command to see what output is supplied for you from glm.) Print the
function and run your function on the Gamma model above comparing the null model to the
model with all of the variables showing the command and its output. The command should be
one line with two arguments: deviance.test(null.model, fitted.model)where you have
defined the fitted.model and the null.model above in #1.