| spdata.df {QRMlib} | R Documentation |
The spdata.df data.frame has 100 rows and 4 columns.
It contains default data for A, BBB, BB, B and C-rated companies for the years 1981 to 2000
data(spdata)
a matrix containing 100 rows and 4 columns.
The colums are:
| year | year of default |
| rating | rating category (A, BBB, BB, B, CCC) |
| firms | number of companies in rating category |
| number of defaults | number of companies defaulting in category |
The rows are the years from 1981-2000
documentation by Scott Ulman for R-language distribution
Standard and Poors Credit Monitor
#Easier to use data.frame than timeSeries for this set
data(spdata.df);
#the data being used is spdata.df which has 100 rows and 4 columns:
#'year', 'rating', 'firms', defaults'
#Must attach MASS and nlme libraries to run mixed effect regression model
library(MASS);
library(nlme);
#Use R- library MASS to get glmmPQL which runs a mixed-effects model.
#It will measure random effects and fixed effects.
#'year' -'ratings' determine the unique results(20 years 1981-2000 with 5 obligor
#class ratings each year)
results <- glmmPQL(cbind(defaults,firms-defaults) ~ -1 + rating,
random = ~1| year, family=binomial(probit), data=spdata.df);
results;
summary(results);
summary(results)$tTable[,1];
rm(spdata.df);
detach("package:nlme");
detach("package:MASS");