Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I have a panel dataset (denoted as fidata ) including 5000 firms (with an identifier of ticker ), and for each firm, there are 30

I have a panel dataset (denoted as fidata) including 5000 firms (with an identifier of ticker), and for each firm, there are 30 years (time variable is denoted by year) of observations of variable X. I would like to calculate the median of the X variable of these years in each firm. Which code below can help me achieve this purpose?

a.

apply(fidata$X, median)

b.

aggregate(.~year, data=fidata, median)

c.

median(fidata$X)

d.

aggregate (.~ticker, data=fidata, median)

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_2

Step: 3

blur-text-image_3

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

Handbook Of Digital Media And Communication

Authors: Leah Lievrouw ,Brian Loader

1st Edition

036761233X, 978-0367612337

More Books

Students also viewed these Finance questions

Question

Define counteroffer and describe the effects of a counteroffer.

Answered: 1 week ago

Question

What are Electrophoresis?

Answered: 1 week ago