diffp: Eliminate autocorrelation

Description Usage Arguments Value Author(s) See Also Examples

View source: R/diffp.R

Description

diffp is used to eliminate the residual sequence of the existence of self related problems,the method used is Durbin-Watson Test.

Usage

1
diffp(x, y, method, model)

Arguments

x

independent variable, which can be a data frame or a matrix.

y

dependent variable, which can be a data frame or a matrix.

method

can choose iterative method or difference method .

model

is a regresstion model,use lm method. And additional arguments to be passed to the dwtest function.So before use to load the dwtest package in the lmtest function.

Value

Xdt,Ydt

a data.frame for method itear

Xcf,Ycf

a data.frame for method diff

Author(s)

Jinquan Lin

See Also

dwtest

Examples

1
2
3
4
5
6
##---

data(table413)
lm413<-lm(y~x1+x2,data=table413) 
diffp(x=table413[-1],y=table413[1],method="itera",model=lm413)
diffp(x=table413[-1],y=table413[1],method="diff",model=lm413)

jinimp/zhbit7 documentation built on May 19, 2019, 10:36 a.m.