Question

In: Statistics and Probability

Hi, someone please do every part. I'm desperate!! :( Using RStudio, Create an R-Script: (1) You...

Hi, someone please do every part. I'm desperate!! :(

Using RStudio, Create an R-Script:

(1) You will generate a numeric matrix of size 21 by 21 and will name it tmp. To do so, draw 21×21 = 441 random observations from the standard normal distribution. Before doing so, set the seed for the random number generator to 37. See help for set.seed().

(2) Change the diagonal elements of tmp to 1s.

(3) Calculate condition number of tmp. See help for cond().

(4) Calculate the inverse of tmp. See help for solve().

(5) Calculate the trace of tmp.

(6) Sort tmp across rows.

(7) Delete the last row and last column from tmp and name the submatrix as tmp again.

(8) Reshape tmp as 40 by 10 matrix and name it as tmp1.

(9) Repeat tmp1 four times to generate 40 by 40 array, and name it as tmp2.

(10) Calculate condition number of tmp2.

(11) Calculate the inverse of tmp2.

(12) Change all nonpositive (<= 0) elements of tmp2 to 0.5.

(13) Set the first row and first column element of tmp2 to its negative value.

(14) Now take the natural log of tmp2 and name it as tmp3.

(15) Find the indices for NaN values in tmp3.

Solutions

Expert Solution

