最近正在用R语言做Cox regression, 但是因为database中每个个体的权重都不是1,所以需要用到weight analysis。
之前有查找过一些R的说明文档,关于这部分的解释如下“vector of case weights. If weights is a vector of integers, then the estimated coefficients are equivalent to estimating the model from data with the individual cases replicated as many times as indicated by weights.”但是这个描述不是非常清晰,我无法从中判断这里的weight vector必须是integer,还是这里它只是拿weight是integer作为一个举例~