我正在尝试将r降价编织为pdf,但出现错误消息(与包含“ require(wooldridge)”的行有关):
Error in eval(predvars, data, env) : object 'Prc' not found calls:
<Anonymous> ... eval -> <Anonymous> -> model.frame.default -> eval
-> eval Execution halted
与我的错误消息相关的代码是:
---
title: "Assignment 2"
output:
html_document:
df_print: paged
word_document: default
pdf_document: default
---
```{r}
setwd("~/Desktop/Eco I/Assignment 2")
RealEstate<-read.table("RealEstate.csv", header=TRUE)
koop2004<-read.table("koop2004.csv", header=TRUE)
```
```{r}
require(wooldridge)
summary(RealEstate)
# model estimation
model_estimation <- summary(lm(Prc ~ LndSz + HseSz + Bdrms, data =
RealEstate))
```
我不知道问题出在哪里,因为我的变量Prc位于我用于计算的导入数据集中。