I want to perform a regression with YieldSpread as dependent variable and the others as the regressors with the following dataset:
I decide between a fixed effects or random effects model and therefore have to run both regressions and then with a Hausman test determine which one is more suitable. I have used the following command to get started:
xtset id Year
panel variable: id (strongly balanced)
time variable: Year, 2012 to 2017
delta: 1 unit
For the following variables (IncomeToSales, DebtToAssets and TDebtToCap), i want to use the values of the previous year. So, in the regression for YieldSpread in 2017, i want to use the values for the accounting ratios in 2016.
I was wondering if the following command is correct to use:
I have to do the same for the random effects regression.
Thanks in advance.
Code:
id str20 Name str12 Code float Year double YieldSpread float BidAskSpread double Maturity float RatingScale str3 Currency double(IncomeToSales DebtToAssets TDebtToCap GovernmentBond TermSlope) float Volatility 1 "TORONTO-DOMINION " "US89114QBT40" 2012 . . . . "" .2416 .0167 .6365 . . . 1 "TORONTO-DOMINION " "US89114QBT40" 2013 . . . 4 "USD" .222 .009300000000000001 .6211 .1167 2.6462 . 1 "TORONTO-DOMINION " "US89114QBT40" 2014 . . . 4 "USD" .25 .008100000000000001 .6409 .2183 1.5046 . 1 "TORONTO-DOMINION " "US89114QBT40" 2015 . . . 4 "USD" .2443 .0078000000000000005 .631 .6023 1.2194999999999998 . 1 "TORONTO-DOMINION " "US89114QBT40" 2016 . . . 4 "USD" .26 .009300000000000001 .5561 .8157 1.2539000000000002 . 1 "TORONTO-DOMINION " "US89114QBT40" 2017 39.664705882352955 .0011229017 3.699438365540585 4 "USD" .273 .0074 .6399 .8157 1.2539000000000002 .000878475 2 "NATIONAL BK.OF ADB." "XS1587035996" 2012 . . . . "" .3975 .0635 .6561 . . . 2 "NATIONAL BK.OF ADB." "XS1587035996" 2013 . . . 4 "USD" .41960000000000003 .0575 .6433 .1167 2.6462 . 2 "NATIONAL BK.OF ADB." "XS1587035996" 2014 . . . 4 "USD" .44799999999999995 .039900000000000005 .6517000000000001 .2183 1.5046 . 2 "NATIONAL BK.OF ADB." "XS1587035996" 2015 . . . 4 "USD" .41 .054900000000000004 .7005 .6023 1.2194999999999998 . 2 "NATIONAL BK.OF ADB." "XS1587035996" 2016 . . . 4 "USD" .3814 .0696 .6709999999999999 .8157 1.2539000000000002 . 2 "NATIONAL BK.OF ADB." "XS1587035996" 2017 116.25680473372785 .0012963397 5.246324060270222 4 "USD" .4217 .1474 .57 .8157 1.2539000000000002 .001854932 3 "INVERSIONES CMPC SA " "USP58072AL66" 2012 . . . . "" 0 0 0 . . . 3 "INVERSIONES CMPC SA " "USP58072AL66" 2013 . . . 10 "USD" .1175 .3342 .43320000000000003 .1167 2.6462 . 3 "INVERSIONES CMPC SA " "USP58072AL66" 2014 . . . 10 "USD" .1106 .34990000000000004 .47350000000000003 .2183 1.5046 . 3 "INVERSIONES CMPC SA " "USP58072AL66" 2015 . . . 10 "USD" .12380000000000001 .2669 .34600000000000003 .6023 1.2194999999999998 . 3 "INVERSIONES CMPC SA " "USP58072AL66" 2016 . . . 10 "USD" .0437 .2621 .3488 .8157 1.2539000000000002 . 3 "INVERSIONES CMPC SA " "USP58072AL66" 2017 197.32331288343573 .0039179944 10.2593288515091 10 "USD" .08310000000000001 .203 .3674 .8157 1.2539000000000002 .0025837654
I decide between a fixed effects or random effects model and therefore have to run both regressions and then with a Hausman test determine which one is more suitable. I have used the following command to get started:
xtset id Year
panel variable: id (strongly balanced)
time variable: Year, 2012 to 2017
delta: 1 unit
For the following variables (IncomeToSales, DebtToAssets and TDebtToCap), i want to use the values of the previous year. So, in the regression for YieldSpread in 2017, i want to use the values for the accounting ratios in 2016.
I was wondering if the following command is correct to use:
Code:
xtreg YieldSpread BidAskSpread Maturity RatingScale L.IncomeToSales L.DebtToAsses L.DebtToCap GovernmentBond Termslope Volatility, fe
Thanks in advance.
Comment