3. Generate the dataset below using STATA's command line: varl 2 4 10 var2 6 32...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
3. Generate the dataset below using STATA's command line: varl 2 4 10 var2 6 32 24 var3 10 6 4 Hint: You might want to use the help function to look at at the input command (a) Using STATA's command line, create a variable named var4 with values: 1 in row 1, 2 in row 2, and 1 in row 3. (b) Rename the variable var4 to sex, and use the label command to define value labels male for value 1, and female for value 2. (c) Use the generate command with the _n system variable to create a variable called idx that assigns a unique number to each row (d) Rename variables var1, var2, and var3 as time1, time2, and time3 (e) Use the reshape command to convert the dataset into long form by year (f) Use the egen command to generate a new variable named d that is equal to the squared difference between the variable time at each occasion and the average of time for each subject (g) Drop the observation/row corresponding to the third year for id=2 3. Generate the dataset below using STATA's command line: varl 2 4 10 var2 6 32 24 var3 10 6 4 Hint: You might want to use the help function to look at at the input command (a) Using STATA's command line, create a variable named var4 with values: 1 in row 1, 2 in row 2, and 1 in row 3. (b) Rename the variable var4 to sex, and use the label command to define value labels male for value 1, and female for value 2. (c) Use the generate command with the _n system variable to create a variable called idx that assigns a unique number to each row (d) Rename variables var1, var2, and var3 as time1, time2, and time3 (e) Use the reshape command to convert the dataset into long form by year (f) Use the egen command to generate a new variable named d that is equal to the squared difference between the variable time at each occasion and the average of time for each subject (g) Drop the observation/row corresponding to the third year for id=2 3. Generate the dataset below using STATA's command line: varl 2 4 10 var2 6 32 24 var3 10 6 4 Hint: You might want to use the help function to look at at the input command (a) Using STATA's command line, create a variable named var4 with values: 1 in row 1, 2 in row 2, and 1 in row 3. (b) Rename the variable var4 to sex, and use the label command to define value labels male for value 1, and female for value 2. (c) Use the generate command with the _n system variable to create a variable called idx that assigns a unique number to each row (d) Rename variables var1, var2, and var3 as time1, time2, and time3 (e) Use the reshape command to convert the dataset into long form by year (f) Use the egen command to generate a new variable named d that is equal to the squared difference between the variable time at each occasion and the average of time for each subject (g) Drop the observation/row corresponding to the third year for id=2
Expert Answer:
Answer rating: 100% (QA)
a Using STATAs command line create a variable named var4 with values 1 in row 1 2 in row 2 and 1 in ... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these economics questions
-
07:03 1213 < 88 0 Revisions (L8... AF5115 review... 22% 0 final assignment 5115_Final Re... Untitled (Draft) final assig... To The Hong Kong Polytechnic University 18. Calculate each number for...
-
List three specific parts of the Case Guide, Objectives and Strategy Section (See below) that you had the most difficulty understanding. Describe your current understanding of these parts. Provide...
-
Corporations with international operations need to assess the risks associated with setting up and maintaining operations in different regions of the world. Consideration of the risks include...
-
Calculate the directional derivative in the direction of v at the given point. Remember to use a unit vector in your directional derivative computation. g(x, y, z) = xe-y, v = (1, 1, 1), P = (1,2,0)
-
The City of Bainland has been undergoing financial difficulties because of a decrease in its tax base caused by corporations leaving the area. On January 1, 2013, the city has a fund balance of only...
-
Explain how the sine of an angle in the second quadrant differs from the sine of its reference angle in the unit circle.
-
If the sample size is small, the differences between the items in the matched pairs must show no evidence of strong and must contain no ______________ . In Exercises 3 and 4, fill in each blank with...
-
On June 30, 2014, Freeman Companys total current assets were $800,000 and its total current liabilities were $400,000. On July 1, 2014, Freeman issued a short-term note to a bank for $80,000 cash....
-
Assume the Oklahoma City Thunder are sold for $520 million. If there is a 35% flat tax rate, how much would a 5-year double-declining balance depreciation of the sale price save them in taxes over...
-
Alan and Angel Young are both 36 years old. Mr. Young recently accepted a new job making $93,000 a year and Mrs. Young is currently unemployed. The Youngs have two children (ages 4 and 2), a dog, and...
-
2. Diversified Product Corp has the following cost information for 2016: 2016 Raw materials inventory-beg balance Work in process inventory - beg balance Finished goods inventory - beg balance Direct...
-
AMP LTD is embroiled in a Scandal 'fees for no service' describe briefly and discuss how it will impact the company's current market position
-
What are the critical elements of clarity and precision in business writing, and how can writers avoid ambiguity? Discuss the impact of unclear communication on business operations .
-
Answer choices are the same for all parts of the question. Question 4 < > The cost C (in cents) to produce x pints of syrup can be expressed as C = f(x). In the expression f(150) = 325: What are the...
-
discuss Ada's role in facilitating risk-informed decision-making processes, including the use of quantitative risk assessment models and decision analysis techniques to prioritize risk mitigation...
-
The Engineering Department at Great Lakes Community College, a taxpayer funded institution, is considering a new Fabrication Lab (Fab Lab) on campus. The cost of designing the Fab Lab and the...
-
integrate by parts to the following equation faln(1 + r)dr
-
A handrail, which weighs 120 N and is 1.8 m long. was mounted to a wall adjacent to a small set of steps (Figure P4.26). The support at A has broken, and the rail has fallen about the loose bolt at 8...
-
Diego, age 28, married Dolores, age 27, in 2012. Their salaries for the year amounted to $46,479 and they had interest income of $3,500. Diego and Dolores' deductions for adjusted gross income...
-
Indicate, in each of the following situations, the number of exemptions the taxpayers are entitled to claim on their 2012 income tax returns. Number of Exemptions a. Donna, a 20-year-old single...
-
Steve Drake sells a rental house on January 1, 2012, and receives $130,000 cash and a note for $55,000 at 10 percent interest. The purchaser also assumes the mortgage on the property of $45,000....
-
Find the steady-state response of the hydraulic control valve shown in Fig. 4.4 (a) to the forcing functions obtained by replacing \(x(t)\) with \(F(t)\) and \(A\) with \(F_{0}\) in Figs. 1.114....
-
What is the basis for expressing the response of a system under periodic excitation as a summation of several harmonic responses?
-
True or False. The change in momentum is called impulse.
Study smarter with the SolutionInn App