Changes between Initial Version and Version 1 of fmsbパッケージマニュアル (A manual for the fmsb package」


Ignore:
Timestamp:
Nov 17, 2016, 9:39:41 PM (7 years ago)
Author:
admin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • fmsbパッケージマニュアル (A manual for the fmsb package」

    v1 v1  
     1fmsbパッケージマニュアル (A manual for the fmsb package)
     2fmsbパッケージはCRANに登録されていますので,CRANからinstall.packages("fmsb")としてインストールすることをお薦めします。
     3
     4
     5{{{
     6一覧表 (a list of datasets and functions)
     7
     8日本の人口データ(Demographic data of Japan)
     9以下6つのデータフレームと1つの数値ベクトルは,library(fmsb)またはrequire(fmsb)としただけで利用可能になる。
     10
     11The 6 dataframes and a numeric vector below become available just when you load this library by library(fmsb) or require(fmsb).
     12
     13JASM    日本の死亡データ
     14Japanese mortality data
     15Jlife   日本の完全生命表
     16Complete life tables in Japan
     17Jfert   日本の年齢別出生率及び年齢別有配偶出生率
     18Age-specific fertility rates and age-specific marital fertility rates in Japan
     19Jpop    センサスによる日本の人口構造データ(「0歳」~「85歳以上」まで)
     20Census-based Japanese population structure data (age 0 to "85+")
     21Jpopl   センサスによる日本の人口構造データ(「0歳」~「110歳以上」まで)
     22Census-based Japanese population structure data (age 0 to "110+")
     23Jvital  日本のいくつかの人口動態統計についての長期データ
     24Longitudinal data of several vital statistics in Japan
     25Jvital2013byPref        日本のいくつかの人口動態統計について,2013年の都道府県別データ
     26Cross sectional data of several vital statistics in Japan for each prefecture in 2013
     27S60MPJ  昭和60年(1985年)の日本人の年齢5歳階級別基準人口
     28Model standard population structure of Japan in Showa 60 (1985)
     29
     30
     31グラフの描画(Drawing special graphs)
     32以下の描画関数では標準の低レベル関数しか使っていないので,すべてのグラフィックデバイスに出力できるはずである。ただしpar(cex=2)などは利くものと利かないものが存在するので注意されたい。詳しくは個別の関数の説明を参照されたい。
     33
     34Since only standard low-level functions are used in the drawing functions below, the graphs may be drawn in any graphic device. However, please pay attention to the fact that the effectiveness of par(cex=2) varies case by case. Please read the explanations of each function linked below.
     35
     36gstem   幹葉表示をグラフィックデバイスに出力する
     37Draw the stem and leaf plot in a graphic device.
     38mhchart 出産暦図(see, Wood JW, 1994)を描く
     39Draw maternity history charts.
     40plot.roc        ROC分析の結果としてのrocクラスオブジェクトをROC曲線として描画する
     41Calculate Receiver Operating Characteristic (ROC) curve
     42pvalueplot      p値関数を描く
     43Drawing p-value function plot by a cross table
     44radarchart      レーダーチャート(スパイダープロット,蜘蛛の巣図とも呼ばれる)を描く
     45Drawing radar chart (a.k.a. spider plot)
     46
     47
     48人口モデルに関連する関数群(Functions related to demographic models)
     49いくつかの人口モデルの関数定義を含む,人口分析に関連した関数群。生命表関連の関数群の中では,lxがl(0)=100000であることに注意。
     50
     51Several functions related to demographic analyses, especially including the definitions of demographic models. Among lifetable functions, note that l(0) is 100000 for lx.
     52
     53GompertzMakeham 3パラメータのGompertz-Makehamモデルの死力関数μ(x)を返す
     54The force of mortality μ(x) generated by the 3 parameters Gompertz-Makeham model.
     55fitGM   optim()関数によりGompertz-Makehamモデルのqxへの当てはめの残差の平均平方和の平方根(RMSE)を最小にするパラメータを自動探索する
     56Automatically find the parameters which minimize the root mean square error (RMSE) of fitting Gompertz-Makeham model into qx, using optim().
     57Siler   5パラメータのSilerモデルのqxを返す
     58qx generated by the 5 parameters Siler model.
     59fitSiler        optim()関数によりSilerモデルのqxへの当てはめの残差の平均平方和の平方根(RMSE)を最小にするパラメータを自動探索する
     60Denny   3パラメータのDennyモデルのl(x)を返す。l(0)は100000であることに注意。
     61Returns l(x) of Denny's model with 3 parameters. Note that l(0) is 100000.
     62fitDenny        optim()関数によりDennyモデルのlxへの当てはめの残差の平均平方和の平方根(RMSE)を最小にするパラメータを自動探索する
     63CM      3パラメータのCoale-McNeilモデルによる年齢別初婚確率と既婚率を返す
     64fitCM   optim()関数によりCoale-McNeilモデルの年齢別初婚確率または既婚率データへの当てはめの残差の平均平方和の平方根(RMSE)を最小にするパラメータを自動探索する
     65CT      2パラメータのCoale-Trussellモデルによる年齢別有配偶出生率(ASMFR)を返す
     66fitCT   optim()関数によりCoale-TrussellモデルのASMFRデータへの当てはめの残差の平均平方和の平方根(RMSE)を最小にするパラメータを自動探索する
     67Hadwiger        3パラメータのHadwigerモデルによる年齢別出生率(ASFR)を返す
     68fitHad  optim()関数によりHadwigerモデルのASFRデータへの当てはめの残差の平均平方和の平方根(RMSE)を最小にするパラメータを自動探索する
     69lxtodx 
     70Convertion function from lx to dx.
     71dxtolx 
     72Convertion function from dx to lx.
     73qxtodx 
     74Convertion function from qx to dx.
     75dxtoqx 
     76Convertion function from dx to qx.
     77qxtomx 
     78Convertion function from qx to mx.
     79mxtoqx 
     80Convertion function from mx to qx.
     81qxtolx 
     82Convertion function from qx to lx.
     83lxtoqx 
     84Convertion function from lx to qx.
     85uxtoqx  μ(x)を返すGompertz-Makehamモデルを,生命表データに当てはめるためにqxに変換する
     86Converting μ(x), mainly returned by Gompertz-Makeham model function GompertzMakeham(), into qx for fitting with lifetable data.
     87lifetable       mxが与えられると生命表全体を計算しデータフレームとして返す
     88For given mx, calculating the whole lifetable and return it as a dataframe.
     89lifetable2      mxが与えられると生命表全体を計算しデータフレームとして返す。axやnの柔軟な与え方が可能。
     90For given mx, calculating the whole lifetable and return it as a dataframe. It's possible to specify irregular ax and n.
     91lifetable3      lxが与えられると生命表全体を計算しデータフレームとして返す
     92For given mx, calculating the whole lifetable and return it as a dataframe.
     93clifetable      qxが与えられると生命表全体を計算しデータフレームとして返す
     94For given qx, calculating the whole lifetable and return it as a dataframe.
     95
     96
     97補足的な計算のためのツール群(Tools for supplemental calculation)
     98非常にプリミティブなものもあるが,もしかすると役に立つかもしれないツール群
     99
     100Some of the functions listed below may be very primitive, but there may be somewhat usefulness.
     101
     102CronbachAlpha   尺度の信頼性係数の1つであるクロンバックのα係数を計算する
     103Calculate Cronbach's alpha coefficient.
     104geary.test      尖度に注目した分布の正規性の検定の1つであるギアリーの検定を実行する
     105Geary's test for normality about kurtosis.
     106Kappa.test      一致度についてのコーエンのカッパ係数を計算し,その簡易評価を提示し,統計学的有意性を検定する
     107Calculate Cohen's kappa statistics for agreement
     108NagelkerkeR2    ロジスティック回帰分析でモデルの説明力を示すのによく使われる,NagelkerkeのR2を計算する
     109Calculate Nagelkerke's R squared.
     110oddsratio       オッズ比と信頼区間を計算する
     111Calculate odds ratio and its confidence intervals
     112pairwise.fisher.test    比率の差についての多重比較をする目的で,pairwise.prop.test()のカイ二乗検定の代わりにFisherの直接確率検定を使うようにした関数
     113Exact version of pairwise.prop.test
     114percentile      数値ベクトルをパーセンタイル値に変換する
     115Convert numeric vector into its percentile
     116ratedifference  率差と信頼区間を計算する
     117Calculate incidence rate difference and its confidence intervals
     118rateratio       率比と信頼区間を計算する
     119Calculate incidence rate ratio and its confidence intervals
     120print.roc       ROC分析の結果としてのrocクラスオブジェクトをコンソールに表示する
     121Calculate Receiver Operating Characteristic (ROC) curve
     122riskdifference  リスク差と信頼区間を計算する
     123Calculate risk difference and its confidence intervals
     124riskratio       リスク比と信頼区間を計算する
     125Calculate risk ratio and its confidence intervals
     126roc     ROC分析を行い,結果をrocクラスのオブジェクトとして返す
     127Calculate Receiver Operating Characteristic (ROC) curve
     128SIQR    fivenum()関数に基づき四分位偏差(SIQR)を計算する。Rに入っているIQR()関数はquantile()関数を使うので,結果が異なる
     129Calculate semi-interquartile range
     130truemedian      同順位がある場合にGrimm (1993)に説明されている真の中央値を計算するための関数
     131Calculate true median for data with ties.
     132VIF     多重共線性のチェックのため,VIFを計算する
     133Calculate variance inflation factor (VIF) from the result of lm.
     134}}}