Learn R Programming

asbio (version 0.2-1)

ls.plot: Plot of least squares function.

Description

Depicts the process of least squares estimation by ploting the least squares function with respect to a vector of estimate possibilities.

Usage

ls.plot(X, possibilities, parameter = "mu", est.lty = 2, est.col = 2, ...)

Arguments

X
A numericeric veector containing sample data.
possibilities
An ordered numeric sequence of possible parameter estimates. Inclusion of the least squares estimate in the vector (e.g. $bar{X}$ for $mu$ will cause the least squares function be minimized at this value.
parameter
Parameter to be estimated. Only estimation for E(X) is currently implemented. Note that if X ~ N($mu$,$sigma^2$) that E(X) = $mu$.
est.lty
Line type to be used to indicate the least squares estimate.
est.col
Line color to be used to indicate the least squares estimate.
...
Additional arguments to plot

Value

  • A plot of the least squares function is reurned along with the least squares estimate for E(X) given a set of possibilities.

See Also

loglik.plot

Examples

Run this code
X<-c(11.2,10.8,9.0,12.4,12.1,10.3,10.4,10.6,9.3,11.8)
possibilities<-seq(8,14,.01)
ls.plot(X,possibilities, xlab=expression(paste("Estimates for ", mu)))

Run the code above in your browser using DataLab