> rm(list=ls())
>
> #----------Part A
> set.seed(37)
>
> random_norm<-rnorm(441,0,1)
>
> tmp<-matrix(data=random_norm,nrow = 21,ncol=21,byrow = T)
> tmp
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
[1,] 0.12475399 0.382074587 0.579242767 -0.29374812 -0.82834916 -0.33271359 -0.19215950 1.36298273
[2,] 1.28423069 0.824029301 -2.384435565 0.73900226 -0.45904737 0.08286498 0.02402364 -2.10396909
[3,] -1.21301470 1.631144267 -1.950795384 0.43719959 -0.19215419 1.09688902 -0.97946905 -0.82018481
[4,] 1.87904655 -1.443868669 1.121196462 -0.05182865 1.02779621 0.39594576 -0.57351319 -0.91135701
[5,] 0.78773146 -1.176839264 -0.657437774 0.35756128 -0.08108464 -2.00570145 -1.54130303 -0.40583883
[6,] -0.59541289 0.799422530 1.201662494 -0.18974225 1.78322840 -0.17972831 0.79288228 -0.27167835
[7,] 1.91590922 0.683214669 -0.008500698 -0.41247869 -0.11247788 -0.24669868 1.73391148 -0.13964786
[8,] -0.06237268 0.389071743 0.357215907 -1.62295636 1.27789535 -0.19994565 0.59497756 1.91456198
[9,] -1.26549533 -1.384407339 2.193377870 -1.23308566 0.33973295 1.22424782 0.72928140 -1.01301796
[10,] 0.11298976 -0.022708863 -1.218392908 1.42614447 -0.71861308 -0.29344527 0.90993300 -0.01971453
[11,] 0.32191950 0.047270363 -0.506133366 -0.52564898 -0.91576491 0.93314430 -0.35906086 -0.81159636
[12,] -0.99844780 1.762736823 0.925402815 -1.10100447 2.12331290 1.38502668 0.49197771 -1.19277745
[13,] -0.62157801 -1.123701584 1.531156927 0.52771759 -1.24925566 -1.11027849 -0.55633761 -0.32387881
[14,] 0.26466791 -0.056304724 3.814732422 -1.54118689 -0.28123202 -1.81535364 0.08343226 -0.01713154
[15,] 0.51547663 0.417642860 -1.195631602 0.75635761 0.22586155 0.84066833 -0.39588988 -0.59887164
[16,] -0.26865834 1.672712382 0.781342256 1.89508213 0.68842709 1.98514026 1.22932675 -1.13880300
[17,] -0.01436325 -0.951534762 0.123189551 0.89694815 -0.83681823 -1.79822378 1.31779845 -1.29612771
[18,] -0.31843393 1.100751729 -1.688606786 -0.41681626 -0.80120738 -0.01561985 0.63366036 -0.22927863
[19,] 0.16827144 1.734386568 0.554380584 -0.54549942 0.97031996 -1.48344610 1.25332207 -0.89563085
[20,] -0.14516611 -0.003866239 -1.797245960 -0.07636515 -1.07902072 -0.82355279 -0.68104348 0.85428002
[21,] 0.12161607 2.049838788 0.527825139 0.65423187 -0.84045048 -1.17113469 0.42099608 0.87296800
[,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16]
[1,] 0.85595441 0.21599549 -0.37770210 0.03869354 1.4248151 0.98230990 0.3104645 -1.66752833
[2,] 0.46306868 0.35706781 -0.52140334 0.65539552 -0.2209987 0.30990783 0.1297151 -0.46352714
[3,] 0.60626817 0.19393903 1.34801696 1.47746318 0.1300636 1.15608052 -1.6654730 -0.99577105
[4,] -1.07692650 1.13319435 -2.02080815 -0.12006636 0.7872457 0.15968512 -0.7131679 1.08072776
[5,] -1.52777490 0.91405420 0.07832255 0.21028660 -0.4106792 0.07191634 -0.4778294 2.39972590
[6,] 0.18758919 0.24581692 -0.80035380 1.16365769 -1.5870106 0.03381973 -0.6794716 0.73053413
[7,] -0.02587037 0.17037962 -0.80061836 -1.22748045 -1.6911149 1.10681706 0.4324372 -0.94200575
[8,] 2.02280974 -0.20033177 0.39795537 -0.36842243 0.6740395 -0.73675317 -1.8501486 0.68983802
[9,] -1.08115424 -1.45579137 -1.16744945 -1.89989759 0.6588440 0.52627416 0.3408253 -0.23287072
[10,] -0.23975694 0.42469721 -0.21649722 -1.36032134 0.5931803 -1.28907734 -1.4344011 -0.65717951
[11,] -1.53968909 0.05085327 -0.42685752 -0.41411719 -0.4304918 2.03115378 -0.2396282 1.48417099
[12,] 0.27458912 0.26534905 -0.84360270 1.23526021 0.3126359 -0.49324454 -2.2482749 -1.70877542
[13,] -1.98866799 -1.63383626 0.52797476 -0.62295335 -0.3099242 -1.45117643 0.7695208 0.16448627
[14,] -1.39223380 -0.05370074 -0.94943322 -0.23674132 0.4629173 0.30146827 1.3598137 -0.40896944
[15,] 0.07958945 -0.36108468 -0.34305357 -0.75807311 -0.4297209 -0.03969907 0.9082443 -1.60846688
[16,] 1.22930355 0.15505237 1.55603787 0.96048044 0.3759654 -1.06394860 1.1798792 0.69503381
[17,] -1.35802204 0.39060297 -1.70825736 -0.45300950 1.3069401 -1.65844003 -0.3187222 -0.10159718
[18,] -0.54414841 2.97090361 0.84761998 -0.05035319 0.9303848 1.59138599 0.4058207 -0.91401942
[19,] 0.17868348 0.47819359 -1.17541781 0.31229912 -1.3258222 -0.69583800 -0.2384368 -1.96128467
[20,] 0.38024524 1.09025513 -1.94781715 -0.86982188 0.6323142 1.51592186 0.6931672 -0.03459383
[21,] -1.70971459 -0.39529585 -2.20577546 0.81948546 0.7568926 0.53981283 -1.0631598 -0.07028242
[,17] [,18] [,19] [,20] [,21]
[1,] -2.70484969 -1.73692423 0.40307517 -0.7320727 -0.27836096
[2,] 0.05002751 -0.21527835 0.89891629 0.2933713 -0.95593902
[3,] 1.52424854 -0.64126977 0.17454722 -0.3558587 -1.68668979
[4,] 1.68534888 -0.91772017 -0.06142613 -1.0776295 -1.60792421
[5,] 1.55791731 1.59953661 -0.27908596 1.2467158 2.74858228
[6,] 0.33685746 -0.53767894 1.11708601 0.1329864 0.91162330
[7,] 0.04321625 -0.58952288 0.77109554 1.3433221 -2.10284503
[8,] 1.68034627 -0.69530314 -0.87585607 0.4708889 -0.76837426
[9,] -0.04446092 0.31545007 0.38098663 -0.5436341 0.23641679
[10,] 1.68939711 1.01103561 0.54484789 -0.7294261 -0.00124731
[11,] 0.92195919 -0.03320873 1.29752724 0.5041068 -0.32682016
[12,] 0.20733311 3.25793615 -0.41098123 -2.7218293 0.63706634
[13,] -1.46834621 1.39984438 0.34550513 -1.8643707 0.66686741
[14,] -0.77228805 1.77344128 -0.87863685 -0.8893850 -0.10756160
[15,] -0.45479268 0.82489239 1.00173204 1.4483773 1.62301177
[16,] 1.09698206 -0.22535354 0.52932237 -0.7397050 0.72590561
[17,] -1.03191426 -1.18911260 -0.93240132 1.2079743 0.35936806
[18,] -0.47287054 -0.32688640 -0.43898572 1.4099243 -0.32396065
[19,] 0.55364454 -0.29267220 -0.09842985 1.1746546 -0.56531985
[20,] -0.46513590 0.85352232 0.15493635 -0.3284201 -1.30035981
[21,] 1.00245439 1.06263589 0.34203532 0.2269422 -1.03654380
>
> #-----------Part B
> diag(tmp)<-1
> tmp
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
[1,] 1.00000000 0.382074587 0.579242767 -0.29374812 -0.8283492 -0.33271359 -0.19215950 1.36298273
[2,] 1.28423069 1.000000000 -2.384435565 0.73900226 -0.4590474 0.08286498 0.02402364 -2.10396909
[3,] -1.21301470 1.631144267 1.000000000 0.43719959 -0.1921542 1.09688902 -0.97946905 -0.82018481
[4,] 1.87904655 -1.443868669 1.121196462 1.00000000 1.0277962 0.39594576 -0.57351319 -0.91135701
[5,] 0.78773146 -1.176839264 -0.657437774 0.35756128 1.0000000 -2.00570145 -1.54130303 -0.40583883
[6,] -0.59541289 0.799422530 1.201662494 -0.18974225 1.7832284 1.00000000 0.79288228 -0.27167835
[7,] 1.91590922 0.683214669 -0.008500698 -0.41247869 -0.1124779 -0.24669868 1.00000000 -0.13964786
[8,] -0.06237268 0.389071743 0.357215907 -1.62295636 1.2778953 -0.19994565 0.59497756 1.00000000
[9,] -1.26549533 -1.384407339 2.193377870 -1.23308566 0.3397329 1.22424782 0.72928140 -1.01301796
[10,] 0.11298976 -0.022708863 -1.218392908 1.42614447 -0.7186131 -0.29344527 0.90993300 -0.01971453
[11,] 0.32191950 0.047270363 -0.506133366 -0.52564898 -0.9157649 0.93314430 -0.35906086 -0.81159636
[12,] -0.99844780 1.762736823 0.925402815 -1.10100447 2.1233129 1.38502668 0.49197771 -1.19277745
[13,] -0.62157801 -1.123701584 1.531156927 0.52771759 -1.2492557 -1.11027849 -0.55633761 -0.32387881
[14,] 0.26466791 -0.056304724 3.814732422 -1.54118689 -0.2812320 -1.81535364 0.08343226 -0.01713154
[15,] 0.51547663 0.417642860 -1.195631602 0.75635761 0.2258615 0.84066833 -0.39588988 -0.59887164
[16,] -0.26865834 1.672712382 0.781342256 1.89508213 0.6884271 1.98514026 1.22932675 -1.13880300
[17,] -0.01436325 -0.951534762 0.123189551 0.89694815 -0.8368182 -1.79822378 1.31779845 -1.29612771
[18,] -0.31843393 1.100751729 -1.688606786 -0.41681626 -0.8012074 -0.01561985 0.63366036 -0.22927863
[19,] 0.16827144 1.734386568 0.554380584 -0.54549942 0.9703200 -1.48344610 1.25332207 -0.89563085
[20,] -0.14516611 -0.003866239 -1.797245960 -0.07636515 -1.0790207 -0.82355279 -0.68104348 0.85428002
[21,] 0.12161607 2.049838788 0.527825139 0.65423187 -0.8404505 -1.17113469 0.42099608 0.87296800
[,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16]
[1,] 0.85595441 0.21599549 -0.37770210 0.03869354 1.4248151 0.98230990 0.3104645 -1.66752833
[2,] 0.46306868 0.35706781 -0.52140334 0.65539552 -0.2209987 0.30990783 0.1297151 -0.46352714
[3,] 0.60626817 0.19393903 1.34801696 1.47746318 0.1300636 1.15608052 -1.6654730 -0.99577105
[4,] -1.07692650 1.13319435 -2.02080815 -0.12006636 0.7872457 0.15968512 -0.7131679 1.08072776
[5,] -1.52777490 0.91405420 0.07832255 0.21028660 -0.4106792 0.07191634 -0.4778294 2.39972590
[6,] 0.18758919 0.24581692 -0.80035380 1.16365769 -1.5870106 0.03381973 -0.6794716 0.73053413
[7,] -0.02587037 0.17037962 -0.80061836 -1.22748045 -1.6911149 1.10681706 0.4324372 -0.94200575
[8,] 2.02280974 -0.20033177 0.39795537 -0.36842243 0.6740395 -0.73675317 -1.8501486 0.68983802
[9,] 1.00000000 -1.45579137 -1.16744945 -1.89989759 0.6588440 0.52627416 0.3408253 -0.23287072
[10,] -0.23975694 1.00000000 -0.21649722 -1.36032134 0.5931803 -1.28907734 -1.4344011 -0.65717951
[11,] -1.53968909 0.05085327 1.00000000 -0.41411719 -0.4304918 2.03115378 -0.2396282 1.48417099
[12,] 0.27458912 0.26534905 -0.84360270 1.00000000 0.3126359 -0.49324454 -2.2482749 -1.70877542
[13,] -1.98866799 -1.63383626 0.52797476 -0.62295335 1.0000000 -1.45117643 0.7695208 0.16448627
[14,] -1.39223380 -0.05370074 -0.94943322 -0.23674132 0.4629173 1.00000000 1.3598137 -0.40896944
[15,] 0.07958945 -0.36108468 -0.34305357 -0.75807311 -0.4297209 -0.03969907 1.0000000 -1.60846688
[16,] 1.22930355 0.15505237 1.55603787 0.96048044 0.3759654 -1.06394860 1.1798792 1.00000000
[17,] -1.35802204 0.39060297 -1.70825736 -0.45300950 1.3069401 -1.65844003 -0.3187222 -0.10159718
[18,] -0.54414841 2.97090361 0.84761998 -0.05035319 0.9303848 1.59138599 0.4058207 -0.91401942
[19,] 0.17868348 0.47819359 -1.17541781 0.31229912 -1.3258222 -0.69583800 -0.2384368 -1.96128467
[20,] 0.38024524 1.09025513 -1.94781715 -0.86982188 0.6323142 1.51592186 0.6931672 -0.03459383
[21,] -1.70971459 -0.39529585 -2.20577546 0.81948546 0.7568926 0.53981283 -1.0631598 -0.07028242
[,17] [,18] [,19] [,20] [,21]
[1,] -2.70484969 -1.73692423 0.40307517 -0.7320727 -0.27836096
[2,] 0.05002751 -0.21527835 0.89891629 0.2933713 -0.95593902
[3,] 1.52424854 -0.64126977 0.17454722 -0.3558587 -1.68668979
[4,] 1.68534888 -0.91772017 -0.06142613 -1.0776295 -1.60792421
[5,] 1.55791731 1.59953661 -0.27908596 1.2467158 2.74858228
[6,] 0.33685746 -0.53767894 1.11708601 0.1329864 0.91162330
[7,] 0.04321625 -0.58952288 0.77109554 1.3433221 -2.10284503
[8,] 1.68034627 -0.69530314 -0.87585607 0.4708889 -0.76837426
[9,] -0.04446092 0.31545007 0.38098663 -0.5436341 0.23641679
[10,] 1.68939711 1.01103561 0.54484789 -0.7294261 -0.00124731
[11,] 0.92195919 -0.03320873 1.29752724 0.5041068 -0.32682016
[12,] 0.20733311 3.25793615 -0.41098123 -2.7218293 0.63706634
[13,] -1.46834621 1.39984438 0.34550513 -1.8643707 0.66686741
[14,] -0.77228805 1.77344128 -0.87863685 -0.8893850 -0.10756160
[15,] -0.45479268 0.82489239 1.00173204 1.4483773 1.62301177
[16,] 1.09698206 -0.22535354 0.52932237 -0.7397050 0.72590561
[17,] 1.00000000 -1.18911260 -0.93240132 1.2079743 0.35936806
[18,] -0.47287054 1.00000000 -0.43898572 1.4099243 -0.32396065
[19,] 0.55364454 -0.29267220 1.00000000 1.1746546 -0.56531985
[20,] -0.46513590 0.85352232 0.15493635 1.0000000 -1.30035981
[21,] 1.00245439 1.06263589 0.34203532 0.2269422 1.00000000
>
> #-----------Part C
>
> condition<-kappa(tmp,exact = T)
> condition
[1] 52.46573
>
> #----------Part D
>
> inverse<-solve(tmp)
> inverse
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
[1,] -0.072001777 0.48315079 -0.03929686 0.10812598 -0.131462693 0.31961995 -0.02690798 0.3205994801
[2,] 0.592564939 -0.93309713 0.05764077 -0.46993519 0.206383271 -0.41702442 0.41337800 -0.1722513431
[3,] 0.007929415 0.14165498 0.20723816 -0.04881166 -0.072646174 0.50825068 0.06585097 0.2518205757
[4,] 0.010148464 -0.10801962 0.16227397 0.07489935 0.345193250 -0.20256688 0.48205127 -0.3006146949
[5,] 0.025293411 -0.46520272 -0.16961677 0.33985038 0.414529451 -0.81652880 0.28544282 -0.3675708856
[6,] -0.112846471 0.11658213 0.03479803 0.01082623 -0.363333714 0.48830654 -0.13274948 0.2730763055
[7,] -0.366051216 0.51192994 -0.20749784 0.25843178 -0.024273862 -0.01397506 0.02397705 -0.0611752385
[8,] -0.189427965 0.04196471 -0.11642826 0.20199436 -0.161946440 0.03594386 -0.18353044 0.0762183282
[9,] -0.016252690 0.44355973 0.12586116 -0.12299562 -0.005097186 0.38497195 -0.06157169 0.2255708491
[10,] 0.197880142 -0.13568232 0.06605912 -0.14168333 -0.092399837 0.40962130 -0.12288925 0.0961943640
[11,] -0.074812834 0.07071572 0.02331727 0.08063811 0.113118681 -0.17712132 0.06653414 -0.0003771761
[12,] -0.665737177 1.17315520 -0.03923727 0.44588977 -0.399618293 0.62148260 -0.62802186 0.3428876115
[13,] -0.117784209 0.26098046 -0.07716860 0.35140067 -0.021628494 -0.15184277 -0.20281273 0.2053940833
[14,] 0.026702125 -0.08009517 -0.02476846 0.11933642 0.366109872 -0.59185925 0.23188057 -0.4635218919
[15,] -0.083571131 -0.18071843 -0.22594514 0.11472363 -0.108720839 -0.43426797 -0.30948218 -0.2125794935
[16,] 0.152126291 -0.12808218 0.01813152 -0.19593077 0.111281516 0.21817179 0.23813699 0.1256093867
[17,] -0.207681020 0.03630457 -0.10241828 0.15984801 -0.141895188 -0.30448990 -0.43144358 -0.0655596227
[18,] -0.450371876 0.69650637 0.04862544 0.18563907 -0.131676116 0.49238921 -0.06282428 0.3428495117
[19,] -0.244179206 0.60651055 -0.05923746 0.32895629 -0.187589463 0.43811609 -0.41793946 0.2975306067
[20,] -0.317444328 0.49177092 0.17111140 0.12724861 -0.134474445 0.62016975 0.04673306 0.4758340308
[21,] 0.261724339 -0.20844518 -0.05158165 -0.23484048 0.099491911 -0.06005341 -0.10444601 -0.1409625713
[,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16]
[1,] -0.09743876 0.21275442 -0.19635783 -0.24862612 0.04463210 0.36812643 0.296357061 -0.21053864
[2,] -0.72306274 -0.28134307 1.08183173 0.96437927 -0.26272394 -0.06667328 0.064562186 0.75025191
[3,] -0.14697991 0.18365858 -0.09060436 -0.11923391 0.13513131 0.39843705 0.288078141 -0.05980992
[4,] 0.38501394 -0.15514164 -0.53460350 -0.04196148 0.21274368 -0.52012343 -0.350625502 0.13942667
[5,] 0.57104650 -0.59842715 -0.28763848 0.14870652 0.16402033 -0.95600290 -0.577252306 0.21937232
[6,] -0.33268104 0.15785969 0.16161424 -0.01375654 -0.02838206 0.38741023 0.520049321 -0.11181981
[7,] 0.75434634 0.02068027 -0.82161578 -0.55003025 0.18029262 -0.32331208 -0.474582323 -0.29548523
[8,] 0.11763615 0.09418548 -0.30892435 -0.33493704 0.03700300 -0.03717998 -0.004568425 -0.20281209
[9,] 0.06876040 0.27910867 -0.29930473 -0.22321642 -0.02727606 0.32178397 0.111379657 -0.09582869
[10,] -0.50230085 0.29632043 0.39488503 0.18109792 -0.16165856 0.44920748 0.284002993 0.09489932
[11,] 0.24559888 -0.04451104 -0.24434974 -0.18724412 0.17001790 -0.21048979 -0.178440698 -0.04437013
[12,] 0.46335465 0.22272245 -1.05443293 -1.01678973 0.25490711 0.30014200 0.074870038 -0.75290349
[13,] 0.41641439 -0.16111418 -0.37509595 -0.31741991 0.30247375 -0.25401581 -0.055139604 -0.11150368
[14,] 0.68786471 -0.26415100 -0.34249929 -0.07253101 -0.10633202 -0.57147168 -0.619391814 0.02989313
[15,] 0.01586553 -0.12176338 0.17783276 -0.03409180 -0.23549658 0.01497259 -0.048078954 0.17612202
[16,] -0.26915716 -0.07667135 0.30576492 0.25298514 0.09719663 0.04591159 -0.024533738 0.25363909
[17,] 0.10917878 0.16223325 0.07644230 -0.21264312 -0.32636348 0.13242688 0.001593858 -0.06590965
[18,] 0.28412678 0.21210713 -0.73558141 -0.51120986 0.38072937 0.21640876 0.158531278 -0.40082399
[19,] 0.34953310 0.25312762 -0.40100118 -0.64464806 0.38084062 0.06221461 0.113191783 -0.37295570
[20,] 0.10891552 0.02527296 -0.54516090 -0.46984705 0.40687258 0.15853587 0.385049639 -0.34426875
[21,] -0.17340604 0.10938065 0.38171357 0.23125530 -0.34048714 0.15807729 0.111462574 0.14674620
[,17] [,18] [,19] [,20] [,21]
[1,] -0.16790135 0.141910004 -0.35926529 -0.32935739 0.08323774
[2,] 1.01330109 -0.993484066 0.16029061 1.06712902 -0.61492417
[3,] 0.12884189 -0.007672865 -0.36129511 0.02982251 -0.12733502
[4,] -0.18065825 0.265708758 -0.01404024 -0.14333145 0.29978991
[5,] -0.42624762 0.370252347 0.72219446 -0.22171885 0.37953128
[6,] 0.18953897 -0.073558783 -0.46242833 0.07444991 -0.17809095
[7,] -0.75315329 0.867310287 0.07726232 -0.88956795 0.70777072
[8,] -0.46627500 0.295298149 0.05535034 -0.29036209 0.32841091
[9,] -0.09775901 0.014115519 -0.31881392 -0.02418003 -0.06097937
[10,] 0.43199650 -0.280468060 -0.18672616 0.43985109 -0.51557286
[11,] -0.33953221 0.358569136 0.11686664 -0.38869737 0.17184607
[12,] -1.01995726 0.981944463 -0.22057868 -1.06752087 0.71457921
[13,] -0.44939026 0.580739289 0.16560788 -0.38960256 0.43978045
[14,] -0.45345630 0.359091743 0.31770853 -0.37873543 0.47643877
[15,] -0.14323320 -0.093032881 0.42993721 0.05341687 0.00655526
[16,] 0.38984505 -0.288472556 -0.24706470 0.45796961 -0.25160488
[17,] -0.27441141 -0.022333211 0.31384485 -0.22288480 0.16208342
[18,] -0.58925246 0.643482325 -0.36910728 -0.47775854 0.37704470
[19,] -0.72113566 0.575278285 0.14729230 -0.47282666 0.35779228
[20,] -0.20710655 0.548258707 -0.41403654 -0.30753974 0.22729215
[21,] 0.32683212 -0.384121557 -0.01671312 0.16038507 -0.20526651
>
> #----------Part E
> tmp_trace<-sum(diag(tmp))
> tmp_trace
[1] 21
>
> #----------Part F
> apply(tmp,1,sort)
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
[1,] -2.70484969 -2.38443557 -1.6866898 -2.02080815 -2.00570145 -1.58701061 -2.102845034 -1.85014856
[2,] -1.73692423 -2.10396909 -1.6654730 -1.60792421 -1.54130303 -0.80035380 -1.691114945 -1.62295636
[3,] -1.66752833 -0.95593902 -1.2130147 -1.44386867 -1.52777490 -0.67947164 -1.227480445 -0.87585607
[4,] -0.82834916 -0.52140334 -0.9957711 -1.07762950 -1.17683926 -0.59541289 -0.942005753 -0.76837426
[5,] -0.73207272 -0.46352714 -0.9794691 -1.07692650 -0.65743777 -0.53767894 -0.800618364 -0.73675317
[6,] -0.37770210 -0.45904737 -0.8201848 -0.91772017 -0.47782945 -0.27167835 -0.589522883 -0.69530314
[7,] -0.33271359 -0.22099866 -0.6412698 -0.91135701 -0.41067917 -0.18974225 -0.412478686 -0.36842243
[8,] -0.29374812 -0.21527835 -0.3558587 -0.71316794 -0.40583883 0.03381973 -0.246698676 -0.20033177
[9,] -0.27836096 0.02402364 -0.1921542 -0.57351319 -0.27908596 0.13298637 -0.139647857 -0.19994565
[10,] -0.19215950 0.05002751 0.1300636 -0.12006636 0.07191634 0.18758919 -0.112477882 -0.06237268
[11,] 0.03869354 0.08286498 0.1745472 -0.06142613 0.07832255 0.24581692 -0.025870369 0.35721591
[12,] 0.21599549 0.12971510 0.1939390 0.15968512 0.21028660 0.33685746 -0.008500698 0.38907174
[13,] 0.31046447 0.29337128 0.4371996 0.39594576 0.35756128 0.73053413 0.043216248 0.39795537
[14,] 0.38207459 0.30990783 0.6062682 0.78724570 0.78773146 0.79288228 0.170379622 0.47088892
[15,] 0.40307517 0.35706781 1.0000000 1.00000000 0.91405420 0.79942253 0.432437214 0.59497756
[16,] 0.57924277 0.46306868 1.0968890 1.02779621 1.00000000 0.91162330 0.683214669 0.67403950
[17,] 0.85595441 0.65539552 1.1560805 1.08072776 1.24671576 1.00000000 0.771095545 0.68983802
[18,] 0.98230990 0.73900226 1.3480170 1.12119646 1.55791731 1.11708601 1.000000000 1.00000000
[19,] 1.00000000 0.89891629 1.4774632 1.13319435 1.59953661 1.16365769 1.106817059 1.27789535
[20,] 1.36298273 1.00000000 1.5242485 1.68534888 2.39972590 1.20166249 1.343322113 1.68034627
[21,] 1.42481507 1.28423069 1.6311443 1.87904655 2.74858228 1.78322840 1.915909217 2.02280974
[,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16]
[1,] -1.89989759 -1.43440105 -1.53968909 -2.7218293 -1.9886680 -1.81535364 -1.60846688 -1.1388030
[2,] -1.45579137 -1.36032134 -0.91576491 -2.2482749 -1.8643707 -1.54118689 -1.19563160 -1.0639486
[3,] -1.38440734 -1.28907734 -0.81159636 -1.7087754 -1.6338363 -1.39223380 -0.75807311 -0.7397050
[4,] -1.26549533 -1.21839291 -0.52564898 -1.1927775 -1.4683462 -0.94943322 -0.59887164 -0.2686583
[5,] -1.23308566 -0.72942606 -0.50613337 -1.1010045 -1.4511764 -0.88938498 -0.45479268 -0.2253535
[6,] -1.16744945 -0.71861308 -0.43049175 -0.9984478 -1.2492557 -0.87863685 -0.42972095 0.1550524
[7,] -1.01301796 -0.65717951 -0.41411719 -0.8436027 -1.1237016 -0.77228805 -0.39588988 0.3759654
[8,] -0.54363415 -0.29344527 -0.35906086 -0.4932445 -1.1102785 -0.40896944 -0.36108468 0.5293224
[9,] -0.23287072 -0.23975694 -0.32682016 -0.4109812 -0.6229533 -0.28123202 -0.34305357 0.6884271
[10,] -0.04446092 -0.21649722 -0.23962824 0.2073331 -0.6215780 -0.23674132 -0.03969907 0.7259056
[11,] 0.23641679 -0.02270886 -0.03320873 0.2653491 -0.5563376 -0.10756160 0.07958945 0.7813423
[12,] 0.31545007 -0.01971453 0.04727036 0.2745891 -0.3238788 -0.05630472 0.22586155 0.9604804
[13,] 0.33973295 -0.00124731 0.05085327 0.3126359 0.1644863 -0.05370074 0.41764286 1.0000000
[14,] 0.34082530 0.11298976 0.32191950 0.4919777 0.3455051 -0.01713154 0.51547663 1.0969821
[15,] 0.38098663 0.54484789 0.50410683 0.6370663 0.5277176 0.08343226 0.75635761 1.1798792
[16,] 0.52627416 0.59318032 0.92195919 0.9254028 0.5279748 0.26466791 0.82489239 1.2293035
[17,] 0.65884401 0.90993300 0.93314430 1.0000000 0.6668674 0.46291727 0.84066833 1.2293268
[18,] 0.72928140 1.00000000 1.00000000 1.3850267 0.7695208 1.00000000 1.00000000 1.5560379
[19,] 1.00000000 1.01103561 1.29752724 1.7627368 1.0000000 1.35981372 1.00173204 1.6727124
[20,] 1.22424782 1.42614447 1.48417099 2.1233129 1.3998444 1.77344128 1.44837734 1.8950821
[21,] 2.19337787 1.68939711 2.03115378 3.2579361 1.5311569 3.81473242 1.62301177 1.9851403
[,17] [,18] [,19] [,20] [,21]
[1,] -1.79822378 -1.68860679 -1.9612847 -1.947817151 -2.20577546
[2,] -1.70825736 -0.91401942 -1.4834461 -1.797245960 -1.70971459
[3,] -1.65844003 -0.80120738 -1.3258222 -1.300359812 -1.17113469
[4,] -1.35802204 -0.54414841 -1.1754178 -1.079020721 -1.06315983
[5,] -1.29612771 -0.47287054 -0.8956308 -0.869821880 -0.84045048
[6,] -1.18911260 -0.43898572 -0.6958380 -0.823552793 -0.39529585
[7,] -0.95153476 -0.41681626 -0.5653199 -0.681043484 -0.07028242
[8,] -0.93240132 -0.32396065 -0.5454994 -0.465135897 0.12161607
[9,] -0.83681823 -0.31843393 -0.2926722 -0.145166114 0.22694218
[10,] -0.45300950 -0.22927863 -0.2384368 -0.076365148 0.34203532
[11,] -0.31872218 -0.05035319 0.1682714 -0.034593833 0.42099608
[12,] -0.10159718 -0.01561985 0.1786835 -0.003866239 0.52782514
[13,] -0.01436325 0.40582068 0.3122991 0.154936355 0.53981283
[14,] 0.12318955 0.63366036 0.4781936 0.380245237 0.65423187
[15,] 0.35936806 0.84761998 0.5536445 0.632314240 0.75689260
[16,] 0.39060297 0.93038482 0.5543806 0.693167198 0.81948546
[17,] 0.89694815 1.00000000 0.9703200 0.853522318 0.87296800
[18,] 1.00000000 1.10075173 1.0000000 0.854280021 1.00000000
[19,] 1.20797428 1.40992429 1.1746546 1.000000000 1.00245439
[20,] 1.30694010 1.59138599 1.2533221 1.090255134 1.06263589
[21,] 1.31779845 2.97090361 1.7343866 1.515921857 2.04983879
>
> #----------Part G
> tmp<-tmp[-21,-21]
> tmp
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
[1,] 1.00000000 0.382074587 0.579242767 -0.29374812 -0.8283492 -0.33271359 -0.19215950 1.36298273
[2,] 1.28423069 1.000000000 -2.384435565 0.73900226 -0.4590474 0.08286498 0.02402364 -2.10396909
[3,] -1.21301470 1.631144267 1.000000000 0.43719959 -0.1921542 1.09688902 -0.97946905 -0.82018481
[4,] 1.87904655 -1.443868669 1.121196462 1.00000000 1.0277962 0.39594576 -0.57351319 -0.91135701
[5,] 0.78773146 -1.176839264 -0.657437774 0.35756128 1.0000000 -2.00570145 -1.54130303 -0.40583883
[6,] -0.59541289 0.799422530 1.201662494 -0.18974225 1.7832284 1.00000000 0.79288228 -0.27167835
[7,] 1.91590922 0.683214669 -0.008500698 -0.41247869 -0.1124779 -0.24669868 1.00000000 -0.13964786
[8,] -0.06237268 0.389071743 0.357215907 -1.62295636 1.2778953 -0.19994565 0.59497756 1.00000000
[9,] -1.26549533 -1.384407339 2.193377870 -1.23308566 0.3397329 1.22424782 0.72928140 -1.01301796
[10,] 0.11298976 -0.022708863 -1.218392908 1.42614447 -0.7186131 -0.29344527 0.90993300 -0.01971453
[11,] 0.32191950 0.047270363 -0.506133366 -0.52564898 -0.9157649 0.93314430 -0.35906086 -0.81159636
[12,] -0.99844780 1.762736823 0.925402815 -1.10100447 2.1233129 1.38502668 0.49197771 -1.19277745
[13,] -0.62157801 -1.123701584 1.531156927 0.52771759 -1.2492557 -1.11027849 -0.55633761 -0.32387881
[14,] 0.26466791 -0.056304724 3.814732422 -1.54118689 -0.2812320 -1.81535364 0.08343226 -0.01713154
[15,] 0.51547663 0.417642860 -1.195631602 0.75635761 0.2258615 0.84066833 -0.39588988 -0.59887164
[16,] -0.26865834 1.672712382 0.781342256 1.89508213 0.6884271 1.98514026 1.22932675 -1.13880300
[17,] -0.01436325 -0.951534762 0.123189551 0.89694815 -0.8368182 -1.79822378 1.31779845 -1.29612771
[18,] -0.31843393 1.100751729 -1.688606786 -0.41681626 -0.8012074 -0.01561985 0.63366036 -0.22927863
[19,] 0.16827144 1.734386568 0.554380584 -0.54549942 0.9703200 -1.48344610 1.25332207 -0.89563085
[20,] -0.14516611 -0.003866239 -1.797245960 -0.07636515 -1.0790207 -0.82355279 -0.68104348 0.85428002
[,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16]
[1,] 0.85595441 0.21599549 -0.37770210 0.03869354 1.4248151 0.98230990 0.3104645 -1.66752833
[2,] 0.46306868 0.35706781 -0.52140334 0.65539552 -0.2209987 0.30990783 0.1297151 -0.46352714
[3,] 0.60626817 0.19393903 1.34801696 1.47746318 0.1300636 1.15608052 -1.6654730 -0.99577105
[4,] -1.07692650 1.13319435 -2.02080815 -0.12006636 0.7872457 0.15968512 -0.7131679 1.08072776
[5,] -1.52777490 0.91405420 0.07832255 0.21028660 -0.4106792 0.07191634 -0.4778294 2.39972590
[6,] 0.18758919 0.24581692 -0.80035380 1.16365769 -1.5870106 0.03381973 -0.6794716 0.73053413
[7,] -0.02587037 0.17037962 -0.80061836 -1.22748045 -1.6911149 1.10681706 0.4324372 -0.94200575
[8,] 2.02280974 -0.20033177 0.39795537 -0.36842243 0.6740395 -0.73675317 -1.8501486 0.68983802
[9,] 1.00000000 -1.45579137 -1.16744945 -1.89989759 0.6588440 0.52627416 0.3408253 -0.23287072
[10,] -0.23975694 1.00000000 -0.21649722 -1.36032134 0.5931803 -1.28907734 -1.4344011 -0.65717951
[11,] -1.53968909 0.05085327 1.00000000 -0.41411719 -0.4304918 2.03115378 -0.2396282 1.48417099
[12,] 0.27458912 0.26534905 -0.84360270 1.00000000 0.3126359 -0.49324454 -2.2482749 -1.70877542
[13,] -1.98866799 -1.63383626 0.52797476 -0.62295335 1.0000000 -1.45117643 0.7695208 0.16448627
[14,] -1.39223380 -0.05370074 -0.94943322 -0.23674132 0.4629173 1.00000000 1.3598137 -0.40896944
[15,] 0.07958945 -0.36108468 -0.34305357 -0.75807311 -0.4297209 -0.03969907 1.0000000 -1.60846688
[16,] 1.22930355 0.15505237 1.55603787 0.96048044 0.3759654 -1.06394860 1.1798792 1.00000000
[17,] -1.35802204 0.39060297 -1.70825736 -0.45300950 1.3069401 -1.65844003 -0.3187222 -0.10159718
[18,] -0.54414841 2.97090361 0.84761998 -0.05035319 0.9303848 1.59138599 0.4058207 -0.91401942
[19,] 0.17868348 0.47819359 -1.17541781 0.31229912 -1.3258222 -0.69583800 -0.2384368 -1.96128467
[20,] 0.38024524 1.09025513 -1.94781715 -0.86982188 0.6323142 1.51592186 0.6931672 -0.03459383
[,17] [,18] [,19] [,20]
[1,] -2.70484969 -1.73692423 0.40307517 -0.7320727
[2,] 0.05002751 -0.21527835 0.89891629 0.2933713
[3,] 1.52424854 -0.64126977 0.17454722 -0.3558587
[4,] 1.68534888 -0.91772017 -0.06142613 -1.0776295
[5,] 1.55791731 1.59953661 -0.27908596 1.2467158
[6,] 0.33685746 -0.53767894 1.11708601 0.1329864
[7,] 0.04321625 -0.58952288 0.77109554 1.3433221
[8,] 1.68034627 -0.69530314 -0.87585607 0.4708889
[9,] -0.04446092 0.31545007 0.38098663 -0.5436341
[10,] 1.68939711 1.01103561 0.54484789 -0.7294261
[11,] 0.92195919 -0.03320873 1.29752724 0.5041068
[12,] 0.20733311 3.25793615 -0.41098123 -2.7218293
[13,] -1.46834621 1.39984438 0.34550513 -1.8643707
[14,] -0.77228805 1.77344128 -0.87863685 -0.8893850
[15,] -0.45479268 0.82489239 1.00173204 1.4483773
[16,] 1.09698206 -0.22535354 0.52932237 -0.7397050
[17,] 1.00000000 -1.18911260 -0.93240132 1.2079743
[18,] -0.47287054 1.00000000 -0.43898572 1.4099243
[19,] 0.55364454 -0.29267220 1.00000000 1.1746546
[20,] -0.46513590 0.85352232 0.15493635 1.0000000
>
> #---------Part H
> tmp1<-matrix(tmp,nrow=40,ncol=10)
> tmp1
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
[1,] 1.000000000 0.579242767 -0.82834916 -0.19215950 0.85595441 -0.37770210 1.42481507 0.31046447
[2,] 1.284230687 -2.384435565 -0.45904737 0.02402364 0.46306868 -0.52140334 -0.22099866 0.12971510
[3,] -1.213014704 1.000000000 -0.19215419 -0.97946905 0.60626817 1.34801696 0.13006357 -1.66547295
[4,] 1.879046552 1.121196462 1.02779621 -0.57351319 -1.07692650 -2.02080815 0.78724570 -0.71316794
[5,] 0.787731463 -0.657437774 1.00000000 -1.54130303 -1.52777490 0.07832255 -0.41067917 -0.47782945
[6,] -0.595412889 1.201662494 1.78322840 0.79288228 0.18758919 -0.80035380 -1.58701061 -0.67947164
[7,] 1.915909217 -0.008500698 -0.11247788 1.00000000 -0.02587037 -0.80061836 -1.69111494 0.43243721
[8,] -0.062372685 0.357215907 1.27789535 0.59497756 2.02280974 0.39795537 0.67403950 -1.85014856
[9,] -1.265495334 2.193377870 0.33973295 0.72928140 1.00000000 -1.16744945 0.65884401 0.34082530
[10,] 0.112989761 -1.218392908 -0.71861308 0.90993300 -0.23975694 -0.21649722 0.59318032 -1.43440105
[11,] 0.321919496 -0.506133366 -0.91576491 -0.35906086 -1.53968909 1.00000000 -0.43049175 -0.23962824
[12,] -0.998447801 0.925402815 2.12331290 0.49197771 0.27458912 -0.84360270 0.31263589 -2.24827491
[13,] -0.621578007 1.531156927 -1.24925566 -0.55633761 -1.98866799 0.52797476 1.00000000 0.76952077
[14,] 0.264667911 3.814732422 -0.28123202 0.08343226 -1.39223380 -0.94943322 0.46291727 1.35981372
[15,] 0.515476625 -1.195631602 0.22586155 -0.39588988 0.07958945 -0.34305357 -0.42972095 1.00000000
[16,] -0.268658344 0.781342256 0.68842709 1.22932675 1.22930355 1.55603787 0.37596537 1.17987918
[17,] -0.014363253 0.123189551 -0.83681823 1.31779845 -1.35802204 -1.70825736 1.30694010 -0.31872218
[18,] -0.318433930 -1.688606786 -0.80120738 0.63366036 -0.54414841 0.84761998 0.93038482 0.40582068
[19,] 0.168271438 0.554380584 0.97031996 1.25332207 0.17868348 -1.17541781 -1.32582222 -0.23843681
[20,] -0.145166114 -1.797245960 -1.07902072 -0.68104348 0.38024524 -1.94781715 0.63231424 0.69316720
[21,] 0.382074587 -0.293748124 -0.33271359 1.36298273 0.21599549 0.03869354 0.98230990 -1.66752833
[22,] 1.000000000 0.739002256 0.08286498 -2.10396909 0.35706781 0.65539552 0.30990783 -0.46352714
[23,] 1.631144267 0.437199589 1.09688902 -0.82018481 0.19393903 1.47746318 1.15608052 -0.99577105
[24,] -1.443868669 1.000000000 0.39594576 -0.91135701 1.13319435 -0.12006636 0.15968512 1.08072776
[25,] -1.176839264 0.357561279 -2.00570145 -0.40583883 0.91405420 0.21028660 0.07191634 2.39972590
[26,] 0.799422530 -0.189742251 1.00000000 -0.27167835 0.24581692 1.16365769 0.03381973 0.73053413
[27,] 0.683214669 -0.412478686 -0.24669868 -0.13964786 0.17037962 -1.22748045 1.10681706 -0.94200575
[28,] 0.389071743 -1.622956356 -0.19994565 1.00000000 -0.20033177 -0.36842243 -0.73675317 0.68983802
[29,] -1.384407339 -1.233085664 1.22424782 -1.01301796 -1.45579137 -1.89989759 0.52627416 -0.23287072
[30,] -0.022708863 1.426144473 -0.29344527 -0.01971453 1.00000000 -1.36032134 -1.28907734 -0.65717951
[31,] 0.047270363 -0.525648981 0.93314430 -0.81159636 0.05085327 -0.41411719 2.03115378 1.48417099
[32,] 1.762736823 -1.101004465 1.38502668 -1.19277745 0.26534905 1.00000000 -0.49324454 -1.70877542
[33,] -1.123701584 0.527717589 -1.11027849 -0.32387881 -1.63383626 -0.62295335 -1.45117643 0.16448627
[34,] -0.056304724 -1.541186890 -1.81535364 -0.01713154 -0.05370074 -0.23674132 1.00000000 -0.40896944
[35,] 0.417642860 0.756357609 0.84066833 -0.59887164 -0.36108468 -0.75807311 -0.03969907 -1.60846688
[36,] 1.672712382 1.895082133 1.98514026 -1.13880300 0.15505237 0.96048044 -1.06394860 1.00000000
[37,] -0.951534762 0.896948146 -1.79822378 -1.29612771 0.39060297 -0.45300950 -1.65844003 -0.10159718
[38,] 1.100751729 -0.416816258 -0.01561985 -0.22927863 2.97090361 -0.05035319 1.59138599 -0.91401942
[39,] 1.734386568 -0.545499421 -1.48344610 -0.89563085 0.47819359 0.31229912 -0.69583800 -1.96128467
[40,] -0.003866239 -0.076365148 -0.82355279 0.85428002 1.09025513 -0.86982188 1.51592186 -0.03459383
[,9] [,10]
[1,] -2.70484969 0.40307517
[2,] 0.05002751 0.89891629
[3,] 1.52424854 0.17454722
[4,] 1.68534888 -0.06142613
[5,] 1.55791731 -0.27908596
[6,] 0.33685746 1.11708601
[7,] 0.04321625 0.77109554
[8,] 1.68034627 -0.87585607
[9,] -0.04446092 0.38098663
[10,] 1.68939711 0.54484789
[11,] 0.92195919 1.29752724
[12,] 0.20733311 -0.41098123
[13,] -1.46834621 0.34550513
[14,] -0.77228805 -0.87863685
[15,] -0.45479268 1.00173204
[16,] 1.09698206 0.52932237
[17,] 1.00000000 -0.93240132
[18,] -0.47287054 -0.43898572
[19,] 0.55364454 1.00000000
[20,] -0.46513590 0.15493635
[21,] -1.73692423 -0.73207272
[22,] -0.21527835 0.29337128
[23,] -0.64126977 -0.35585875
[24,] -0.91772017 -1.07762950
[25,] 1.59953661 1.24671576
[26,] -0.53767894 0.13298637
[27,] -0.58952288 1.34332211
[28,] -0.69530314 0.47088892
[29,] 0.31545007 -0.54363415
[30,] 1.01103561 -0.72942606
[31,] -0.03320873 0.50410683
[32,] 3.25793615 -2.72182928
[33,] 1.39984438 -1.86437073
[34,] 1.77344128 -0.88938498
[35,] 0.82489239 1.44837734
[36,] -0.22535354 -0.73970495
[37,] -1.18911260 1.20797428
[38,] 1.00000000 1.40992429
[39,] -0.29267220 1.17465462
[40,] 0.85352232 1.00000000
>
> #---------Part I
> tmp2<-matrix(rep(tmp1,4),nrow=40,ncol=40,byrow = F)
> tmp2
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
[1,] 1.000000000 0.579242767 -0.82834916 -0.19215950 0.85595441 -0.37770210 1.42481507 0.31046447
[2,] 1.284230687 -2.384435565 -0.45904737 0.02402364 0.46306868 -0.52140334 -0.22099866 0.12971510
[3,] -1.213014704 1.000000000 -0.19215419 -0.97946905 0.60626817 1.34801696 0.13006357 -1.66547295
[4,] 1.879046552 1.121196462 1.02779621 -0.57351319 -1.07692650 -2.02080815 0.78724570 -0.71316794
[5,] 0.787731463 -0.657437774 1.00000000 -1.54130303 -1.52777490 0.07832255 -0.41067917 -0.47782945
[6,] -0.595412889 1.201662494 1.78322840 0.79288228 0.18758919 -0.80035380 -1.58701061 -0.67947164
[7,] 1.915909217 -0.008500698 -0.11247788 1.00000000 -0.02587037 -0.80061836 -1.69111494 0.43243721
[8,] -0.062372685 0.357215907 1.27789535 0.59497756 2.02280974 0.39795537 0.67403950 -1.85014856
[9,] -1.265495334 2.193377870 0.33973295 0.72928140 1.00000000 -1.16744945 0.65884401 0.34082530
[10,] 0.112989761 -1.218392908 -0.71861308 0.90993300 -0.23975694 -0.21649722 0.59318032 -1.43440105
[11,] 0.321919496 -0.506133366 -0.91576491 -0.35906086 -1.53968909 1.00000000 -0.43049175 -0.23962824
[12,] -0.998447801 0.925402815 2.12331290 0.49197771 0.27458912 -0.84360270 0.31263589 -2.24827491
[13,] -0.621578007 1.531156927 -1.24925566 -0.55633761 -1.98866799 0.52797476 1.00000000 0.76952077
[14,] 0.264667911 3.814732422 -0.28123202 0.08343226 -1.39223380 -0.94943322 0.46291727 1.35981372
[15,] 0.515476625 -1.195631602 0.22586155 -0.39588988 0.07958945 -0.34305357 -0.42972095 1.00000000
[16,] -0.268658344 0.781342256 0.68842709 1.22932675 1.22930355 1.55603787 0.37596537 1.17987918
[17,] -0.014363253 0.123189551 -0.83681823 1.31779845 -1.35802204 -1.70825736 1.30694010 -0.31872218
[18,] -0.318433930 -1.688606786 -0.80120738 0.63366036 -0.54414841 0.84761998 0.93038482 0.40582068
[19,] 0.168271438 0.554380584 0.97031996 1.25332207 0.17868348 -1.17541781 -1.32582222 -0.23843681
[20,] -0.145166114 -1.797245960 -1.07902072 -0.68104348 0.38024524 -1.94781715 0.63231424 0.69316720
[21,] 0.382074587 -0.293748124 -0.33271359 1.36298273 0.21599549 0.03869354 0.98230990 -1.66752833
[22,] 1.000000000 0.739002256 0.08286498 -2.10396909 0.35706781 0.65539552 0.30990783 -0.46352714
[23,] 1.631144267 0.437199589 1.09688902 -0.82018481 0.19393903 1.47746318 1.15608052 -0.99577105
[24,] -1.443868669 1.000000000 0.39594576 -0.91135701 1.13319435 -0.12006636 0.15968512 1.08072776
[25,] -1.176839264 0.357561279 -2.00570145 -0.40583883 0.91405420 0.21028660 0.07191634 2.39972590
[,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16]
[1,] -2.70484969 0.40307517 1.000000000 0.579242767 -0.82834916 -0.19215950 0.85595441 -0.37770210
[2,] 0.05002751 0.89891629 1.284230687 -2.384435565 -0.45904737 0.02402364 0.46306868 -0.52140334
[3,] 1.52424854 0.17454722 -1.213014704 1.000000000 -0.19215419 -0.97946905 0.60626817 1.34801696
[4,] 1.68534888 -0.06142613 1.879046552 1.121196462 1.02779621 -0.57351319 -1.07692650 -2.02080815
[5,] 1.55791731 -0.27908596 0.787731463 -0.657437774 1.00000000 -1.54130303 -1.52777490 0.07832255
[6,] 0.33685746 1.11708601 -0.595412889 1.201662494 1.78322840 0.79288228 0.18758919 -0.80035380
[7,] 0.04321625 0.77109554 1.915909217 -0.008500698 -0.11247788 1.00000000 -0.02587037 -0.80061836
[8,] 1.68034627 -0.87585607 -0.062372685 0.357215907 1.27789535 0.59497756 2.02280974 0.39795537
[9,] -0.04446092 0.38098663 -1.265495334 2.193377870 0.33973295 0.72928140 1.00000000 -1.16744945
[10,] 1.68939711 0.54484789 0.112989761 -1.218392908 -0.71861308 0.90993300 -0.23975694 -0.21649722
[11,] 0.92195919 1.29752724 0.321919496 -0.506133366 -0.91576491 -0.35906086 -1.53968909 1.00000000
[12,] 0.20733311 -0.41098123 -0.998447801 0.925402815 2.12331290 0.49197771 0.27458912 -0.84360270
[13,] -1.46834621 0.34550513 -0.621578007 1.531156927 -1.24925566 -0.55633761 -1.98866799 0.52797476
[14,] -0.77228805 -0.87863685 0.264667911 3.814732422 -0.28123202 0.08343226 -1.39223380 -0.94943322
[15,] -0.45479268 1.00173204 0.515476625 -1.195631602 0.22586155 -0.39588988 0.07958945 -0.34305357
[16,] 1.09698206 0.52932237 -0.268658344 0.781342256 0.68842709 1.22932675 1.22930355 1.55603787
[17,] 1.00000000 -0.93240132 -0.014363253 0.123189551 -0.83681823 1.31779845 -1.35802204 -1.70825736
[18,] -0.47287054 -0.43898572 -0.318433930 -1.688606786 -0.80120738 0.63366036 -0.54414841 0.84761998
[19,] 0.55364454 1.00000000 0.168271438 0.554380584 0.97031996 1.25332207 0.17868348 -1.17541781
[20,] -0.46513590 0.15493635 -0.145166114 -1.797245960 -1.07902072 -0.68104348 0.38024524 -1.94781715
[21,] -1.73692423 -0.73207272 0.382074587 -0.293748124 -0.33271359 1.36298273 0.21599549 0.03869354
[22,] -0.21527835 0.29337128 1.000000000 0.739002256 0.08286498 -2.10396909 0.35706781 0.65539552
[23,] -0.64126977 -0.35585875 1.631144267 0.437199589 1.09688902 -0.82018481 0.19393903 1.47746318
[24,] -0.91772017 -1.07762950 -1.443868669 1.000000000 0.39594576 -0.91135701 1.13319435 -0.12006636
[25,] 1.59953661 1.24671576 -1.176839264 0.357561279 -2.00570145 -0.40583883 0.91405420 0.21028660
[,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24]
[1,] 1.42481507 0.31046447 -2.70484969 0.40307517 1.000000000 0.579242767 -0.82834916 -0.19215950
[2,] -0.22099866 0.12971510 0.05002751 0.89891629 1.284230687 -2.384435565 -0.45904737 0.02402364
[3,] 0.13006357 -1.66547295 1.52424854 0.17454722 -1.213014704 1.000000000 -0.19215419 -0.97946905
[4,] 0.78724570 -0.71316794 1.68534888 -0.06142613 1.879046552 1.121196462 1.02779621 -0.57351319
[5,] -0.41067917 -0.47782945 1.55791731 -0.27908596 0.787731463 -0.657437774 1.00000000 -1.54130303
[6,] -1.58701061 -0.67947164 0.33685746 1.11708601 -0.595412889 1.201662494 1.78322840 0.79288228
[7,] -1.69111494 0.43243721 0.04321625 0.77109554 1.915909217 -0.008500698 -0.11247788 1.00000000
[8,] 0.67403950 -1.85014856 1.68034627 -0.87585607 -0.062372685 0.357215907 1.27789535 0.59497756
[9,] 0.65884401 0.34082530 -0.04446092 0.38098663 -1.265495334 2.193377870 0.33973295 0.72928140
[10,] 0.59318032 -1.43440105 1.68939711 0.54484789 0.112989761 -1.218392908 -0.71861308 0.90993300
[11,] -0.43049175 -0.23962824 0.92195919 1.29752724 0.321919496 -0.506133366 -0.91576491 -0.35906086
[12,] 0.31263589 -2.24827491 0.20733311 -0.41098123 -0.998447801 0.925402815 2.12331290 0.49197771
[13,] 1.00000000 0.76952077 -1.46834621 0.34550513 -0.621578007 1.531156927 -1.24925566 -0.55633761
[14,] 0.46291727 1.35981372 -0.77228805 -0.87863685 0.264667911 3.814732422 -0.28123202 0.08343226
[15,] -0.42972095 1.00000000 -0.45479268 1.00173204 0.515476625 -1.195631602 0.22586155 -0.39588988
[16,] 0.37596537 1.17987918 1.09698206 0.52932237 -0.268658344 0.781342256 0.68842709 1.22932675
[17,] 1.30694010 -0.31872218 1.00000000 -0.93240132 -0.014363253 0.123189551 -0.83681823 1.31779845
[18,] 0.93038482 0.40582068 -0.47287054 -0.43898572 -0.318433930 -1.688606786 -0.80120738 0.63366036
[19,] -1.32582222 -0.23843681 0.55364454 1.00000000 0.168271438 0.554380584 0.97031996 1.25332207
[20,] 0.63231424 0.69316720 -0.46513590 0.15493635 -0.145166114 -1.797245960 -1.07902072 -0.68104348
[21,] 0.98230990 -1.66752833 -1.73692423 -0.73207272 0.382074587 -0.293748124 -0.33271359 1.36298273
[22,] 0.30990783 -0.46352714 -0.21527835 0.29337128 1.000000000 0.739002256 0.08286498 -2.10396909
[23,] 1.15608052 -0.99577105 -0.64126977 -0.35585875 1.631144267 0.437199589 1.09688902 -0.82018481
[24,] 0.15968512 1.08072776 -0.91772017 -1.07762950 -1.443868669 1.000000000 0.39594576 -0.91135701
[25,] 0.07191634 2.39972590 1.59953661 1.24671576 -1.176839264 0.357561279 -2.00570145 -0.40583883
[,25] [,26] [,27] [,28] [,29] [,30] [,31] [,32]
[1,] 0.85595441 -0.37770210 1.42481507 0.31046447 -2.70484969 0.40307517 1.000000000 0.579242767
[2,] 0.46306868 -0.52140334 -0.22099866 0.12971510 0.05002751 0.89891629 1.284230687 -2.384435565
[3,] 0.60626817 1.34801696 0.13006357 -1.66547295 1.52424854 0.17454722 -1.213014704 1.000000000
[4,] -1.07692650 -2.02080815 0.78724570 -0.71316794 1.68534888 -0.06142613 1.879046552 1.121196462
[5,] -1.52777490 0.07832255 -0.41067917 -0.47782945 1.55791731 -0.27908596 0.787731463 -0.657437774
[6,] 0.18758919 -0.80035380 -1.58701061 -0.67947164 0.33685746 1.11708601 -0.595412889 1.201662494
[7,] -0.02587037 -0.80061836 -1.69111494 0.43243721 0.04321625 0.77109554 1.915909217 -0.008500698
[8,] 2.02280974 0.39795537 0.67403950 -1.85014856 1.68034627 -0.87585607 -0.062372685 0.357215907
[9,] 1.00000000 -1.16744945 0.65884401 0.34082530 -0.04446092 0.38098663 -1.265495334 2.193377870
[10,] -0.23975694 -0.21649722 0.59318032 -1.43440105 1.68939711 0.54484789 0.112989761 -1.218392908
[11,] -1.53968909 1.00000000 -0.43049175 -0.23962824 0.92195919 1.29752724 0.321919496 -0.506133366
[12,] 0.27458912 -0.84360270 0.31263589 -2.24827491 0.20733311 -0.41098123 -0.998447801 0.925402815
[13,] -1.98866799 0.52797476 1.00000000 0.76952077 -1.46834621 0.34550513 -0.621578007 1.531156927
[14,] -1.39223380 -0.94943322 0.46291727 1.35981372 -0.77228805 -0.87863685 0.264667911 3.814732422
[15,] 0.07958945 -0.34305357 -0.42972095 1.00000000 -0.45479268 1.00173204 0.515476625 -1.195631602
[16,] 1.22930355 1.55603787 0.37596537 1.17987918 1.09698206 0.52932237 -0.268658344 0.781342256
[17,] -1.35802204 -1.70825736 1.30694010 -0.31872218 1.00000000 -0.93240132 -0.014363253 0.123189551
[18,] -0.54414841 0.84761998 0.93038482 0.40582068 -0.47287054 -0.43898572 -0.318433930 -1.688606786
[19,] 0.17868348 -1.17541781 -1.32582222 -0.23843681 0.55364454 1.00000000 0.168271438 0.554380584
[20,] 0.38024524 -1.94781715 0.63231424 0.69316720 -0.46513590 0.15493635 -0.145166114 -1.797245960
[21,] 0.21599549 0.03869354 0.98230990 -1.66752833 -1.73692423 -0.73207272 0.382074587 -0.293748124
[22,] 0.35706781 0.65539552 0.30990783 -0.46352714 -0.21527835 0.29337128 1.000000000 0.739002256
[23,] 0.19393903 1.47746318 1.15608052 -0.99577105 -0.64126977 -0.35585875 1.631144267 0.437199589
[24,] 1.13319435 -0.12006636 0.15968512 1.08072776 -0.91772017 -1.07762950 -1.443868669 1.000000000
[25,] 0.91405420 0.21028660 0.07191634 2.39972590 1.59953661 1.24671576 -1.176839264 0.357561279
[,33] [,34] [,35] [,36] [,37] [,38] [,39] [,40]
[1,] -0.82834916 -0.19215950 0.85595441 -0.37770210 1.42481507 0.31046447 -2.70484969 0.40307517
[2,] -0.45904737 0.02402364 0.46306868 -0.52140334 -0.22099866 0.12971510 0.05002751 0.89891629
[3,] -0.19215419 -0.97946905 0.60626817 1.34801696 0.13006357 -1.66547295 1.52424854 0.17454722
[4,] 1.02779621 -0.57351319 -1.07692650 -2.02080815 0.78724570 -0.71316794 1.68534888 -0.06142613
[5,] 1.00000000 -1.54130303 -1.52777490 0.07832255 -0.41067917 -0.47782945 1.55791731 -0.27908596
[6,] 1.78322840 0.79288228 0.18758919 -0.80035380 -1.58701061 -0.67947164 0.33685746 1.11708601
[7,] -0.11247788 1.00000000 -0.02587037 -0.80061836 -1.69111494 0.43243721 0.04321625 0.77109554
[8,] 1.27789535 0.59497756 2.02280974 0.39795537 0.67403950 -1.85014856 1.68034627 -0.87585607
[9,] 0.33973295 0.72928140 1.00000000 -1.16744945 0.65884401 0.34082530 -0.04446092 0.38098663
[10,] -0.71861308 0.90993300 -0.23975694 -0.21649722 0.59318032 -1.43440105 1.68939711 0.54484789
[11,] -0.91576491 -0.35906086 -1.53968909 1.00000000 -0.43049175 -0.23962824 0.92195919 1.29752724
[12,] 2.12331290 0.49197771 0.27458912 -0.84360270 0.31263589 -2.24827491 0.20733311 -0.41098123
[13,] -1.24925566 -0.55633761 -1.98866799 0.52797476 1.00000000 0.76952077 -1.46834621 0.34550513
[14,] -0.28123202 0.08343226 -1.39223380 -0.94943322 0.46291727 1.35981372 -0.77228805 -0.87863685
[15,] 0.22586155 -0.39588988 0.07958945 -0.34305357 -0.42972095 1.00000000 -0.45479268 1.00173204
[16,] 0.68842709 1.22932675 1.22930355 1.55603787 0.37596537 1.17987918 1.09698206 0.52932237
[17,] -0.83681823 1.31779845 -1.35802204 -1.70825736 1.30694010 -0.31872218 1.00000000 -0.93240132
[18,] -0.80120738 0.63366036 -0.54414841 0.84761998 0.93038482 0.40582068 -0.47287054 -0.43898572
[19,] 0.97031996 1.25332207 0.17868348 -1.17541781 -1.32582222 -0.23843681 0.55364454 1.00000000
[20,] -1.07902072 -0.68104348 0.38024524 -1.94781715 0.63231424 0.69316720 -0.46513590 0.15493635
[21,] -0.33271359 1.36298273 0.21599549 0.03869354 0.98230990 -1.66752833 -1.73692423 -0.73207272
[22,] 0.08286498 -2.10396909 0.35706781 0.65539552 0.30990783 -0.46352714 -0.21527835 0.29337128
[23,] 1.09688902 -0.82018481 0.19393903 1.47746318 1.15608052 -0.99577105 -0.64126977 -0.35585875
[24,] 0.39594576 -0.91135701 1.13319435 -0.12006636 0.15968512 1.08072776 -0.91772017 -1.07762950
[25,] -2.00570145 -0.40583883 0.91405420 0.21028660 0.07191634 2.39972590 1.59953661 1.24671576
[ reached getOption("max.print") -- omitted 15 rows ]
> dim(tmp2)
[1] 40 40
>
> #--------Part J
> condition2<-kappa(tmp2,exact=T)
> condition2
[1] 5.982981e+48
>
> #--------Part K
> inverse2<-solve(tmp2)
Error in solve.default(tmp2) :
Lapack routine dgesv: system is exactly singular: U[24,24] = 0
>
> #--------Part L
> tmp2[tmp2<0]<-0.5
> tmp2
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9]
[1,] 1.00000000 0.5792428 0.50000000 0.50000000 0.85595441 0.50000000 1.42481507 0.3104645 0.50000000
[2,] 1.28423069 0.5000000 0.50000000 0.02402364 0.46306868 0.50000000 0.50000000 0.1297151 0.05002751
[3,] 0.50000000 1.0000000 0.50000000 0.50000000 0.60626817 1.34801696 0.13006357 0.5000000 1.52424854
[4,] 1.87904655 1.1211965 1.02779621 0.50000000 0.50000000 0.50000000 0.78724570 0.5000000 1.68534888
[5,] 0.78773146 0.5000000 1.00000000 0.50000000 0.50000000 0.07832255 0.50000000 0.5000000 1.55791731
[6,] 0.50000000 1.2016625 1.78322840 0.79288228 0.18758919 0.50000000 0.50000000 0.5000000 0.33685746
[7,] 1.91590922 0.5000000 0.50000000 1.00000000 0.50000000 0.50000000 0.50000000 0.4324372 0.04321625
[8,] 0.50000000 0.3572159 1.27789535 0.59497756 2.02280974 0.39795537 0.67403950 0.5000000 1.68034627
[9,] 0.50000000 2.1933779 0.33973295 0.72928140 1.00000000 0.50000000 0.65884401 0.3408253 0.50000000
[10,] 0.11298976 0.5000000 0.50000000 0.90993300 0.50000000 0.50000000 0.59318032 0.5000000 1.68939711
[11,] 0.32191950 0.5000000 0.50000000 0.50000000 0.50000000 1.00000000 0.50000000 0.5000000 0.92195919
[12,] 0.50000000 0.9254028 2.12331290 0.49197771 0.27458912 0.50000000 0.31263589 0.5000000 0.20733311
[13,] 0.50000000 1.5311569 0.50000000 0.50000000 0.50000000 0.52797476 1.00000000 0.7695208 0.50000000
[14,] 0.26466791 3.8147324 0.50000000 0.08343226 0.50000000 0.50000000 0.46291727 1.3598137 0.50000000
[15,] 0.51547663 0.5000000 0.22586155 0.50000000 0.07958945 0.50000000 0.50000000 1.0000000 0.50000000
[16,] 0.50000000 0.7813423 0.68842709 1.22932675 1.22930355 1.55603787 0.37596537 1.1798792 1.09698206
[17,] 0.50000000 0.1231896 0.50000000 1.31779845 0.50000000 0.50000000 1.30694010 0.5000000 1.00000000
[18,] 0.50000000 0.5000000 0.50000000 0.63366036 0.50000000 0.84761998 0.93038482 0.4058207 0.50000000
[19,] 0.16827144 0.5543806 0.97031996 1.25332207 0.17868348 0.50000000 0.50000000 0.5000000 0.55364454
[20,] 0.50000000 0.5000000 0.50000000 0.50000000 0.38024524 0.50000000 0.63231424 0.6931672 0.50000000
[21,] 0.38207459 0.5000000 0.50000000 1.36298273 0.21599549 0.03869354 0.98230990 0.5000000 0.50000000
[22,] 1.00000000 0.7390023 0.08286498 0.50000000 0.35706781 0.65539552 0.30990783 0.5000000 0.50000000
[23,] 1.63114427 0.4371996 1.09688902 0.50000000 0.19393903 1.47746318 1.15608052 0.5000000 0.50000000
[24,] 0.50000000 1.0000000 0.39594576 0.50000000 1.13319435 0.50000000 0.15968512 1.0807278 0.50000000
[25,] 0.50000000 0.3575613 0.50000000 0.50000000 0.91405420 0.21028660 0.07191634 2.3997259 1.59953661
[,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18]
[1,] 0.4030752 1.00000000 0.5792428 0.50000000 0.50000000 0.85595441 0.50000000 1.42481507 0.3104645
[2,] 0.8989163 1.28423069 0.5000000 0.50000000 0.02402364 0.46306868 0.50000000 0.50000000 0.1297151
[3,] 0.1745472 0.50000000 1.0000000 0.50000000 0.50000000 0.60626817 1.34801696 0.13006357 0.5000000
[4,] 0.5000000 1.87904655 1.1211965 1.02779621 0.50000000 0.50000000 0.50000000 0.78724570 0.5000000
[5,] 0.5000000 0.78773146 0.5000000 1.00000000 0.50000000 0.50000000 0.07832255 0.50000000 0.5000000
[6,] 1.1170860 0.50000000 1.2016625 1.78322840 0.79288228 0.18758919 0.50000000 0.50000000 0.5000000
[7,] 0.7710955 1.91590922 0.5000000 0.50000000 1.00000000 0.50000000 0.50000000 0.50000000 0.4324372
[8,] 0.5000000 0.50000000 0.3572159 1.27789535 0.59497756 2.02280974 0.39795537 0.67403950 0.5000000
[9,] 0.3809866 0.50000000 2.1933779 0.33973295 0.72928140 1.00000000 0.50000000 0.65884401 0.3408253
[10,] 0.5448479 0.11298976 0.5000000 0.50000000 0.90993300 0.50000000 0.50000000 0.59318032 0.5000000
[11,] 1.2975272 0.32191950 0.5000000 0.50000000 0.50000000 0.50000000 1.00000000 0.50000000 0.5000000
[12,] 0.5000000 0.50000000 0.9254028 2.12331290 0.49197771 0.27458912 0.50000000 0.31263589 0.5000000
[13,] 0.3455051 0.50000000 1.5311569 0.50000000 0.50000000 0.50000000 0.52797476 1.00000000 0.7695208
[14,] 0.5000000 0.26466791 3.8147324 0.50000000 0.08343226 0.50000000 0.50000000 0.46291727 1.3598137
[15,] 1.0017320 0.51547663 0.5000000 0.22586155 0.50000000 0.07958945 0.50000000 0.50000000 1.0000000
[16,] 0.5293224 0.50000000 0.7813423 0.68842709 1.22932675 1.22930355 1.55603787 0.37596537 1.1798792
[17,] 0.5000000 0.50000000 0.1231896 0.50000000 1.31779845 0.50000000 0.50000000 1.30694010 0.5000000
[18,] 0.5000000 0.50000000 0.5000000 0.50000000 0.63366036 0.50000000 0.84761998 0.93038482 0.4058207
[19,] 1.0000000 0.16827144 0.5543806 0.97031996 1.25332207 0.17868348 0.50000000 0.50000000 0.5000000
[20,] 0.1549364 0.50000000 0.5000000 0.50000000 0.50000000 0.38024524 0.50000000 0.63231424 0.6931672
[21,] 0.5000000 0.38207459 0.5000000 0.50000000 1.36298273 0.21599549 0.03869354 0.98230990 0.5000000
[22,] 0.2933713 1.00000000 0.7390023 0.08286498 0.50000000 0.35706781 0.65539552 0.30990783 0.5000000
[23,] 0.5000000 1.63114427 0.4371996 1.09688902 0.50000000 0.19393903 1.47746318 1.15608052 0.5000000
[24,] 0.5000000 0.50000000 1.0000000 0.39594576 0.50000000 1.13319435 0.50000000 0.15968512 1.0807278
[25,] 1.2467158 0.50000000 0.3575613 0.50000000 0.50000000 0.91405420 0.21028660 0.07191634 2.3997259
[,19] [,20] [,21] [,22] [,23] [,24] [,25] [,26] [,27]
[1,] 0.50000000 0.4030752 1.00000000 0.5792428 0.50000000 0.50000000 0.85595441 0.50000000 1.42481507
[2,] 0.05002751 0.8989163 1.28423069 0.5000000 0.50000000 0.02402364 0.46306868 0.50000000 0.50000000
[3,] 1.52424854 0.1745472 0.50000000 1.0000000 0.50000000 0.50000000 0.60626817 1.34801696 0.13006357
[4,] 1.68534888 0.5000000 1.87904655 1.1211965 1.02779621 0.50000000 0.50000000 0.50000000 0.78724570
[5,] 1.55791731 0.5000000 0.78773146 0.5000000 1.00000000 0.50000000 0.50000000 0.07832255 0.50000000
[6,] 0.33685746 1.1170860 0.50000000 1.2016625 1.78322840 0.79288228 0.18758919 0.50000000 0.50000000
[7,] 0.04321625 0.7710955 1.91590922 0.5000000 0.50000000 1.00000000 0.50000000 0.50000000 0.50000000
[8,] 1.68034627 0.5000000 0.50000000 0.3572159 1.27789535 0.59497756 2.02280974 0.39795537 0.67403950
[9,] 0.50000000 0.3809866 0.50000000 2.1933779 0.33973295 0.72928140 1.00000000 0.50000000 0.65884401
[10,] 1.68939711 0.5448479 0.11298976 0.5000000 0.50000000 0.90993300 0.50000000 0.50000000 0.59318032
[11,] 0.92195919 1.2975272 0.32191950 0.5000000 0.50000000 0.50000000 0.50000000 1.00000000 0.50000000
[12,] 0.20733311 0.5000000 0.50000000 0.9254028 2.12331290 0.49197771 0.27458912 0.50000000 0.31263589
[13,] 0.50000000 0.3455051 0.50000000 1.5311569 0.50000000 0.50000000 0.50000000 0.52797476 1.00000000
[14,] 0.50000000 0.5000000 0.26466791 3.8147324 0.50000000 0.08343226 0.50000000 0.50000000 0.46291727
[15,] 0.50000000 1.0017320 0.51547663 0.5000000 0.22586155 0.50000000 0.07958945 0.50000000 0.50000000
[16,] 1.09698206 0.5293224 0.50000000 0.7813423 0.68842709 1.22932675 1.22930355 1.55603787 0.37596537
[17,] 1.00000000 0.5000000 0.50000000 0.1231896 0.50000000 1.31779845 0.50000000 0.50000000 1.30694010
[18,] 0.50000000 0.5000000 0.50000000 0.5000000 0.50000000 0.63366036 0.50000000 0.84761998 0.93038482
[19,] 0.55364454 1.0000000 0.16827144 0.5543806 0.97031996 1.25332207 0.17868348 0.50000000 0.50000000
[20,] 0.50000000 0.1549364 0.50000000 0.5000000 0.50000000 0.50000000 0.38024524 0.50000000 0.63231424
[21,] 0.50000000 0.5000000 0.38207459 0.5000000 0.50000000 1.36298273 0.21599549 0.03869354 0.98230990
[22,] 0.50000000 0.2933713 1.00000000 0.7390023 0.08286498 0.50000000 0.35706781 0.65539552 0.30990783
[23,] 0.50000000 0.5000000 1.63114427 0.4371996 1.09688902 0.50000000 0.19393903 1.47746318 1.15608052
[24,] 0.50000000 0.5000000 0.50000000 1.0000000 0.39594576 0.50000000 1.13319435 0.50000000 0.15968512
[25,] 1.59953661 1.2467158 0.50000000 0.3575613 0.50000000 0.50000000 0.91405420 0.21028660 0.07191634
[,28] [,29] [,30] [,31] [,32] [,33] [,34] [,35] [,36]
[1,] 0.3104645 0.50000000 0.4030752 1.00000000 0.5792428 0.50000000 0.50000000 0.85595441 0.50000000
[2,] 0.1297151 0.05002751 0.8989163 1.28423069 0.5000000 0.50000000 0.02402364 0.46306868 0.50000000
[3,] 0.5000000 1.52424854 0.1745472 0.50000000 1.0000000 0.50000000 0.50000000 0.60626817 1.34801696
[4,] 0.5000000 1.68534888 0.5000000 1.87904655 1.1211965 1.02779621 0.50000000 0.50000000 0.50000000
[5,] 0.5000000 1.55791731 0.5000000 0.78773146 0.5000000 1.00000000 0.50000000 0.50000000 0.07832255
[6,] 0.5000000 0.33685746 1.1170860 0.50000000 1.2016625 1.78322840 0.79288228 0.18758919 0.50000000
[7,] 0.4324372 0.04321625 0.7710955 1.91590922 0.5000000 0.50000000 1.00000000 0.50000000 0.50000000
[8,] 0.5000000 1.68034627 0.5000000 0.50000000 0.3572159 1.27789535 0.59497756 2.02280974 0.39795537
[9,] 0.3408253 0.50000000 0.3809866 0.50000000 2.1933779 0.33973295 0.72928140 1.00000000 0.50000000
[10,] 0.5000000 1.68939711 0.5448479 0.11298976 0.5000000 0.50000000 0.90993300 0.50000000 0.50000000
[11,] 0.5000000 0.92195919 1.2975272 0.32191950 0.5000000 0.50000000 0.50000000 0.50000000 1.00000000
[12,] 0.5000000 0.20733311 0.5000000 0.50000000 0.9254028 2.12331290 0.49197771 0.27458912 0.50000000
[13,] 0.7695208 0.50000000 0.3455051 0.50000000 1.5311569 0.50000000 0.50000000 0.50000000 0.52797476
[14,] 1.3598137 0.50000000 0.5000000 0.26466791 3.8147324 0.50000000 0.08343226 0.50000000 0.50000000
[15,] 1.0000000 0.50000000 1.0017320 0.51547663 0.5000000 0.22586155 0.50000000 0.07958945 0.50000000
[16,] 1.1798792 1.09698206 0.5293224 0.50000000 0.7813423 0.68842709 1.22932675 1.22930355 1.55603787
[17,] 0.5000000 1.00000000 0.5000000 0.50000000 0.1231896 0.50000000 1.31779845 0.50000000 0.50000000
[18,] 0.4058207 0.50000000 0.5000000 0.50000000 0.5000000 0.50000000 0.63366036 0.50000000 0.84761998
[19,] 0.5000000 0.55364454 1.0000000 0.16827144 0.5543806 0.97031996 1.25332207 0.17868348 0.50000000
[20,] 0.6931672 0.50000000 0.1549364 0.50000000 0.5000000 0.50000000 0.50000000 0.38024524 0.50000000
[21,] 0.5000000 0.50000000 0.5000000 0.38207459 0.5000000 0.50000000 1.36298273 0.21599549 0.03869354
[22,] 0.5000000 0.50000000 0.2933713 1.00000000 0.7390023 0.08286498 0.50000000 0.35706781 0.65539552
[23,] 0.5000000 0.50000000 0.5000000 1.63114427 0.4371996 1.09688902 0.50000000 0.19393903 1.47746318
[24,] 1.0807278 0.50000000 0.5000000 0.50000000 1.0000000 0.39594576 0.50000000 1.13319435 0.50000000
[25,] 2.3997259 1.59953661 1.2467158 0.50000000 0.3575613 0.50000000 0.50000000 0.91405420 0.21028660
[,37] [,38] [,39] [,40]
[1,] 1.42481507 0.3104645 0.50000000 0.4030752
[2,] 0.50000000 0.1297151 0.05002751 0.8989163
[3,] 0.13006357 0.5000000 1.52424854 0.1745472
[4,] 0.78724570 0.5000000 1.68534888 0.5000000
[5,] 0.50000000 0.5000000 1.55791731 0.5000000
[6,] 0.50000000 0.5000000 0.33685746 1.1170860
[7,] 0.50000000 0.4324372 0.04321625 0.7710955
[8,] 0.67403950 0.5000000 1.68034627 0.5000000
[9,] 0.65884401 0.3408253 0.50000000 0.3809866
[10,] 0.59318032 0.5000000 1.68939711 0.5448479
[11,] 0.50000000 0.5000000 0.92195919 1.2975272
[12,] 0.31263589 0.5000000 0.20733311 0.5000000
[13,] 1.00000000 0.7695208 0.50000000 0.3455051
[14,] 0.46291727 1.3598137 0.50000000 0.5000000
[15,] 0.50000000 1.0000000 0.50000000 1.0017320
[16,] 0.37596537 1.1798792 1.09698206 0.5293224
[17,] 1.30694010 0.5000000 1.00000000 0.5000000
[18,] 0.93038482 0.4058207 0.50000000 0.5000000
[19,] 0.50000000 0.5000000 0.55364454 1.0000000
[20,] 0.63231424 0.6931672 0.50000000 0.1549364
[21,] 0.98230990 0.5000000 0.50000000 0.5000000
[22,] 0.30990783 0.5000000 0.50000000 0.2933713
[23,] 1.15608052 0.5000000 0.50000000 0.5000000
[24,] 0.15968512 1.0807278 0.50000000 0.5000000
[25,] 0.07191634 2.3997259 1.59953661 1.2467158
[ reached getOption("max.print") -- omitted 15 rows ]
>
> #-------Part M
> tmp2[1,1]<-(-1*tmp2[1,1])
> tmp2[1,1]
[1] -1
>
> #-------Part N
> tmp3<-log(tmp2)
Warning message:
In log(tmp2) : NaNs produced
> tmp3
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
[1,] NaN -0.54603360 -0.69314718 -0.69314718 -0.15553816 -0.69314718 0.35404203 -1.16968583
[2,] 0.25015985 -0.69314718 -0.69314718 -3.72871701 -0.76987989 -0.69314718 -0.69314718 -2.04241479
[3,] -0.69314718 0.00000000 -0.69314718 -0.69314718 -0.50043286 0.29863460 -2.03973191 -0.69314718
[4,] 0.63076450 0.11439638 0.02741691 -0.69314718 -0.69314718 -0.69314718 -0.23921488 -0.69314718
[5,] -0.23859803 -0.69314718 0.00000000 -0.69314718 -0.69314718 -2.54691966 -0.69314718 -0.69314718
[6,] -0.69314718 0.18370601 0.57842543 -0.23208051 -1.67350086 -0.69314718 -0.69314718 -0.69314718
[7,] 0.65019230 -0.69314718 -0.69314718 0.00000000 -0.69314718 -0.69314718 -0.69314718 -0.83831813
[8,] -0.69314718 -1.02941490 0.24521446 -0.51923160 0.70448750 -0.92141541 -0.39446657 -0.69314718
[9,] -0.69314718 0.78544276 -1.07959543 -0.31569561 0.00000000 -0.69314718 -0.41726847 -1.07638525
[10,] -2.18045807 -0.69314718 -0.69314718 -0.09438431 -0.69314718 -0.69314718 -0.52225684 -0.69314718
[11,] -1.13345378 -0.69314718 -0.69314718 -0.69314718 -0.69314718 0.00000000 -0.69314718 -0.69314718
[12,] -0.69314718 -0.07752616 0.75297756 -0.70932187 -1.29247942 -0.69314718 -1.16271607 -0.69314718
[13,] -0.69314718 0.42602361 -0.69314718 -0.69314718 -0.69314718 -0.63870680 0.00000000 -0.26198734
[14,] -1.32927940 1.33887052 -0.69314718 -2.48372023 -0.69314718 -0.69314718 -0.77020693 0.30734772
[15,] -0.66266332 -0.69314718 -1.48783308 -0.69314718 -2.53087373 -0.69314718 -0.69314718 0.00000000
[16,] -0.69314718 -0.24674200 -0.37334587 0.20646667 0.20644779 0.44214276 -0.97825823 0.16541204
[17,] -0.69314718 -2.09403105 -0.69314718 0.27596250 -0.69314718 -0.69314718 0.26768861 -0.69314718
[18,] -0.69314718 -0.69314718 -0.69314718 -0.45624217 -0.69314718 -0.16532289 -0.07215700 -0.90184389
[19,] -1.78217690 -0.58990385 -0.03012941 0.22579768 -1.72213930 -0.69314718 -0.69314718 -0.69314718
[20,] -0.69314718 -0.69314718 -0.69314718 -0.69314718 -0.96693888 -0.69314718 -0.45836879 -0.36648404
[21,] -0.96213944 -0.69314718 -0.69314718 0.30967548 -1.53249777 -3.25208250 -0.01784844 -0.69314718
[22,] 0.00000000 -0.30245431 -2.49054270 -0.69314718 -1.02982957 -0.42251637 -1.17148034 -0.69314718
[23,] 0.48928177 -0.82736546 0.09247801 -0.69314718 -1.64021144 0.39032655 0.14503542 -0.69314718
[24,] -0.69314718 0.00000000 -0.92647805 -0.69314718 0.12504051 -0.69314718 -1.83455143 0.07763467
[25,] -0.69314718 -1.02844852 -0.69314718 -0.69314718 -0.08986541 -1.55928393 -2.63225181 0.87535452
[,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16]
[1,] -0.69314718 -0.908632208 0.00000000 -0.54603360 -0.69314718 -0.69314718 -0.15553816 -0.69314718
[2,] -2.99518224 -0.106565365 0.25015985 -0.69314718 -0.69314718 -3.72871701 -0.76987989 -0.69314718
[3,] 0.42150153 -1.745559975 -0.69314718 0.00000000 -0.69314718 -0.69314718 -0.50043286 0.29863460
[4,] 0.52197259 -0.693147181 0.63076450 0.11439638 0.02741691 -0.69314718 -0.69314718 -0.69314718
[5,] 0.44334987 -0.693147181 -0.23859803 -0.69314718 0.00000000 -0.69314718 -0.69314718 -2.54691966
[6,] -1.08809542 0.110723515 -0.69314718 0.18370601 0.57842543 -0.23208051 -1.67350086 -0.69314718
[7,] -3.14153875 -0.259942990 0.65019230 -0.69314718 -0.69314718 0.00000000 -0.69314718 -0.69314718
[8,] 0.51899988 -0.693147181 -0.69314718 -1.02941490 0.24521446 -0.51923160 0.70448750 -0.92141541
[9,] -0.69314718 -0.964991005 -0.69314718 0.78544276 -1.07959543 -0.31569561 0.00000000 -0.69314718
[10,] 0.52437173 -0.607248622 -2.18045807 -0.69314718 -0.69314718 -0.09438431 -0.69314718 -0.69314718
[11,] -0.08125432 0.260460331 -1.13345378 -0.69314718 -0.69314718 -0.69314718 -0.69314718 0.00000000
[12,] -1.57342856 -0.693147181 -0.69314718 -0.07752616 0.75297756 -0.70932187 -1.29247942 -0.69314718
[13,] -0.69314718 -1.062747790 -0.69314718 0.42602361 -0.69314718 -0.69314718 -0.69314718 -0.63870680
[14,] -0.69314718 -0.693147181 -1.32927940 1.33887052 -0.69314718 -2.48372023 -0.69314718 -0.69314718
[15,] -0.69314718 0.001730542 -0.66266332 -0.69314718 -1.48783308 -0.69314718 -2.53087373 -0.69314718
[16,] 0.09256282 -0.636157646 -0.69314718 -0.24674200 -0.37334587 0.20646667 0.20644779 0.44214276
[17,] 0.00000000 -0.693147181 -0.69314718 -2.09403105 -0.69314718 0.27596250 -0.69314718 -0.69314718
[18,] -0.69314718 -0.693147181 -0.69314718 -0.69314718 -0.69314718 -0.45624217 -0.69314718 -0.16532289
[19,] -0.591232


Related Solutions

Hi I'm having a hard time understand this can someone please explain it to me? Thank...
Hi I'm having a hard time understand this can someone please explain it to me? Thank you. Cholesterol is a type of fat found in the blood. It is measured as a concentration: the number of milligrams of cholesterol found per deciliter of blood (mg/dL). A high level of total cholesterol in the bloodstream increases risk for heart disease. For this problem, assume cholesterol in men and women follows a normal distribution, and that “adult man” and “adult woman” refers...
Using PowerShell ISE or VSCode, create a PowerShell script that will do the following: You are...
Using PowerShell ISE or VSCode, create a PowerShell script that will do the following: You are going to create an HTML web page report from a standard processed report. You will use the text file “STUDENTS.TXT” located on Canvas. The script must meet the following requirements: The output file should be named ITS3410-{your name}.htm Every line of data that has a student number (9999-9999) must be included in the report All data must be trimmed No leading white space No...
Hi, I'm having trouble understanding "symbolic microprogram" in Computer Organization and Architecture 2. Can someone please...
Hi, I'm having trouble understanding "symbolic microprogram" in Computer Organization and Architecture 2. Can someone please solve any example and explain it in details so I can understand it? Thank you in advance. NOTE: Please use Computer System Architecture (3rd edition)
Using PowerShell ISE or VSCode, create a PowerShell script that will do the following: Create functions...
Using PowerShell ISE or VSCode, create a PowerShell script that will do the following: Create functions to get the following information Local username Local machine name Time zone Current Date Output the data that was collected to the screen Upload the script. Paste a screenshot of the results here
Using the R script, answer the following questions. Please show all works for full credit. 1....
Using the R script, answer the following questions. Please show all works for full credit. 1. Suppose you invest $150,000 into your mutual fund account on January 1st, 2019. a) [5 points] What would the account balance be at the end of June, 2019 if the account carries a rate of return of 2% every month? b) [5 points] If you earn a 4% return in July and a 5% return in August, 2019, what would the account balance be...
Assignment 1 - IN PDF FORMAT Using R and Rstudio Pick a database from: data() Then...
Assignment 1 - IN PDF FORMAT Using R and Rstudio Pick a database from: data() Then preview the first 10 rows. Print the number of rows and columns - Print the names of the variables If you have row names, print them - work with the values for a field in your dataset. You can do it by dataset[[xx]] operator with xx can be the index of the field or the nae of the field. Now use dataset[xx] to get...
1. How to create a group of users using a PowerShell script. 2. how to create...
1. How to create a group of users using a PowerShell script. 2. how to create a file consisting a group of 3 new user name’s and passwords, 1 to a line in power shell. 3. How to write a script in power shell to delete specific group of users. Prove that it works.
Write a script in C that will do the following : 1. Create the directory ZHW3....
Write a script in C that will do the following : 1. Create the directory ZHW3. 2. Verify that the directory is created by display all information related to the directory and not just the name of the directory. 3. Assume that the input from the command is used to validate password strength. Here are a few assumptions for the password string. • Length – minimum of 8 characters. • Contain alphabets , numbers , and @ # $ %...
MATLAB is program Respond fast please a quiz Create a MATLAB script. Using nested for loops,...
MATLAB is program Respond fast please a quiz Create a MATLAB script. Using nested for loops, evaluate the multivariable function: z = sin ⁡ ( x ) cos ⁡ ( y ) for x between -4 and 4 in steps of 1 y between -2 and 2 in steps of 1 Display the matrix z Cut and paste the following into a word doc and submit to this question. Your script code Your input Your output
Hi all, Can someone please answer this question. Please list steps! Thanks! You have the chance...
Hi all, Can someone please answer this question. Please list steps! Thanks! You have the chance to participate in a project that produces the following cash flows: Cash Flows ($) C0 C1 C2 3,900 5,100 –10,900 a. The internal rate of return is 14.13%. If the opportunity cost of capital is 14%, what is the NPV of the project? (A negative answer should be indicated by a minus sign. Do not round intermediate calculations. Round your answer to 2 decimal...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT