Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

stata assignment Please submit a do file and a log file that solves the three exercises below. 1. Using the dataset Kuwalt Financials.dta do the

image text in transcribed
stata assignment
Please submit a do file and a log file that solves the three exercises below. 1. Using the dataset Kuwalt Financials.dta do the following. Create a variable for the ROE ratio. Using the variable nicon for Net Income and the variable ceq for Shareholder Equity. Call it roe. Create a new variable called roe_2d. This variable should take the values of the roe variable but it is rounded to two decimal places. Summarize roe by year using the bysort command. Comment on any trends in the last 5 years of the sample. Use egen to create a new variable which equals the median value of ROE for each firm across its years. Name this new variable firm_median_roe. Use egen to create a new variable which equals the median value of ROE for each year across firms. Name this new variable year_median_soe. Use egen to create a new variable which equals the total value of nicon across all the years for each firm. Name this new variable total_nl. Create a new variable short_name which is equal to the first 10 characters of the company name represented by the string variable conm. The variable gvkey is a string variable. Generate a new variable called gvkey_num which contains a numeric format of the variable gvkey. Bring the gvkey_num variable towards the front of the dataset. Please submit a do file and a log file that solves the three exercises below. 1. Using the dataset Kuwalt Financials.dta do the following. Create a variable for the ROE ratio. Using the variable nicon for Net Income and the variable ceq for Shareholder Equity. Call it roe. Create a new variable called roe_2d. This variable should take the values of the roe variable but it is rounded to two decimal places. Summarize roe by year using the bysort command. Comment on any trends in the last 5 years of the sample. Use egen to create a new variable which equals the median value of ROE for each firm across its years. Name this new variable firm_median_roe. Use egen to create a new variable which equals the median value of ROE for each year across firms. Name this new variable year_median_soe. Use egen to create a new variable which equals the total value of nicon across all the years for each firm. Name this new variable total_nl. Create a new variable short_name which is equal to the first 10 characters of the company name represented by the string variable conm. The variable gvkey is a string variable. Generate a new variable called gvkey_num which contains a numeric format of the variable gvkey. Bring the gvkey_num variable towards the front of the dataset

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Capital And Finance

Authors: Peter Lewin, Nicolás Cachanosky

1st Edition

0367514559, 978-0367514556

More Books

Students also viewed these Finance questions