Question: Upload your do file and log file to Canvas by 1 1 : 5 9 pm on January 3 0 th . 1 . load
Upload your do file and log file to Canvas by :pm on January th
load auto.dta, an example dataset installed with Stata
use a log file PSlog to record all commands and related outputs
list variables that have the storage type of int
rename vairable "weight" to lbs rename variable "foreign" to "origin"
change the display format of "gearratio" such that only one decimal place is displayed
create a variable "brand" containing the brand name part of "make" ie characters before the st space in "make"
assign value label to variable "rep in the following way:
label name: repairstatus
item: "Poor"
"Fair"
"Average"
"Good"
"Excellent"
add a new observation with the following values for four variables
make: "Toyota Rav mpg: price: lbs: origin:
rearrange observations in alphabetical order based on the characters of "make"
relocate the variables "make" and "price" to the beginning of the dataset
shift the variable lbs after mpg
create a binary varaible "abovek which takes a value of one if the car price is greater than
rearrange observations in descending order based on the value of "price"
create a variable "diffprice" containing the difference between the average price of foreign cars and the average price of domestic cars
display the number of observations with the value of mpg being greater than
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
