Turning to the matching package, we will look at an example using GenMatch .
We read that the created Weight Matrix is a matrix whose diagonal corresponds to the weight given by each variable in X
But we are not sure what the generated values ββare - are they related to the standard deviation.
Let's take an example presented in GenMatch
library(Matching) data(lalonde) attach(lalonde)
Then we can print Weight.matrix which will be used later for data pairing.
genout$Weight.matrix
And in particular, the value assigned to age
genout$Weight.matrix[1,1]
We get a value of ~ 205. But what does this weight mean or represent?
Further, if we want to randomize the order of the data, the value is constantly changing.
n <- 100 P1 <- rep(NA, n) for (i in 1:n) { lalonde <- lalonde[sample(1:nrow(lalonde)), ]
The author also suggests that additional information may be useful, but it does not explain what weight matrix values ββare. Can someone interpret them or understand why their value changes when the data order is changed
lukeg source share