导航

    精算后花园

    • 注册
    • 登录
    • 搜索
    • 版块
    • 最新
    • 话题
    • 热门
    • 用户
    • 群组
    1. 主页
    2. Nothanks
    3. 最佳
    N
    • 资料
    • 关注
    • 粉丝
    • 主题
    • 帖子
    • 最佳
    • 群组

    Nothanks 发布的最佳帖子

    • RE: 【快乐自动化】如何用R连接数据库并批量导入数据

      第二步:连接数据库

      这里用了DBI和odbc包。验证方式是"Windows Authentication",也就是用系统的用户信息来登录数据库。

      library(DBI)
      library(odbc)
      
      con <- dbConnect(odbc::odbc(), 
                       Driver = "SQL Server", 
                       Server = "my server name", #这里替换成自己的Server名字 
                       Database = "DataBase", #这里替换成自己的DataBase名字 
                       Trusted_Connection = "True")
      
      发布在 R
      N
      Nothanks
      2021年8月29日 13:39
    • RE: 寿险精算中的 mx 代表什么?

      转自 https://www.acted.co.uk/forums/index.php?threads/central-rates-of-mortality.4540/
      qx is the initial rate of mortality. This measures the number of deaths divided by the number of lives alive at age x. The problem with this is that it assumes that there are "lx" person years lived between age x->x+1 (Obviously lives will die durring the year of age, and not be exposed to risk for the whole year). mx is the same thing, but it is dx divided by the expected number of person years lived between ages x->x+1. This is Integral from 0-1 lx+tdt. The meaning of the two is very different. qx is the probability a life now aged x dies within the next year given alive at time x. mx is the probability a life aged anywhere between x,x+1 dies before attaining age x+1. I dont think it's used very much in actuarial calculations but it is handy in dermograpic/population studies because of the nice property that mx∗ExC for any age equals the number of deaths, this is not true for qx (Try this for yourself).

      发布在 CM1利息理论和寿险精算
      N
      Nothanks
      2020年5月27日 14:34
    • RE: 【文献求助】understanding actuarial management

      @yuk FYI
      Understanding Actuarial Management Part I.pdf
      Understanding Actuarial Management Part II.pdf
      Understanding Actuarial Management Part III.pdf
      Understanding Actuarial Management Part IV.pdf
      Understanding Actuarial Management Part V.pdf
      Understanding Actuarial Management Part VI.pdf

      发布在 CP1-3
      N
      Nothanks
      2020年6月14日 01:10
    • RE: 【快乐自动化】如何用R连接数据库并批量导入数据

      第三步:写入数据库,这里用了tryCatch来让程序不会在产生Error的情况下停止

      
      for(i in 1:length(ldf)){
        tryCatch(
          data <-dbWriteTable(con, names(res)[i], data.frame(ldf[i]))
          ,
          error = function(e){
            message("An error occurred:\n", e)
          },
          warning = function(w){
            message("A warning occured:\n", w)
          },
          finally = {
            message("Finally done!")
          })
        }
      
      
      发布在 R
      N
      Nothanks
      2021年8月29日 13:52
    • RE: 不太常见的换算函数(Commutation function)

      这个现在也就只有理论意义了吧。。。现在工作还用得着换算函数吗??计算能力都上来了,Excel算一下不就行了?

      发布在 CM1利息理论和寿险精算
      N
      Nothanks
      2020年6月3日 13:59