Changelog
Source:NEWS.md
causalgenerics 0.0.0.9000
Added
new_causal_wts(), the low-level constructor for the abstractcausal_wtsweight class that concrete weight classes in the ecosystem are built on.Added
causal_wtsmethods foris_causal_wt(),estimand(), andestimand<-(), so a concrete class inherits all three.Added
causal_wtsmethods for the read-only operations that name no metadata field and so give the answer the underlying double would:vec_math(), theSummarygroup generic,min(),max(),range(),median(),quantile(),summary(),anyDuplicated(),diff(),[, and the six comparison operators. Most of them unwrap the weights and hand the work to the base or vctrs implementation;[instead delegates to the next method, except when the index is a matrix or an array. Either way, the concrete class’s ownvec_restore()stays in charge of the metadata wherever the result is still a weight vector.Added
ess.default(), which computes the Kish effective sample size for any numeric vector. Weight vectors are numeric underneath, so a concrete weight class inherits a workingess()without writing a method. The default rejects input that is not numeric, includingNULL, and returnsNaNfor numeric input with no information to summarize, such as a zero-length vector or weights that are all zero.Added
causal_wts_ptype2(), the coercion rule that a concrete weight class calls from its ownvec_ptype2()method for two vectors of that class: they combine only when their estimands are identical, and otherwise the common type is a plain double. The condition signalled on the downgrade path stays with the caller.Added
new_ipw(), the low-level constructor for the object everyipw()method returns, together withprint()andas.data.frame()methods for theipwclass. The field names and their order are now a cross-package contract, so an IPW estimate reads the same way whichever package produced it and a package supplying anipw()method inherits both methods rather than writing its own.as.data.frame()gains anexponentiateargument that moves thelog(rr)andlog(or)rows to their natural scale, exponentiating the point estimate and the confidence limits only. Standard errors, z statistics, and p-values stay on the log scale, where the inference is done.
causalgenerics 0.0.0.9000
- Initial release with the shared generics
ipw(),ess(),is_causal_wt(),estimand(), andestimand<-().