Question: R coding -- Predicting Software Reselling Profits using Linear Regression Sample of the tayko.csv Tayko Software is a software catalog firm that sells games and

R coding -- Predicting Software Reselling Profits using Linear Regression

R coding -- Predicting Software Reselling Profits

R coding -- Predicting Software Reselling Profits

Sample of the tayko.csv

R coding -- Predicting Software Reselling Profits

Tayko Software is a software catalog firm that sells games and educational software. It started out as a software manufacturer and then added third-party titles to its offerings. It recently revised its collection of items in a new catalog, which it mailed out to its customers. This mailing yielded 2000 purchases. Based on these data, Tayko wants to devise a linear regression model for predicting the spending amount that a purchasing customer will yield. The file tayko.csv contains information on 2000 purchases. The description of the variables is given below Variable | freq last_update web Description Number of transactions in the preceding year Number of days since last update to customer record 1 if customer purchased by web order at least once, 0 otherwise 1 if customer is male, 0 otherwise 1 if it is a residential address, 0 otherwise 1 if it is a US address, 0 otherwise Amount spending by customer in test mailing (dollars) gender address_res address_us Spending (response) a) Partition the data into training (80%) and validation (20%) sets. Run a linear regression on the training data. Report all the accuracy measures for the validation data. (5pt) (Instruction: Set seed to 30) b) Run LOOCV and K-Fold Cross Validation with K = 10. Report the mean and standard deviation of RMSE measure for both the cross-validation techniques. Compare (smaller or larger etc.) the measures. (20pt) freq gender 1 1 0 0 0 0 O O O O 0 address_res address_us spending 0 1 1 128 1 0 1 o 0 0 1 127 1 0 1 0 0 0 1 0 1 1 0 0 1 1 1 0 1 1 0 1 489 0 0 1 174 1 0 1 0 0 1 1 0 1 0 1 0 1 0 1 1416 0 1 0 192 0 1 last_update web 2 3662 0 2900 2 3883 1 829 1 869 1 1995 2 1498 1 3397 4 525 1 3215 0 734 2 1275 1 2802 5 2081 1 1465 1 2523 2 1801 0 3694 2 1879 0 0 0 1 0 0 1 0 0 0 0 1 0 1 1 0 1 0 0 0 0 130 1 1 1 1 0 3120 0 1 0 0 2 1 0 0 1 1 1 386 161 2 0 1 0 1 0 0 1 1 2 0 0 1 1 0 174 131 1 1 0 1 1 0 0 1 189 0 0 1 0 3 1 0 0 1 2 0 2 1 o od 0 1 2943 1928 310 1463 3613 2460 3394 1569 3299 3744 3090 2947 2123 2905 2005 1158 2478 1058 1774 3694 0 1 1 1 1 0 0 0 0 1 0 1 0 0 0 0 0 0 1 1 0 0 0 1 1 1 1 1 0 0 0 90 354 0 352 0 0 0 0 185 0 1 0 0 0 1 1 0 2 1 1 0 0 0 0 1 0 1 o o O oo 0 1 Tayko Software is a software catalog firm that sells games and educational software. It started out as a software manufacturer and then added third-party titles to its offerings. It recently revised its collection of items in a new catalog, which it mailed out to its customers. This mailing yielded 2000 purchases. Based on these data, Tayko wants to devise a linear regression model for predicting the spending amount that a purchasing customer will yield. The file tayko.csv contains information on 2000 purchases. The description of the variables is given below Variable | freq last_update web Description Number of transactions in the preceding year Number of days since last update to customer record 1 if customer purchased by web order at least once, 0 otherwise 1 if customer is male, 0 otherwise 1 if it is a residential address, 0 otherwise 1 if it is a US address, 0 otherwise Amount spending by customer in test mailing (dollars) gender address_res address_us Spending (response) a) Partition the data into training (80%) and validation (20%) sets. Run a linear regression on the training data. Report all the accuracy measures for the validation data. (5pt) (Instruction: Set seed to 30) b) Run LOOCV and K-Fold Cross Validation with K = 10. Report the mean and standard deviation of RMSE measure for both the cross-validation techniques. Compare (smaller or larger etc.) the measures. (20pt) freq gender 1 1 0 0 0 0 O O O O 0 address_res address_us spending 0 1 1 128 1 0 1 o 0 0 1 127 1 0 1 0 0 0 1 0 1 1 0 0 1 1 1 0 1 1 0 1 489 0 0 1 174 1 0 1 0 0 1 1 0 1 0 1 0 1 0 1 1416 0 1 0 192 0 1 last_update web 2 3662 0 2900 2 3883 1 829 1 869 1 1995 2 1498 1 3397 4 525 1 3215 0 734 2 1275 1 2802 5 2081 1 1465 1 2523 2 1801 0 3694 2 1879 0 0 0 1 0 0 1 0 0 0 0 1 0 1 1 0 1 0 0 0 0 130 1 1 1 1 0 3120 0 1 0 0 2 1 0 0 1 1 1 386 161 2 0 1 0 1 0 0 1 1 2 0 0 1 1 0 174 131 1 1 0 1 1 0 0 1 189 0 0 1 0 3 1 0 0 1 2 0 2 1 o od 0 1 2943 1928 310 1463 3613 2460 3394 1569 3299 3744 3090 2947 2123 2905 2005 1158 2478 1058 1774 3694 0 1 1 1 1 0 0 0 0 1 0 1 0 0 0 0 0 0 1 1 0 0 0 1 1 1 1 1 0 0 0 90 354 0 352 0 0 0 0 185 0 1 0 0 0 1 1 0 2 1 1 0 0 0 0 1 0 1 o o O oo 0 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!