Exercise

# Computing Wald statistic

In the previous exercise you fitted a model with `width`

variable and assessed the relationship of the explanatory and response variable. In this exercise you will assess the significance of the `width`

variable by computing the Wald statistic.

Also note that in the model summary the Wald statistic is presented by the letter `z`

which means that the value of a statistic follows a standard normal distribution. Recall the formula for the Wald statistic:

$$ z=\frac{\hat\beta}{SE} $$

where \(\hat\beta\) is the estimated coefficient and \(SE\) its standard error.

The fitted model `crab_GLM`

and `crab`

dataset have been preloaded in the workspace.

Instructions

**100 XP**

- Using
`.params`

extract and print model coefficients and save as intercept and slope. - Save and print covariance matrix as
`crab_cov`

. - Compute and print the standard error
`std_error`

by extracting the relevant element using the covariance matrix. - Compute and print the Wald statistic.