Publications by Leo Tzang
Final Exam - 112035134
Chapter 7 Question 1 library(dplyr) ## ## Attaching package: 'dplyr' ## The following objects are masked from 'package:stats': ## ## filter, lag ## The following objects are masked from 'package:base': ## ## intersect, setdiff, setequal, union library(wooldridge) library(car) ## Loading required package: carData ## ## Attaching package...
4960 sym R (62351 sym/272 pcs) 2 img
Document
Chapter7 1 library(dplyr) ## ## Attaching package: 'dplyr' ## The following objects are masked from 'package:stats': ## ## filter, lag ## The following objects are masked from 'package:base': ## ## intersect, setdiff, setequal, union set.seed(123) n <- 706 SLEEP75 <- data.frame( sleep = rnorm(n, mean = 3500, sd = 300), # Total minutes...
427 sym R (59524 sym/265 pcs) 1 img
In class exercise ch11
library(wooldridge) library(dplyr) ## ## Attaching package: 'dplyr' ## The following objects are masked from 'package:stats': ## ## filter, lag ## The following objects are masked from 'package:base': ## ## intersect, setdiff, setequal, union library(stargazer) ## ## Please cite as: ## Hlavac, Marek (2022). stargazer: Well-Form...
23 sym R (3264 sym/19 pcs) 1 img
Document
library(wooldridge) library(lmtest) ## Loading required package: zoo ## ## Attaching package: 'zoo' ## The following objects are masked from 'package:base': ## ## as.Date, as.Date.numeric data("minwage") # Create lagged variables minwage$gwage232_1 <- c(NA, minwage$gwage232[-length(minwage$gwage232)]) minwage$gemp232_1 <- c(NA, minwage$gemp2...
19 sym R (5278 sym/16 pcs)
Document
##C2 # Load necessary libraries library(wooldridge) library(lmtest) ## Loading required package: zoo ## ## Attaching package: 'zoo' ## The following objects are masked from 'package:base': ## ## as.Date, as.Date.numeric # Load the data data("barium") # (i) Add a linear time trend to equation 10.22 barium$trend <- seq_along(barium$chnimp) mod...
25 sym R (11895 sym/13 pcs)
Munkhzul_In class ch10
library(wooldridge) ## Warning: package 'wooldridge' was built under R version 4.4.1 data("barium") # (C2 Part (i)) barium$trend <- barium$t # Use the variable 't' as the linear time trend model1 <- lm(log(chnimp) ~ trend + log(chempi) + log(gas) + log(rtwex), data = barium) summary(model1) ## ## Call: ## lm(formula = log(chnimp) ~ trend...
22 sym R (10965 sym/19 pcs)
classwork
library(wooldridge) library(lmtest) ## Loading required package: zoo ## ## Attaching package: 'zoo' ## The following objects are masked from 'package:base': ## ## as.Date, as.Date.numeric library(sandwich) # Load and Subset Data for the Year 1988 data("jtrain", package = "wooldridge") jtrain_1988 <- subset(jtrain, year == 1988) # Check for ...
31 sym R (4423 sym/28 pcs)
Document
# Load the JTRAIN dataset library(wooldridge) data("jtrain") # Filter for the year 1988 jtrain_1988 <- jtrain[jtrain$year == 1988, ] # (ii) Estimate the simple regression model for 1988 model1 <- lm(log(scrap) ~ grant, data = jtrain_1988) summary(model1) ## ## Call: ## lm(formula = log(scrap) ~ grant, data = jtrain_1988) ## ## Residuals: ## ...
39 sym R (4392 sym/36 pcs)
Document
# Load required libraries library(wooldridge) library(lmtest) ## Loading required package: zoo ## ## Attaching package: 'zoo' ## The following objects are masked from 'package:base': ## ## as.Date, as.Date.numeric library(sandwich) # Load the meap00 dataset data(meap00_01) # (i) Estimate the model model <- lm(math4 ~ lunch + log(enroll) + l...
27 sym R (3502 sym/24 pcs)
Document
# Load required libraries library(wooldridge) library(lmtest) ## Loading required package: zoo ## ## Attaching package: 'zoo' ## The following objects are masked from 'package:base': ## ## as.Date, as.Date.numeric library(car) ## Loading required package: carData # Load the data data(wage2) —- Part (i): Original Model —-...
222 sym R (8108 sym/60 pcs)