通过微分方程计算OLS估计量

时间:2018-10-16 20:14:35

标签: r

我需要通过微分方程来计算OLS估计量。 但是,我无法在R中转换方程式。 我正在使用lm()函数对方程建模。

Youll find the equation in the image

The correct OLS which I need to obtain

R代码:

library(data.table)
library(sandwich) 
library(lmtest) 
library(DBI)
library(RSQLite)
library(tidyverse)
library(ggplot2)
library(plm)
library(margins)
con <- SQLite() %>% dbConnect('wooldridge.db')
rental <- con %>% dbReadTable('rentak') %>% data.table
rental <- con %>% dbReadTable('rental') %>% data.table

#The translated equation written by me which supposedly is giving the wrong answers upon running summary 

fit <- lm(diff(lrent)~diff(lpop)+diff(lavginc)+diff(pctstu),data=rental) %>% 
summary(fit)

我希望对此进行一些澄清。

0 个答案:

没有答案