其中:
Proviece有4各省;
Year从2003年到2015年;
LNGDP为GDP取对数;
LNK为物质资本取对数;
LNL为人力资本存量取对数;
Lev为杠杆率水平
目的:计算lev的门槛值
实现代码如下:
- library(pdR)
- library(plm)
- pdata=plm.data(data)
- output=ptm(
- dep=as.matrix(pdata[,3],ncol=1),
- ind1=as.matrix(pdata[,4],ncol=1),
- ind2=as.matrix(pdata[,5],ncol=1),
- d=as.matrix(pdata[,6],ncol=1),
- bootn=c(10,20),
- trimn=c(0.05,0.05),
- qn=10,
- conf_lev=0.95,
- t=13,
- n=4)
- output[[1]]
- output[[2]]
- output[[3]]
可是老是提示错误,具体如下:
Error in dimnames(x) <- dn :
length of 'dimnames' [2] not equal to array extent
> output[[1]
Error: object Error: object 'output' not found
请教下各位大神,具体问题出在哪里?不胜感激!