Publications by Nomundari

final.exam

06.01.2025

#install.packages("wooldridge") #install.packages("lmtest") #install.packages("sandwich") C7.1 library(wooldridge) data("sleep75") data(sleep75) model <- lm(sleep ~ totwrk + educ + age + agesq + male , data = sleep75) summary(model) ## ## Call: ## lm(formula = sleep ~ totwrk + educ + age + agesq + male, data = sleep75) ## ## Residuals: ## M...

320 sym R (64565 sym/199 pcs) 2 img

Class exercise 11

12.12.2024

library(wooldridge) data <- wooldridge::minwage # Part (i): Find the first-order autocorrelation in gwage232 first_order_autocorr <- cor(data$gwage232[-1], data$gwage232[-nrow(data)], use = "complete.obs") cat("First-order autocorrelation:", first_order_autocorr, "\n") ## First-order autocorrelation: -0.03494393 # Part (ii): Estimate the dynamic ...

27 sym R (4590 sym/24 pcs)

Class exercise 10

05.12.2024

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 +...

24 sym R (6329 sym/21 pcs)

classwork

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) # 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)

Class exercise 8

21.11.2024

# Load the package library(wooldridge) ##Part1 # Load the MEAP00 dataset data <- wooldridge::meap00_01 library(sandwich) library(lmtest) ## Loading required package: zoo ## ## Attaching package: 'zoo' ## The following objects are masked from 'package:base': ## ## as.Date, as.Date.numeric # Estimate the OLS model ols_model <- lm(math4 ~ lunch...

21 sym R (5528 sym/18 pcs)

case7

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.98069 ...

15 sym R (6190 sym/12 pcs)

Nomundari

07.11.2024

##Part1 # Load the wooldridge package and data library(wooldridge) data("vote1") # Estimate the model with interaction term 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) ## ## Res...

15 sym R (4264 sym/12 pcs)

mid term

31.10.2024

Chapter2 C9 (i) From the data in COUNTYMURDERS, 1996, there were 1051 counties with zero murders.There were 31 counties with at least one execution. The largest number of executions was 3. ## ## Attaching package: 'dplyr' ## The following objects are masked from 'package:stats': ## ## filter, lag ## The following objects are masked from 'pack...

3701 sym Python (23095 sym/110 pcs) 4 img

112035152 Nomundari Exercise 1

24.09.2024

##BWGHT Dataset install.packages("wooldridge") ## Installing package into '/cloud/lib/x86_64-pc-linux-gnu-library/4.4' ## (as 'lib' is unspecified) library(wooldridge) #1.How many women are in the sample, and how many report smoking during pregnancy? num_women <- nrow(bwght) num_smokers <- sum(bwght$smoke == 1, na.rm = TRUE) num_women ## [1] 1388 n...

867 sym R (1823 sym/47 pcs)

Makeup_test

20.06.2024

## Loading required package: Matrix ## Loaded glmnet 4.1-8 ## [1] 14.88459 ## [1] 1.184701 ## [1] 1.23797 ## alpha mse fit.name ## 1 0.0 14.918840 alpha0 ## 2 0.1 2.256924 alpha0.1 ## 3 0.2 1.472927 alpha0.2 ## 4 0.3 1.362394 alpha0.3 ## 5 0.4 1.259794 alpha0.4 ## 6 0.5 1.252103 alpha0.5 ## 7 0.6 1.253330 alpha...

9 sym