-
Notifications
You must be signed in to change notification settings - Fork 14
Closed
Description
As applied to a DenseMatrix, dimnames() returns a list of two character vectors, "treatment" and "control". As applied to an InfinitySparseMatrix, dimnames() returns a list of two character vectors, "treated" and "control". The two lists should have the same two names.
data(nuclearplants)
match_on.examples <- list()
### Propensity score distances.
### Recommended approach:
(aGlm <- glm(pr~.-(pr+cost), family=binomial(), data=nuclearplants))
match_on.examples$ps1 <- match_on(aGlm)
is(match_on.examples$ps1)
## [1] "DenseMatrix" "matrix" "array" "structure" "vector"
names(dimnames(match_on.examples$ps1))
## [1] "treatment" "control"
tmp <- nuclearplants$t1
names(tmp) <- rownames(nuclearplants)
absdist <- match_on(tmp, z = nuclearplants$pr,
within = exactMatch(pr ~ pt, nuclearplants))
is(absdist)
## [1] "BlockedInfinitySparseMatrix" "InfinitySparseMatrix"
## [3] "vector"
names(dimnames(absdist))
## [1] "treated" "control"Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels