You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am fitting a causal forest with 2 treatment arms and want to use the best_linear_projection() function to estimate the regression coefficients on the treatment and control groups separately. When I make a separate matrix corresponding to the observations solely in the treatment group, I get an error Error in best_linear_projection(mycrf, A = treat_covar[, 2:ncol(treat_covar)]) :
The number of rows of A does not match the number of training examples.
Any ideas?
The text was updated successfully, but these errors were encountered:
That error message tells you that the number of rows in treat_covar is different from the number of samples used to train mycrf. BLP fits a linear model to $\tau(X)$. If you want to fit a linear model to either a) $E[Y_i(1)|X_i]$ or b) $E[Y_i(0)|X_i]$ you could construct doubly robust scores for those and run a linear model similarily to how BLP does it under the hood. policytree does the DR score calculation for a and b here
I am fitting a causal forest with 2 treatment arms and want to use the best_linear_projection() function to estimate the regression coefficients on the treatment and control groups separately. When I make a separate matrix corresponding to the observations solely in the treatment group, I get an error Error in best_linear_projection(mycrf, A = treat_covar[, 2:ncol(treat_covar)]) :
The number of rows of A does not match the number of training examples.
Any ideas?
The text was updated successfully, but these errors were encountered: