Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

By using R studio R commands Thank you Below is the file capm4.csv I want to kno

ID: 1142034 • Letter: B

Question

By using R studio R commands Thank you

Below is the file capm4.csv

I want to know b,c,d !! except a !!!

Plz comment with R code

"date","dis","ge","gm","ibm","msft","xom","mkt","riskfree"
19980130,0.080884,0.056218,-0.046296,-0.056153,0.154255,-0.030644,0.004529,0.05025
19980227,0.047368,0.003226,0.19849,0.05962,0.136154,0.081728,0.07323,0.05122
19980331,-0.046343,0.112379,-0.017226,-0.005386,0.056047,0.060784,0.051322,0.0523
19980430,0.168337,-0.011603,-0.005535,0.115523,0.006983,0.080407,0.010862,0.04728
19980529,-0.090818,-0.021277,0.074212,0.015922,-0.058946,-0.029461,-0.025755,0.04567
19980630,-0.072296,0.089955,-0.070435,-0.022872,0.277819,0.012411,0.031954,0.04703
19980731,-0.015158,-0.012517,0.08232,0.154056,0.014418,-0.015762,-0.023264,0.04745
19980831,-0.203267,-0.105521,-0.189283,-0.14834,-0.127345,-0.062669,-0.157667,0.04691
19980930,-0.075171,-0.001719,-0.055914,0.140954,0.147231,0.079274,0.063836,0.04028
19981030,0.063645,0.099764,0.151481,0.155642,-0.038047,0.014159,0.074357,0.03552
19981130,0.194896,0.032857,0.113749,0.113434,0.152302,0.052845,0.061986,0.04442
19981231,-0.067961,0.132503,0.02415,0.116578,0.136783,-0.025,0.063053,0.04394
19990129,0.1,0.028186,0.254148,-0.006102,0.26183,-0.039316,0.038346,0.04409
19990226,0.066288,-0.043504,-0.074513,-0.072469,-0.142143,-0.046655,-0.038105,0.04506
19990331,-0.115453,0.106293,0.054353,0.044183,0.194005,0.060094,0.037862,0.04558
19990430,0.02008,-0.047458,0.023707,0.180183,-0.092748,0.177148,0.049,0.04452
19990528,-0.082677,-0.034994,-0.071253,0.1102,-0.007686,-0.033439,-0.02072,0.0442
19990630,0.05794,0.111248,-0.043478,0.114224,0.117738,-0.034429,0.05102,0.04438
19990730,-0.105477,-0.032301,-0.073864,-0.027563,-0.04851,0.029173,-0.030635,0.0445
19990831,0.006803,0.03039,0.092025,-0.007996,0.07866,-0.001134,-0.009983,0.045
19990930,-0.063063,0.058765,-0.05,-0.0286,-0.021607,-0.03645,-0.022867,0.04501
19991029,0.019231,0.142857,0.119166,-0.188017,0.022084,-0.025493,0.062048,0.04366
19991130,0.059811,-0.039668,0.029281,0.050204,-0.016374,0.076827,0.036856,0.04571
19991231,0.049327,0.192392,0.009549,0.046695,0.282306,0.01576,0.083925,0.05102
20000131,0.241453,-0.136511,0.108341,0.040556,-0.16167,0.035687,-0.039753,0.05386
20000229,-0.077453,-0.009355,-0.049651,-0.083563,-0.086845,-0.092105,0.03177,0.05314
20000331,0.231343,0.178735,0.088743,0.148418,0.188811,0.034855,0.053552,0.05856
20000428,0.05,0.010442,0.130566,-0.055085,-0.343529,-0.003208,-0.059467,0.0527
20000531,-0.031746,0.005167,-0.24032,-0.03583,-0.103047,0.078069,-0.039047,0.04675
20000630,-0.074516,0.005931,-0.177876,0.020373,0.278721,-0.057764,0.051649,0.05629
20000731,-0.003221,-0.026903,-0.019376,0.026241,-0.127344,0.019108,-0.017105,0.05875
20000831,0.006462,0.140948,0.276619,0.175142,0,0.025812,0.075811,0.06234
20000929,-0.017657,-0.014711,-0.099567,-0.147727,-0.136079,0.091884,-0.051139,0.0592
20001031,-0.063725,-0.049837,-0.044231,-0.124444,0.141969,0.000701,-0.024564,0.06027
20001130,-0.191972,-0.095781,-0.195171,-0.049442,-0.166969,-0.008381,-0.102546,0.06119
20001229,0.007257,-0.029559,0.02904,-0.090909,-0.244009,-0.012074,0.020346,0.05769
20010131,0.052268,-0.040834,0.054233,0.317647,0.407781,-0.032063,0.039533,0.04827
20010228,0.01642,0.011309,0.002235,-0.106875,-0.033777,-0.03161,-0.099267,0.05013
20010330,-0.075929,-0.096344,-0.027569,-0.037237,-0.073093,-0.000617,-0.07029,0.04432
20010430,0.057692,0.159341,0.057088,0.19713,0.238857,0.093827,0.083904,0.03742
20010531,0.045289,0.009685,0.047254,-0.027792,0.021107,0.006659,0.010561,0.03445
20010629,-0.086338,-0.005102,0.130931,0.010733,0.055218,-0.015549,-0.017481,0.03415
20010731,-0.08792,-0.10441,-0.011655,-0.068938,-0.093288,-0.043847,-0.018321,0.0364
20010831,-0.034915,-0.057931,-0.131289,-0.048665,-0.138087,-0.033046,-0.05908,0.03374
20010928,-0.267794,-0.088336,-0.216438,-0.082341,-0.103068,-0.01868,-0.09154,0.02378
20011031,-0.001611,-0.021237,-0.03683,0.17826,0.136408,0.001269,0.027967,0.02093
20011130,0.10113,0.057402,0.214908,0.07088,0.104213,-0.046134,0.078734,0.01728
20011231,0.022472,0.045714,-0.022133,0.046457,0.031771,0.050802,0.017841,0.01636
20020131,0.016409,-0.073104,0.052263,-0.108052,-0.03834,-0.006361,-0.01606,0.01689
20020228,0.092118,0.041184,0.045757,-0.089258,-0.084288,0.063508,-0.021705,0.01733
20020328,0.003478,-0.027273,0.140997,0.059927,0.033768,0.061259,0.044693,0.0171
20020430,0.004333,-0.157543,0.061208,-0.194615,-0.133477,-0.083505,-0.049649,0.01753
20020531,-0.011648,-0.012995,-0.023383,-0.037727,-0.025832,-0.000249,-0.010458,0.01689
20020628,-0.175033,-0.061336,-0.139984,-0.105034,0.074445,0.024793,-0.070243,0.01667
20020731,-0.061905,0.108434,-0.129093,-0.022222,-0.122852,-0.101662,-0.081137,0.017
20020830,-0.115623,-0.063665,0.038883,0.072869,0.022926,-0.02938,0.007984,0.01656
20020930,-0.034439,-0.176451,-0.187213,-0.226453,-0.108802,-0.100141,-0.099975,0.0157
20021031,0.103038,0.024341,-0.145244,0.353799,0.222451,0.055172,0.074958,0.0142
20021129,0.186826,0.074059,0.209023,0.10299,0.078736,0.040701,0.061276,0.01217
20021231,-0.166498,-0.095133,-0.071537,-0.108375,-0.103675,0.004023,-0.053309,0.01136
20030131,0.072961,-0.049692,-0.014379,0.009032,-0.082012,-0.02261,-0.02343,0.01146
20030228,-0.025143,0.047537,-0.056702,-0.001279,0.002107,0.002928,-0.015408,0.01195
20030331,-0.002345,0.060291,-0.004442,0.006158,0.021519,0.027337,0.010333,0.01141
20030430,0.096357,0.154902,0.072278,0.082494,0.055762,0.007153,0.082797,0.01093
20030530,0.053055,-0.025467,-0.006103,0.038869,-0.037167,0.041193,0.063507,0.01121
20030630,0.005089,0.005923,0.018964,-0.062926,0.041853,-0.013462,0.016332,0.00794
20030731,0.109873,-0.008368,0.039722,-0.015152,0.030031,-0.00919,0.02313,0.0088
20030829,-0.064781,0.039733,0.111408,0.011323,0.004165,0.06661,0.024908,0.00971
20030930,-0.016098,0.014542,-0.004136,0.077064,0.048265,-0.029178,-0.009102,0.00852
20031031,0.122459,-0.026837,0.042512,0.013019,-0.053957,-0.000546,0.060331,0.00915
20031128,0.019876,-0.01172,0.014296,0.013634,-0.01645,-0.003554,0.016607,0.009
20031231,0.019489,0.087548,0.248247,0.023636,0.064566,0.132597,0.045532,0.00827
20040130,0.028718,0.085539,-0.069663,0.070673,0.01023,-0.005122,0.023064,0.00827
20040227,0.105417,-0.027059,-0.021337,-0.025899,-0.040506,0.039961,0.015467,0.00933
20040331,-0.058048,-0.061501,-0.021197,-0.04829,-0.060309,-0.013754,-0.010685,0.00923
20040430,-0.078431,-0.018676,0.006794,-0.039961,0.048135,0.023082,-0.02423,0.00809
20040528,0.019105,0.039065,-0.032265,0.006805,0.003827,0.022797,0.014127,0.00908
20040630,0.086067,0.047558,0.026438,-0.004967,0.08883,0.026821,0.021563,0.01129
20040730,-0.094155,0.026235,-0.07405,-0.012252,-0.002451,0.042558,-0.037681,0.01278
20040831,-0.027718,-0.013835,-0.03083,-0.025267,-0.038961,0.001512,0.002714,0.01441
20040930,0.004454,0.030192,0.028322,0.012398,0.012821,0.048373,0.020555,0.01458
20041029,0.118404,0.016081,-0.092514,0.046769,0.011573,0.018415,0.01781,0.01748
20041130,0.065821,0.036342,0.014008,0.052033,0.068645,0.046729,0.048243,0.02032
20041231,0.043155,0.038462,0.038093,0.046053,-0.003357,0.000195,0.03518,0.01908
20050131,0.029856,-0.010137,-0.081128,-0.052343,-0.016467,0.006633,-0.026557,0.02162
20050228,-0.024101,-0.019651,-0.01793,-0.007065,-0.039574,0.232171,0.022695,0.02497
20050331,0.028275,0.024432,-0.175596,-0.012962,-0.039348,-0.058601,-0.016937,0.02599
20050429,-0.0811,0.003882,-0.092208,-0.16415,0.046752,-0.043121,-0.025182,0.02711
20050531,0.039394,0.007735,0.200525,-0.008248,0.022925,-0.009469,0.037916,0.02751
20050630,-0.082362,-0.044134,0.078338,-0.017869,-0.037209,0.022598,0.011531,0.02985
20050729,0.018268,-0.004329,0.082941,0.124798,0.030998,0.022272,0.043331,0.03229
20050831,-0.017551,-0.025797,-0.057849,-0.031632,0.072237,0.024511,-0.005943,0.03341
20050930,-0.04208,0.008331,-0.104709,-0.004962,-0.060263,0.060768,0.010609,0.03186
20051031,0.009946,0.007128,-0.104868,0.020693,-0.001166,-0.116462,-0.020784,0.03696
20051130,0.022979,0.053377,-0.182482,0.088178,0.080156,0.038831,0.040406,0.03971
20051230,-0.027678,-0.011758,-0.113242,-0.075366,-0.055275,-0.032052,0.003476,0.03946
20060131,0.055903,-0.065621,0.238929,-0.010949,0.076482,0.117144,0.040112,0.04327
20060228,0.105887,0.011298,-0.14547,-0.010578,-0.042273,-0.048765,-0.001644,0.04424
20060331,-0.003573,0.058108,0.047267,0.027792,0.012653,0.025097,0.01906,0.04593
20060428,0.00251,-0.005463,0.075693,-0.001576,-0.112459,0.036477,0.012968,0.04613
20060531,0.090844,-0.00954,0.187937,-0.02599,-0.058385,-0.029328,-0.031042,0.04695
20060630,-0.016393,-0.030648,0.106201,-0.038548,0.028698,0.007224,-0.000396,0.04684
20060731,-0.010333,-0.008192,0.081907,0.00768,0.032618,0.104156,-0.001902,0.0504
20060831,-0.001347,0.041909,-0.086876,0.049864,0.071904,0.003691,0.025085,0.04965
20060929,0.042496,0.043746,0.139822,0.01198,0.064202,-0.008423,0.019452,0.04649
20061031,0.017794,-0.005382,0.04991,0.1268,0.049726,0.064382,0.037086,0.05151
20061130,0.05054,0.004842,-0.155785,-0.001191,0.026123,0.07995,0.023716,0.0498
20061229,0.046294,0.062642,0.050975,0.056897,0.01703,-0.002343,0.010823,0.04768
20070131,0.026262,-0.031174,0.06901,0.020587,0.03349,-0.033016,0.019438,0.05001
20070228,-0.026159,-0.023856,-0.021011,-0.059607,-0.083927,-0.02834,-0.013998,0.05143
20070330,0.005255,0.01289,-0.039498,0.014203,-0.01065,0.052595,0.012949,0.05051
20070430,0.015974,0.042421,0.019256,0.084341,0.074273,0.052087,0.039893,0.04755
20070531,0.01315,0.019533,-0.0317,0.046864,0.028393,0.052154,0.038894,0.04695
20070629,-0.023082,0.026078,0.26042,-0.012664,-0.039756,0.008537,-0.014758,0.04531
20070731,-0.033392,0.012539,-0.142857,0.051306,-0.016288,0.014902,-0.031753,0.05105
20070831,0.018182,0.002838,-0.043519,0.058202,-0.005519,0.011159,0.011623,0.04152
20070928,0.023512,0.072292,0.193884,0.009512,0.025409,0.079669,0.040903,0.03443
20071031,0.006979,-0.005797,0.067847,-0.014261,0.249491,-0.006158,0.025842,0.03982
20071130,-0.042737,-0.069728,-0.232457,-0.090768,-0.084216,-0.026959,-0.049279,0.03219
20071231,-0.015686,-0.023766,-0.165605,0.027762,0.059524,0.050808,-0.004342,0.02858
20080131,-0.075589,-0.046129,0.133387,-0.009158,-0.08427,-0.07781,-0.062305,0.01664
20080229,0.086126,-0.054016,-0.165899,0.066754,-0.162273,0.011111,-0.02204,0.0207
20080331,-0.03178,0.116777,-0.181701,0.011242,0.043386,-0.027928,-0.01047,0.01238
20080430,0.033461,-0.116455,0.217848,0.048289,0.004933,0.100378,0.051144,0.01258
20080530,0.036078,-0.060551,-0.252155,0.076471,-0.003156,-0.042011,0.023825,0.01948
20080630,-0.071429,-0.121094,-0.327485,-0.084215,-0.028602,-0.007098,-0.078625,0.01694
20080731,-0.027244,0.059948,-0.037391,0.079727,-0.065067,-0.087371,-0.01315,0.01583
20080829,0.065898,-0.006716,-0.096658,-0.044929,0.065319,-0.000249,0.011042,0.01664
20080930,-0.051314,-0.081495,-0.055,-0.039185,-0.021986,-0.029371,-0.09806,0.00964
20081031,-0.155751,-0.234902,-0.387302,-0.205113,-0.163357,-0.045583,-0.184726,0.00254
20081128,-0.130837,-0.119939,-0.094991,-0.116919,-0.08867,0.086751,-0.085206,3e-04
20081231,0.023091,-0.038439,-0.389313,0.031373,-0.038576,-0.003993,0.021482,3e-04

(b) In the data file capm4.dat are data on the monthly returns of six firms (Microsoft, Gi, (M, M Dincy, and Mobil Exxthe raic of rciurn on the markci portfolio (MKT), and the rate ofreturn on the risk free asset (RISKFREE). The 132 observations cover January 1998 to December 2008. Estimate the CAPM model for each firm, and comment on their estimated beta values. Which firm appears most aggressive? Which firm appears most defensive? c) Finance theory says that the intercept parameter aj should be zero. Does this seem correct given your estimates? For the Microsoft stock, plot the fitted regression line along with the data scatter. (d) Estimate the model for each firm under the assumption that a0. Do the estimates of the beta values change much?

Explanation / Answer

Er is the expected return on security,rf is the free rate,beta is the security's beta and e is expected rate of return of the market.