If I run bootsempls() function of the semPLS package in R, I get an object of class "bootsempls", "boot", lets name the object "mymodel_boot".
If I run
>mymodel_boot
Estimate Bias Std.Error Lower Upper
lam_1_1 0.923 -0.000188 0.01400 0.892 0.946
lam_1_2 0.918 -0.000971 0.01778 0.876 0.945
lam_2_1 0.860 -0.001325 0.02647 0.799 0.903
lam_2_2 0.897 0.000579 0.01604 0.864 0.926
lam_2_3 0.799 -0.000253 0.03476 0.723 0.859
lam_3_1 0.793 -0.003462 0.06742 0.636 0.897
lam_3_2 0.942 0.001877 0.00892 0.927 0.963
beta_1_3 0.429 0.003359 0.07722 0.280 0.579
beta_2_3 0.294 -0.000880 0.07339 0.147 0.435
I get the table above.
To compute t-values, I now want to divide the original coefficients by the corresponding standard error.
The original coefficients can be targeted by
> mymodel_boot$t0
[1] 0.9227120 0.9180390 0.8599884 0.8973823 0.7993398 0.7927142 0.9424423 0.4292315 0.2941801
Is there any way to target the Std.Error like that, which is printed in the previous codeblock, so I could just divide these and get a vector of t-values?
I have read the help page of bootsempls, but can't find a component that returns only the Std.Err and now I am confused, because I thought its a common procedure to estimate t-values and there is no smarter way than to copy paste each Std.Err from the console? I can't believe that.
If the Std.Err can't be targeted through the $ operator, is there any way I can transform the Std.Err column in the console output into a vector?
Good question. The usual way is to use
attributes
andstr
in order to find such attributes in unknown classes (I guess this is how you foundt0
?), but this resulted in nothing for me. So I've decided to check the print method. A quick look atShowed me
print.bootsempls*
Next step was:
Which resulted in:
Which solved the mystery. So apperantly the print method calculates the S.E. and it isn't stored anywhere. In order to replicate the output you showed and store it as a
data.frmae
object (and also to calculate S.E.) you will have to simply do the following: