首页 > 编程知识 正文

面板数据的估计,数据挖掘r语言实现

时间:2023-05-04 21:23:15 阅读:229725 作者:4434

> ###面板数据回归模型(模型估计,参数检验)####变截距模型

> library(plm)

> library(foreign)

> exam

Error in file(file, "rt") : cannot open the connection

In addition: Warning message:

In file(file, "rt") :

cannot open file 'D:/R2.10/exam.txt': No such file or directory

> list(exam)

Error: object 'exam' not found

> head(exam)

Error in head(exam) : object 'exam' not found

> E

Error in inherits(x, "pdata.frame") : object 'exam' not found

> head(E)

Error in head(E) : object 'E' not found

> pest

Error in inherits(data, "pdata.frame") : object 'E' not found

> summary(pest)

Error in summary(pest) :

error in evaluating the argument 'object' in selecting a method for function 'summary': Error: object 'pest' not found

>

> ifest

Error in inherits(data, "pdata.frame") : object 'E' not found

> summary(ifest)

Error in summary(ifest) :

error in evaluating the argument 'object' in selecting a method for function 'summary': Error: object 'ifest' not found

> fixef(ifest)  ##固定效应模型个体效应截距

Error in fixef(ifest) : object 'ifest' not found

> summary(fixef(ifest))

Error in summary(fixef(ifest)) :

error in evaluating the argument 'object' in selecting a method for function 'summary': Error in fixef(ifest) : object 'ifest' not found

>

> tfest

Error in inherits(data, "pdata.frame") : object 'E' not found

> summary(tfest)

Error in summary(tfest) :

error in evaluating the argument 'object' in selecting a method for function 'summary': Error: object 'tfest' not found

> fixef(tfest)  ##固定效应模型时间效应截距

Error in fixef(tfest) : object 'tfest' not found

>

> itfest

Error in inherits(data, "pdata.frame") : object 'E' not found

> summary(itfest)

Error in summary(itfest) :

error in evaluating the argument 'object' in selecting a method for function 'summary': Error: object 'itfest' not found

> fixef(itfest,effect=c("time"))

Error in fixef(itfest, effect = c("time")) : object 'itfest' not found

> fixef(itfest,effect=c("individual"))

Error in fixef(itfest, effect = c("individual")) :

object 'itfest' not found

>

> pmodel.response(ifest)  ##计算相应变量的值

Error in pmodel.response(ifest) : object 'ifest' not found

>

> irest

Error in inherits(data, "pdata.frame") : object 'exam' not found

> summary(irest)

Error in summary(irest) :

error in evaluating the argument 'object' in selecting a method for function 'summary': Error: object 'irest' not found

>

> trest

Error in inherits(data, "pdata.frame") : object 'exam' not found

> summary(trest)

Error in summary(trest) :

error in evaluating the argument 'object' in selecting a method for function 'summary': Error: object 'trest' not found

>

> itrest

Error in inherits(data, "pdata.frame") : object 'exam' not found

> summary(itrest)

Error in summary(itrest) :

error in evaluating the argument 'object' in selecting a method for function 'summary': Error: object 'itrest' not found

>

> phtest(itfest,itrest)  ##hausman检验 零假设为个体效应和解释变量不相关,固定效应和随机效应都是一致的,但是随机效应更有效

Error in phtest(itfest, itrest) : object 'itfest' not found

>

> pooltest(pest,itfest)  ##chow邹至庄检验 零假设为固定效应模型和混合回归模型无差别,也可用于变系数模型和混合回归模型的检验

Error in pooltest(pest, itfest) : object 'pest' not found

> pooltest(pest,ifest)   ##chow邹至庄检验 零假设为固定效应模型和混合回归模型无差别,也可用于变系数模型和混合回归模型的检验

Error in pooltest(pest, ifest) : object 'pest' not found

> pooltest(pest,tfest)   ##chow邹至庄检验 零假设为固定效应模型和混合回归模型无差别,也可用于变系数模型和混合回归模型的检验

Error in pooltest(pest, tfest) : object 'pest' not found

>

> plmtest(pest)

Error in plmtest(pest) : object 'pest' not found

> plmtest(pest,effect="time")

Error in plmtest(pest, effect = "time") : object 'pest' not found

> plmtest(pest,effect="individual")

Error in plmtest(pest, effect = "individual") : object 'pest' not found

> plmtest(pest,effect="twoways",type="bp")  ##lagrange multiplier test 如果type="bp"则为bp检验,后面还可以加honda,ghm,kw都是用于检验混合回归模型对随机影响面板数据模型,零假设为可以使用混合回归模型估计

Error in plmtest(pest, effect = "twoways", type = "bp") :

object 'pest' not found

>

> plmtest(pest,effect=c("individual"),model=c("random"))

Error in plmtest(pest, effect = c("individual"), model = c("random")) :

object 'pest' not found

>

> pFtest(pest,itfest)  ##检验混合回归模型对个体效应模型,零假设为混合回归模型

Error in pFtest(pest, itfest) : object 'pest' not found

>

> pwtest(pest)  ##axdlr半参数检验,主要用于检验不可观测因素的影响,零假设为不存在不可观测因素(依赖较大的N渐进性)或者组内不存在相关性,它在存在误差异方差和偏离正态性的时候有效

Error in pwtest(pest) : object 'pest' not found

>

> pbltest(cp~ip,data=exam)

Error in terms.formula(object, data = data) : object 'exam' not found

> pbgtest(irest)

Error in pbgtest(irest) : object 'irest' not found

>

> ###面板数据回归模型(模型估计,参数检验)####变系数模型

>

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。