使用HT方法时的R错误

使用HT方法时的R错误,r,error-handling,plm,R,Error Handling,Plm,我正在使用贸易数据,研究出口模型。我想使用HT方法,但它给了我这个错误。我已经读过了,但似乎无法解决它 R <- pht(pdata$LnExport ~ pdata$LnGDP_L + pdata$capp + pdata$NRr + pdata$Index2 + pdata$EFI + pdata$lldpc| pdata$lldpc, data=pdata, model = "ht", na.action = FALSE) Error in model.frame.defaul

我正在使用贸易数据,研究出口模型。我想使用HT方法,但它给了我这个错误。我已经读过了,但似乎无法解决它

R <- pht(pdata$LnExport ~ pdata$LnGDP_L + pdata$capp + pdata$NRr + pdata$Index2 + pdata$EFI + pdata$lldpc| pdata$lldpc, data=pdata, model = "ht", na.action = FALSE) 
  Error in model.frame.default(terms(formula, lhs = lhs, rhs = rhs, data = data,  : 
    attempt to apply non-function
summary(R)

R您不需要在公式中引用
pdata$
,它将在
data=pdata
的环境中进行计算。还有|指的是什么?通常我使用+、-、:、*和^。
|
用于包装
公式
中的多部分公式。