ERAWeight.Rd
This simple function will weight ERA observations based on replicates (Reps
column) and the number of observations contributed by a study (N.Obs.Study
)
within combinations of the grouping variables specified.
ERAWeight(Data, Grouping.Cols)
ERAWeights returns the input data.table
with two appended columns:
N.Obs.Study
= the number of observations contributed by a study (i.e., Code
) within combinations of the grouping variables specified.
Weight.Study
= a numeric weighting.
For each observations weightings are calculated using the formula (Rep^2/(2*Rep))/N.Obs.Study
where Rep
is the number of experimental replicates
and N.Obs.Study
is the number of observations contributed from the observation's study for the grouping variables provided.