Learn R Programming

tswge (version 2.1.0)

slr.wge: Simple Linear Regression

Description

Uses Base R routine lm to simplify call for SLR where independent variable is automatocally t=1:n

Usage

slr.wge(x)

Value

res

Residuals

b0hat

Estimate b0 in model y=b0+b1*t+Z

b1hat

Estimate b1

pvalue

pvalue for test:slope=0

tstatistic

tstatistic associated with test:slope=0

Arguments

x

The TVF data set

Author

Wayne Woodward

References

Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott

Examples

Run this code
x=gen.arma.wge(n=100,phi=.96,sn=10)
                   y=slr.wge(x)

Run the code above in your browser using DataLab