Create a random sample of size 1000 from the diamonds data


PLEASE HELP ME WITH SOMEONE WHO KNOWS HOW TO USE R.

Load package gcookbook and type data(diamonds) to load the data set.

1. A diamond's quality can be measured by cut, ordered by Ideal, Premium, Very Good, Good, and Fair. Create dummy D1 to represent Ideal and Premium, and D2 to represent Very Good and Good.

2. Regress price on carat, depth, table, D1 and D2, all interactions terms between dummies and quantitative variables (carat, depth and table). Interpret your result

3. Create a random sample of size 1000 from the diamonds data. Draw the scatterplot of carat vs log(price), color coded by cut.

Please explain in detail. What equations I need to input in R.

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Create a random sample of size 1000 from the diamonds data
Reference No:- TGS02889524

Expected delivery within 24 Hours