Numerical Methods in R
Root Finding
- Define a root of a function \(f\).
- Explain why we might need to find roots of a function \(f\) numerically, rather than algebraically.
- Give an example of a function where we cannot, in general, find its roots algebraically.
- Use
uniroot()
to find a root of function \(f\).
- State the special case of the intermediate value theorem involving roots, and sketch a picture of why the intermediate value must be true under the hypotheses of the intermediate value theorem.
- Give a (rough) description of how the Bisection Method finds a root of a function.
- Use
uniroot()
to find where a function \(f\) takes a non-zero value.
- Use
uniroot()
to find the quantiles of a continuous random variable \(X\) given its cumulative distribution function \(F\).
Optimization
- Explain why statisticians care about optimization.
- State the 3 main methods in Base R used for numerical optimization.
- Use
optimize()
to find local minima and / or maxima of a function \(f\) of a scalar variable \(x\).
- Give a (rough) description of how successive parabolic interpolation can be used to find local optima of a function \(f\).
- Use
Vectorize()
to vectorize a function in terms of one or more of its arguments.
- Use
curve()
to find a reasonable starting value for the interval
argument of optimize()
.