Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part 1: RKO Movie Earnings and Costs Dataset: rko_film_19301941.dat Source: J. Sedgwick (1994). Richard B. Jewell's RKO Film Grosses, 1929-1951:The C.J. Trevlin Ledger: A Comment,

Part 1: RKO Movie Earnings and Costs

Dataset: rko_film_19301941.dat

Source: J. Sedgwick (1994). "Richard B. Jewell's RKO Film Grosses, 1929-1951:The C.J. Trevlin Ledger: A Comment", Historical Journal of Film, Radio &Television, Vol.14, Issue 1, p. 51

Description: Costs and Earnings of 155 RKO movies from 1930-1941.

Variables/Columns

Film 1-25

Re-release dummy 33 /* 1=Re-release, 0 if not

Production costs ($1000s) 36-41

Domestic Revenue ($1000s) 44-49

Foreign Revenue ($1000s) 53-57

Total Revenue ($1000s) 61-65

Profits ($1000s) 68-73

Distribution Cost($1000s) 76-81

Dist Cost/Revenue 83-88

Dist Cost/Prod Cost 91-97

Year 100-104

100*Profit/(Prod+dist cost) 106-111

A study reported various costs and revenues for movies released by RKO during the years 1930-1941. Fit linear regression models relating Total Revenue to Total Cost (Distribution + Production) by completing the following parts.

p.1.a. Fit a simple linear regression model based on ordinary least squares. Give the fitted equation, estimated standard errors, and the estimate ofs

p.1.b. Plot the residuals, absolute residuals, and squared residuals versus the fitted values

p.1.c. Obtain the correlations between the absolute residuals and fitted values and squared residuals and fitted values

p.1.d. Obtain the Weighted Least Squares estimatorbWin matrix form (iteratively) based on the model that the standard deviation ofe is proportional to the mean. Give the point estimates and standard errors of the regression coefficients.

p.1.e. Using theglsfunction in thenlmepackage to obtain the generalized least squares estimates using the power relation:: Give the estimates of a, d

p.1.f. Compare the slope estimate and their standard error for Ordinary and Generalized Least Squares.

R Program to Read Data

rko.dat <- read.csv("https://www.stat.ufl.edu/~winner/data/rko_film_19301941.csv") attach(rko.dat); names(rko.dat)

totCost <- distCost+prodCost

EXAMPLE

R code

nflcomb <- read.csv("http://www.stat.ufl.edu/~winner/sta4210/mydata/nfl_combine.csv", header=TRUE) attach(nflcomb); names(nflcomb)

#### Matrix form (using lm for |e|,y-hat regressions) ###########

n <- length(Weight) X0 <- rep(1,n) X <- as.matrix(cbind(X0,Height,ArmLng,HandLng)) Y <- as.matrix(Weight) p <- ncol(X)

#### Fit original regression, and regress functions of |e| on Y-hat

b.ols <- solve(t(X) %*% X) %*% t(X) %*% Y # b=(X'X)^(-1)X'Y mse.o <- (t(Y-X%*%b.ols) %*% (Y-X%*%b.ols))/(n-p) # MSE=(Y-Xb)"(Y-Xb)/(n-p) s2.b.ols <- mse.o[1,1]*solve(t(X) %*% X) # s2{b}=MSE*(X'X)^(-1) s.b.ols <- sqrt(diag(s2.b.ols)) # s{b}=sqrt(diag(b}} t.b.ols <- b.ols/s.b.ols # t=b/s{b} p.b.ols <- 2*(1-pt(abs(t.b.ols), n-p)) # P-value

ols.out <- cbind(b.ols, s.b.ols, t.b.ols, p.b.ols) colnames(ols.out) <- c("b_ols", "Std. Error", "t*", "P(>|t*|)") rownames(ols.out) <- c("Intercept", "Height", "Arm Length", "Hand Length")

#### Plot 1) |e| vs Y-hat 2) e^2 vs Y-hat 3) sqrt(|e|) vs Y-hat yhat.ols <- X %*% b.ols e.ols <- Y - yhat.ols

par(mfrow=c(1,3)) plot(abs(e.ols) ~ yhat.ols, pch=16) abline(lm(abs(e.ols) ~ yhat.ols)) plot(e.ols^2 ~ yhat.ols, pch=16) abline(lm(e.ols^2 ~ yhat.ols)) plot(sqrt(abs(e.ols)) ~ yhat.ols, pch=16) abline(lm(sqrt(abs(e.ols)) ~ yhat.ols))

cor(abs(e.ols) , yhat.ols) cor(e.ols^2 , yhat.ols) cor(sqrt(abs(e.ols)) , yhat.ols) # Highest correlation for sqrt(|e|) with Y-hat

# Fit regression of sqrt(|e|) on Y-hat e.reg.ols <- lm(sqrt(abs(e.ols)) ~ yhat.ols) summary(e.reg.ols) s.ols <- predict(e.reg.ols) # Predicted sqrt(|e|) w.ols <- 1/s.ols^4 # WLS weights= 1/s^2 = 1/sqrt(|e|)^4

## Begin iterations to obtain WLS estimator b_w b.old <- b.ols # Start iterations with OLS estimator wm.old <- as.matrix(diag(w.ols)) # W = diagonal matrix with w_i=1/s_i^2 b.diff <- 100 # Set high starting difference num.iter <- 0 # Counter for number of iterations

# Keep iterating until (b_new-b_old)'(b_new-b_old) < .00001 while (b.diff > 0.00001) { num.iter <- num.iter+1 # Increment number of iterations # b_new = (X'WX)^(-1)X'WY b.new <- solve(t(X) %*% wm.old %*% X) %*% t(X) %*% wm.old %*% Y yhat.new <- X %*% b.new # Yhat_new = Xb_new abs.e.new <- abs(Y - yhat.new) # new |e| = Y-Yhat_new # Create new weight matrix from regression of sqrt(|e_new|) on yhat_new wm.new <- as.matrix(diag(1/predict(lm(sqrt(abs.e.new)~yhat.new))^4)) b.diff <- sum((b.new-b.old)^2) # sum of squared differences of b_new,b_old b.old <- b.new # b.old is assigned b.new wm.old <- wm.new # Old weight matrix is assigned new weight matrix }

# End of loop num.iter # Number of iterations needed

# Apply wm.new to get b.new (probably not necessary) b.new <- solve(t(X) %*% wm.new %*% X) %*% t(X) %*% wm.new %*% Y b.wls <- b.new # Obtain b.wls as result from iterative process wm.wls <- wm.new # Obtain WLS matrix from iterative process

## MSE_wls = (Y-Xb-w)'W(Y-Xb_w) mse.w <- (t(Y-X%*%b.wls) %*% wm.wls %*% (Y-X%*%b.wls))/(n-p)

# s2{b_w} = MSE*(X'WX)^(-1) s2.b.wls <- mse.w[1,1]*solve(t(X) %*% wm.wls %*% X) s.b.wls <- sqrt(diag(s2.b.wls)) # s{b_w} = sqrt(diag(s2{b_w})) t.b.wls <- b.wls/s.b.wls # t = b_w/s{b} p.b.wls <- 2*(1-pt(abs(t.b.wls), n-p)) # P-value

wls.out <- cbind(b.wls, s.b.wls, t.b.wls, p.b.wls) colnames(wls.out) <- c("b_wls", "Std. Error", "t*", "P(>|t*|)") rownames(wls.out) <- c("Intercept", "Height", "Arm Length", "Hand Length")

round(ols.out, 4) round(wls.out, 4)

###################################################################

## Using gls fuction in nlme package

library(nlme) gls.mod.ols <- gls(Weight ~ Height+ArmLng+HandLng, method="ML") summary(gls.mod.ols)

## Fit variance function model with s{e_i} = alpha*(mu_i^delta) gls.mod.wls <- gls(Weight ~ Height+ArmLng+HandLng, method="ML", weights=varPower(form = ~fitted(.))) summary(gls.mod.wls)

anova(gls.mod.ols,gls.mod.wls)

## Plot Pearson residuals (e/s{e}) vs yhat for OLS and WLS par(mfrow=c(1,2)) plot(resid(gls.mod.ols, type="p") ~ fitted(gls.mod.ols), pch=16, cex=0.6) abline(h=0, col="red") plot(resid(gls.mod.wls, type="p") ~ fitted(gls.mod.wls), pch=16, cex=0.6) abline(h=0, col="red")

par(mfrow=c(1,1))

NEED work sheet

Part 1: Ballistic Tests on various layers of cloth panels

p.1.a.

p.1.c.

p.1.d.

p.1.e.

p.1.f. Comment:

DATE

film reissue prodCost usRev forRev totRev profit distCost dC_tR dC_pC year pctProf_totCost
STREET GIRL 0 211 806 198 1004 500 293 0.292 1.389 1930 99.2
VAGABOND LOVER 0 204 671 85 756 335 217 0.287 1.064 1930 79.6
SAINT IN NEW YO 0 128 350 310 460 195 137 0.298 1.07 1938 73.6
BACHELOR MOTHER 0 509 1170 805 1975 827 639 0.324 1.255 1939 72
TOP HAT 0 609 1782 1420 3202 1325 1268 0.396 2.082 1936 70.6
LITTLE WOMEN[*] 1 424 1337 663 2000 800 776 0.388 1.83 1934 66.7
RIO RITA 0 678 1775 625 2400 935 787 0.328 1.161 1930 63.8
CUCKOOS 0 407 662 201 863 335 121 0.14 0.297 1930 63.4
FIVE CAME BACK 0 225 441 280 721 265 231 0.32 1.027 1939 58.1
KITTY FOYLE 0 738 1710 675 2385 869 778 0.326 1.054 1941 57.3
MAN TO REMEMBER 0 118 293 123 416 146 152 0.365 1.288 1939 54.1
KING KONG[*] 1 672 745 1111 1856 650 534 0.288 0.795 1933 53.9
FOLLOW THE FLEE 0 747 1532 1175 2727 945 1035 0.38 1.386 1936 53
ANNE OF GREENIG 0 226 573 220 793 272 295 0.372 1.305 1935 52.2
INFORMER 0 243 455 495 950 325 382 0.402 1.572 1935 52
ROBERTA 0 610 1467 868 2335 770 955 0.409 1.566 1935 49.2
GAY DIVORCEE 0 520 1077 697 1774 584 670 0.378 1.288 1935 49.1
EX MRS BRADFORD 0 369 730 354 1084 350 365 0.337 0.989 1936 47.7
STAR OF MIDNIG[*] 1 280 575 256 831 265 286 0.344 1.021 1935 46.8
SKY GIANT 0 181 370 148 518 165 172 0.332 0.95 1938 46.7
SWING TIME 0 886 1624 994 2618 830 902 0.345 1.018 1936 46.4
FLYING DOWN TO 0 462 923 622 1545 480 603 0.39 1.305 1934 45.1
MELODY CRUISE 0 163 316 169 485 150 172 0.355 1.055 1933 44.8
CROSS FIRE 0 26 74 24 98 30 42 0.429 1.615 1933 44.1
SECOND WIFE 0 68 140 57 197 58 71 0.36 1.044 1936 41.7
HOOK LINE AND S 0 287 595 185 780 225 268 0.344 0.934 1931 40.5
COME ON DANGER 0 31 29 27 106 30 45 0.425 1.452 1933 39.5
PARTNERS 0 33 82 27 109 30 46 0.422 1.394 1932 38
MY FAVORITE WIF 0 921 1452 605 2057 505 631 0.307 0.685 1940 32.5
BRIDE WALKS OUT 0 289 502 168 670 164 217 0.324 0.751 1936 32.4
CRACKED NUTS 0 261 505 112 617 150 206 0.334 0.789 1931 32.1
GUN LAW[*] 1 78 148 47 195 47 70 0.359 0.897 1938 31.8
PHANTOM OF CRES 0 187 348 88 436 100 149 0.342 0.797 1933 29.8
FIFTH AVENUE GI 0 607 950 420 1370 314 449 0.328 0.74 1939 29.7
LUCKY DEVILS 0 117 179 106 285 65 103 0.361 0.88 1933 29.5
MARSHALL OF ME[*] 1 75 131 49 180 41 64 0.356 0.853 1940 29.5
IRENE 0 578 845 775 1620 367 675 0.417 1.168 1940 29.3
GRIDIRON FLASH 0 78 167 32 199 43 78 0.392 1 1935 27.6
SON OF KONG 0 269 331 285 616 133 214 0.347 0.796 1934 27.5
THAT'S RIGHT YO 0 271 926 92 1018 219 528 0.519 1.948 1940 27.4
ALICE ADAMS 0 342 574 196 770 164 264 0.343 0.772 1935 27.1
COMMON LAW 0 339 573 140 713 150 224 0.314 0.661 1932 26.6
BILL OF DIVORCE 0 250 383 148 531 110 171 0.322 0.684 1933 26.1
IN PERSON 0 493 496 219 715 147 75 0.105 0.152 1936 25.9
GHOST VALLEY 0 41 74 27 101 20 40 0.396 0.976 1932 24.7
MORNING GLORY 0 239 377 205 582 115 228 0.392 0.954 1934 24.6
SIX GUN GOLD 0 49 98 15 113 22 42 0.372 0.857 1941 24.2
SEVEN KEYS TO B 0 251 437 80 517 100 166 0.321 0.661 1930 24
SHALL WE DANCE 0 991 1275 893 2168 413 764 0.352 0.771 1937 23.5
LOVE COMES ALON 0 220 366 112 478 90 168 0.351 0.764 1930 23.2
SPITFIRE 0 223 492 112 604 113 268 0.444 1.202 1934 23
PACIFIC LINER 0 241 318 190 508 87 180 0.354 0.747 1939 20.7
MOST DANGEROUS 0 219 263 180 443 75 149 0.336 0.68 1933 20.4
SEA DEVILS 0 477 580 360 940 155 308 0.328 0.646 1937 19.7
CAUGHT PLASTERE 0 281 442 107 549 90 178 0.324 0.633 1932 19.6
YOU'LL FIND OUT 0 371 855 175 1030 167 492 0.478 1.326 1941 19.4
PEAGH O RENO 0 293 461 109 570 90 187 0.328 0.638 1932 18.8
MOTHER GAREY'S 0 358 543 160 703 110 235 0.334 0.656 1938 18.5
LOVING THE LADI 0 207 370 58 428 65 156 0.364 0.754 1930 17.9
LOST PATROL[*] 1 262 343 240 583 84 237 0.407 0.905 1934 16.8
LUGKY PARTNERS 0 733 880 510 1390 200 457 0.329 0.623 1940 16.8
TOM DIGK AND HA 0 806 1223 405 1628 234 588 0.361 0.73 1941 16.8
CHECK AND DOUBL 0 967 1751 59 1810 260 583 0.322 0.603 1931 16.8
DIPLOMANIACS 0 242 323 138 461 65 154 0.334 0.636 1933 16.4
BORN WITH LOVE 0 338 452 117 649 90 221 0.341 0.654 1932 16.1
YOU CAN'T BUY L 0 86 137 38 175 24 65 0.371 0.756 1937 15.9
LIFE OF VERGIE 0 331 506 148 654 87 236 0.361 0.713 1934 15.3
HIT THE DECK 0 542 980 152 1132 145 445 0.393 0.821 1930 14.7
EVERYTHING'S RO 0 140 205 70 275 35 100 0.364 0.714 1931 14.6
LOVE AFFAIR 0 860 975 775 1750 221 669 0.382 0.778 1939 14.5
MAD MISS MANTON 0 383 496 220 716 88 245 0.342 0.64 1939 14
IN NAME ONLY 0 722 926 395 1321 155 444 0.336 0.615 1939 13.3
ROOKIE COP 0 77 108 54 162 18 67 0.414 0.87 1939 12.5
THAT GIRL FROM 0 534 683 380 1063 101 428 0.403 0.801 1937 10.5
PRIMROSE PATH 0 702 898 302 1200 110 388 0.323 0.553 1940 10.1
DEVIL AND MISS 0 664 921 500 1421 117 640 0.45 0.964 1941 9
ANNIE OAKLEY 0 354 435 185 620 48 218 0.352 0.616 1936 8.4
RUNAWAY BRIDE 0 103 160 44 204 15 86 0.422 0.835 1930 7.9
SHOOTING STRAIG 0 238 378 40 418 30 150 0.359 0.63 1930 7.7
VIVACIOUS LADY[*] 1 703 830 376 1206 75 428 0.355 0.609 1937 6.6
THREE MUSKETEER 0 512 451 449 900 55 333 0.37 0.65 1935 6.5
GIRL A GUY AND 0 412 578 270 848 49 387 0.456 0.939 1941 6.1
MR AND MRS SMIT 0 743 981 419 1400 75 582 0.416 0.783 1941 5.7
STAGE DOOR 0 952 1250 512 1762 81 729 0.414 0.766 1938 4.8
HALF SHOT AT SU 0 529 658 271 929 40 360 0.388 0.681 1931 4.5
NURSE EDITH CAV 0 508 462 620 1082 38 536 0.495 1.055 1940 3.6
HUNGHBAGK OF NO 0 1826 1530 1625 3155 100 1229 0.39 0.673 1940 3.3
BREAK OF HEARTS 0 427 437 258 695 16 252 0.363 0.59 1935 2.4
DOUBLE HARNESS 0 329 379 114 493 10 154 0.312 0.468 1933 2.1
HIPS HIPS HOORA 0 336 435 190 625 8 281 0.45 0.836 1934 1.3
SUNNY 0 676 560 536 1096 7 413 0.377 0.611 1941 0.6
HE KNEW WOMEN 0 103 161 32 193 0 90 0.466 0.874 1930 0
NO NO NANETTE 0 570 490 450 940 -2 372 0.396 0.653 1941 -0.2
WINTER SET 0 407 467 215 682 -2 277 0.406 0.681 1937 -0.3
BACHELOR BAIT 0 120 168 27 19 -3 78 4.105 0.65 1934 -1.5
LITTLE MINSITER 0 648 723 381 1104 -9 465 0.421 0.718 1935 -0.8
GREAT MAN VOTES 0 265 337 95 432 -10 177 0.41 0.668 1939 -2.3
STORY OF V AND 0 1196 1120 705 1825 -50 679 0.372 0.568 1938 -2.7
MY LIFE WITH CA 0 503 530 300 830 -32 359 0.433 0.714 1941 -3.7
TRIPLE JUSTICE 0 85 110 19 129 -5 49 0.38 0.576 1940 -3.7
CAREFREE 0 1253 1113 618 1731 -68 546 0.315 0.436 1938 -3.8
BAD LANDS 0 84 108 33 141 -6 63 0.447 0.75 1939 -4.1
DAMSEL IN DISTR 0 1035 1010 455 1465 -65 495 0.338 0.478 1937 -4.2
SIN TAKES A HOL 0 450 463 160 623 -40 213 0.342 0.473 1931 -6
GUNGA DIN[*] 1 1915 1507 1300 2807 -193 1085 0.387 0.567 1939 -6.4
DEVOTION 0 394 448 94 542 -40 188 0.347 0.477 1932 -6.9
OF HUMAN BONDA[*] 1 403 467 125 592 -45 234 0.395 0.581 1934 -7.1
STINGAREE 0 408 368 195 563 -49 204 0.362 0.5 1934 -8
WHAT PRICE HOLL 0 616 430 141 571 -50 205 0.359 0.333 1932 -6.1
HOLD'EM JAIL 0 408 416 95 511 -55 158 0.309 0.387 1933 -9.7
MARY OF SCOTLAN 0 864 791 485 1276 -165 577 0.452 0.668 1936 -11.5
YOUNG DONAVON'S 0 279 445 173 618 -100 439 0.71 1.573 1931 -13.9
LOST SQUADRON[*] 1 621 534 198 732 -125 236 0.322 0.38 1932 -14.6
SILVER HORDE 0 423 418 144 562 -100 239 0.425 0.565 1931 -15.1
LIFE OF THE PAR 0 489 457 127 584 -111 206 0.353 0.421 1938 -16
SWISS FAMILY RO 0 681 587 303 890 -180 389 0.437 0.571 1940 -16.8
LIVING ON LOVE 0 112 106 29 135 -28 51 0.378 0.455 1938 -17.2
ANIMAL KINGDOM 0 458 439 89 528 -110 180 0.341 0.393 1933 -17.2
WISE GIRL 0 448 328 162 490 -114 156 0.318 0.348 1938 -18.9
LADY WITH A PAS 0 541 475 120 595 -140 194 0.326 0.359 1932 -19
LAST DAYS OF P[*] 1 818 489 491 980 -237 399 0.407 0.488 1935 -19.5
AFTER TONIGHT 0 355 250 130 380 -100 125 0.329 0.352 1933 -20.8
HAVING A WONDER 0 966 771 237 1008 -267 309 0.307 0.32 1938 -20.9
GIRL CRAZY 0 532 432 123 555 -150 173 0.312 0.325 1932 -21.3
QUICK MONEY 0 120 102 33 135 -37 52 0.385 0.433 1938 -21.5
JOY OF LIVING 0 1086 722 415 1137 -314 365 0.321 0.336 1938 -21.6
TOO MANY WIVES 0 105 92 30 122 -35 52 0.426 0.495 1937 -22.3
ALLEGHENY UPRIS 0 696 660 90 750 -230 284 0.379 0.408 1940 -23.5
THEY KNEW WHAT 0 781 577 355 932 -291 442 0.474 0.566 1941 -23.8
VIGIL IN THE NI 0 920 666 338 1004 -327 411 0.409 0.447 1940 -24.6
BRINGING UP THE BA[*] 1 1073 715 394 1109 -365 401 0.362 0.374 1937 -24.8
BIRD OF PARADIS 0 752 503 250 753 -250 251 0.333 0.334 1932 -24.9
NEW FAGES OF 1931 0 728 650 125 775 -258 305 0.394 0.419 1937 -25
WOMEN I LOVE 0 725 553 230 783 -266 324 0.414 0.447 1937 -25.4
CONSPIRACY 0 118 107 31 138 -50 70 0.507 0.593 1930 -26.6
GASE OF SGT GRI 0 467 407 49 456 -170 159 0.349 0.34 1930 -27.2
ROOM SERVIGE 0 884 665 210 875 -330 321 0.367 0.363 1939 -27.4
WOMAN REBELS 0 574 347 236 583 -222 231 0.396 0.402 1936 -27.6
DIXIANA 0 747 500 280 780 -300 333 0.427 0.446 1931 -27.8
RADIO CITY REV 0 810 565 185 750 -300 240 0.32 0.296 1938 -28.6
CIMARRON[*] 1 1433 1122 261 1383 -565 515 0.372 0.359 1931 -29
CONQUERORS 0 619 462 124 528 -230 139 0.263 0.225 1933 -30.3
TOAST OF NEW YO 0 1072 846 202 1048 -530 506 0.483 0.472 1937 -33.6
I DREAM TOO MUC 0 627 391 249 640 -350 363 0.567 0.579 1936 -35.4
HIS FAMILY TREE 0 127 89 27 116 -65 54 0.466 0.425 1936 -35.9
BEAU IDEAL 0 707 390 185 575 -330 198 0.344 0.28 1931 -36.5
MAN OF TWO WORL 0 388 194 114 308 -220 140 0.455 0.361 1934 -41.7
SILVIA SCARLET 0 641 321 176 497 -362 219 0.441 0.342 1936 -42.1
CAPTAIN HURRICA 0 208 124 26 150 -126 68 0.453 0.327 1935 -45.7
GAY DIPLOMAT 0 184 96 35 131 -115 62 0.473 0.337 1931 -46.7
HITTING A NEW H 0 727 305 183 488 -431 192 0.393 0.264 1938 -46.9
TWO ALONE 0 236 125 39 164 -158 86 0.524 0.364 1934 -49.1
WOMAN COMANDS 0 415 186 56 242 -265 92 0.38 0.222 1932 -52.3
ABE LINCOLN IN 0 1004 535 131 666 -740 402 0.604 0.4 1940 -52.6
ENCHANTED APRIL 0 346 127 38 165 -260 79 0.479 0.228 1935 -61.2

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

Contemporary Business Mathematics With Canadian Applications

Authors: Ali R. Hassanlou, S. A. Hummelbrunner, Kelly Halliday

12th Edition

0135285011, 978-0135285015

More Books

Students also viewed these Mathematics questions