Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Econ 128 MT1

Feb 16, 2023

The data in imputation_test.csv consists of data on household electricity consumption.

The variables are as follows:

-      hh-id: unique household id

-      year: 2010 and 2011

-      month: 4-8

-      zipcode: anonymized zipcode in which home is located

-      mozip: location variable derived from the interaction of zipcode with year and month. proxies for local humidity/temperature

-      lusage: log(kwh) log of monthly electricity consumption

-      lusage1-6: log(kwh) for April - September of 2009 (ie pre-sample period)

-      children: household has children

-      hhsize2-5plus: household size

-      income2-9: income categories <$20k, $20-30k, $30-40k, $40-50k, $50-75k, $75- 100k, $100- 125k, >$125k

-      owner: resident owns home

-     size: size of the residence (in sqft)

Objective:

The aim of this mini-project is to develop a machine learning project to impute the missing values of one variable (size) based on the other data available.

1. [2pts] Summarize and describe the data. Note any features that you think are worth mentioning. Are there any features of the data that need to be addressed?

2. [2pts] Clean the data. You are free to make your own decisions on which variables to drop, replace, whether to use the full data or not etc.

3. [2pts] Do you need to apply any data transformations? For example reshaping the data, changing variable types, transforming variables (eg. log), creating interactions between variables etc.

4. [2pts] Impute the missing values of size.

5. [2pts] Measure the quality of the imputation. You can use any metric you think is appropriate.

Use only one R file (Jupyter is ok if you are using it). Write all answers as comments in the R  file. The file should run using the csv file provides as the only input. You can use any package you want and can use methods that were not explicitly discussed in class as long as they fall under the heading of “machine learning” . Email the file to harding1@uci.edu at the end of the class.