tmlenet icon indicating copy to clipboard operation
tmlenet copied to clipboard

tmlenet def_sW and def_sA functions

Open statbuchs opened this issue 1 year ago • 0 comments

I loaded the package from Github (as not currently on CRAN) and the version is 0.1.9. For the function tmlenet, there are warnings when using IDnode and NETIDnode. The function runs without the warning if I use NETIDmat.

Warning messages: 1: In [.data.table(OdataDT_R6$OdataDT, , :=(NETIDnode, NULL)) : Column 'NETIDnode' does not exist to remove 2: In [.data.table(OdataDT_R6$OdataDT, , :=(IDnode, NULL)) : Column 'IDnode' does not exist to remove

For this call below (from '1_tmlenet_example.R'), produces warnings (7 total). One of the variables may be a constant, or input variables are not independent (need to check this).

res_K6_1 <- tmlenet(data = df_netKmax6, Kmax = Kmax, sW = sW, sA = sA, intervene1.sA = def_new_sA(A = 0L), # Anodes = "A", f_gstar1 = 0L, Qform = "Y ~ sum.netW3 + sum.netAW2", hform.g0 = "netA ~ netW2 + sum.netW3 + nF", hform.gstar = "netA ~ sum.netW3", NETIDmat = NetInd_mat_Kmax6 )

Warning messages: 1: In chol.default(B, pivot = TRUE) : the matrix is either rank-deficient or not positive definite

statbuchs avatar Apr 17 '24 19:04 statbuchs