Publications by Budkhand

Final exam

06.01.2025

CHAPTER 7 question 1 library(wooldridge) library(car) ## Loading required package: carData data("sleep75") sleep_model <- lm(sleep ~ totwrk + educ + age + I(age^2) + male, data = sleep75) summary(sleep_model) ## ## Call: ## lm(formula = sleep ~ totwrk + educ + age + I(age^2) + male, data = sleep75) ## ## Residuals: ## Min 1Q Median...

1667 sym R (54150 sym/241 pcs) 2 img

in-class exercise 11

12.12.2024

library(wooldridge) data("minwage") # Create a lagged variable for gwage232 minwage$lag_gwage232 <- lag(minwage$gwage232) # (i) filtered_data <- minwage[complete.cases(minwage$gwage232, minwage$lag_gwage232), ] acf(filtered_data$gwage232, lag.max = 1) # (ii) model1 <- lm(gwage232 ~ lag_gwage232 + gmwage + gcpi, data = filtered_data) summary(m...

17 sym R (2608 sym/13 pcs) 1 img

exercise ch10

05.12.2024

C2 # Load the dataset library(wooldridge) data("barium") # (i) barium$time_trend <- 1:nrow(barium) model_i <- lm(lchnimp ~ time_trend + lgas + lrtwex + befile6 + affile6 + afdec6, data = barium) summary(model_i) ## ## Call: ## lm(formula = lchnimp ~ time_trend + lgas + lrtwex + befile6 + ## affile6 + afdec6, data = barium) ## ## Residuals: ...

31 sym R (4462 sym/18 pcs)

exercise ch9

28.11.2024

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) data("jtrain") jtrain_1988 <- subset(jtrain, year == 1988) # (i) # Model: log(scrap) = beta_0 + beta_1 * grant + u model1 <- lm(log(scr...

29 sym R (3761 sym/26 pcs)

exercise ch8

21.11.2024

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) data("meap00_01") # (i) ols_model <- lm(math4 ~ lunch + log(enroll) + log(exppp), data = meap00_01) summary(ols_model) ## ## Call: ##...

18 sym R (3516 sym/15 pcs)

In-class exercise 7

14.11.2024

library(wooldridge) data("wage2") # (i) model1 <- lm(log(wage) ~ educ + exper + tenure + married + black + south + urban, data = wage2) summary(model1) ## ## Call: ## lm(formula = log(wage) ~ educ + exper + tenure + married + black + ## south + urban, data = wage2) ## ## Residuals: ## Min 1Q Median 3Q Max ## -1.9806...

13 sym R (5391 sym/10 pcs)

In-class exercise ch6

07.11.2024

library(wooldridge) data("vote1") #(i) model <- lm(voteA ~ prtystrA + expendA + expendB + I(expendA * expendB), data = vote1) summary(model) ## ## Call: ## lm(formula = voteA ~ prtystrA + expendA + expendB + I(expendA * ## expendB), data = vote1) ## ## Residuals: ## Min 1Q Median 3Q Max ## -28.9999 -8.7632 -0.1726...

19 sym R (4075 sym/16 pcs)

Midterm exam

01.11.2024

CHAPTER 2 question C9 library(wooldridge) data("countymurders", package = "wooldridge") dataset_1996 <- subset(countymurders, year == 1996) #(i) zero_murders_count <- sum(dataset_1996$murders == 0) cat("Counties with zero murders:", zero_murders_count, "\n") ## Counties with zero murders: 1051 at_least_one_execution <- sum(dataset_1996$execs > 0)...

297 sym R (27785 sym/134 pcs) 3 img

in-class exercise ch4

24.10.2024

library(wooldridge) data <- wooldridge::discrim # (i) model1 <- lm(log(psoda) ~ prpblck + log(income) + prppov, data = data) summary(model1) ## ## Call: ## lm(formula = log(psoda) ~ prpblck + log(income) + prppov, data = data) ## ## Residuals: ## Min 1Q Median 3Q Max ## -0.32218 -0.04648 0.00651 0.04272 0.35622 ## #...

25 sym R (3409 sym/22 pcs)

in-class exercise 1

17.10.2024

library(wooldridge) data("wage2") # (i) Simple regression of IQ on educ reg1 <- lm(IQ ~ educ, data = wage2) summary(reg1) ## ## Call: ## lm(formula = IQ ~ educ, data = wage2) ## ## Residuals: ## Min 1Q Median 3Q Max ## -50.228 -7.262 0.907 8.772 37.373 ## ## Coefficients: ## Estimate Std. Error t value Pr(...

19 sym R (2751 sym/16 pcs)