[R] How does the cm function under package "actuar" works?

chris123 chris_kats1 at hotmail.com
Thu Aug 9 12:35:14 CEST 2012


Dear all, 

I have a question about how the function "cm" works? It can be found under
the package actuar. 
In particular, I want to use it to apply the Buhlmann-Straub model into some
data.

I am using the example that R has in the help page for cm.
I use the dataset hachemeister and then the code:

fit<-cm(~state, hachemeister,
   ratios = ratio.1:ratio.12, weights = weight.1:weight.12)
predict(fit)
summary(fit)

However before knowing the existence of this build-in function I have wrote
my own function, based on an example from a book (I get the same results as
the book) but I dont get the same results as when using the cm function!

Does anybody know how this function works? For example, how does it produce
the weights for the next period? is it random data? 

Thank you in advance!!
Chris





--
View this message in context: http://r.789695.n4.nabble.com/How-does-the-cm-function-under-package-actuar-works-tp4639742.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list