R 乐趣的p值=“;“系数”;在布斯特拉普兰

R 乐趣的p值=“;“系数”;在布斯特拉普兰,r,p-value,statistics-bootstrap,coefficients,r-lavaan,R,P Value,Statistics Bootstrap,Coefficients,R Lavaan,假设我有一个Lavan模型: fit=' #Structural model var1=~item1+item2+item3 var2=~item1+item2+item3 var3=~item1+item2+item3 #Path model var3~var2 var2~var1 ' 然后,我使用sem计算: example=lavaan::sem(fit, data) 现在我想应用bootstrapLavaan,

假设我有一个Lavan模型:

fit='
    #Structural model
    var1=~item1+item2+item3
    var2=~item1+item2+item3
    var3=~item1+item2+item3

    #Path model
    var3~var2
    var2~var1
    '
然后,我使用sem计算:

    example=lavaan::sem(fit, data)
现在我想应用bootstrapLavaan,如下所示:

    boot.example=bootstrapLavaan(example, FUN="coef")
当我用…分析物体时

    summary(boot.example)

。。。我只得到了系数的值,比如平均值、中值、最小值、最大值等。有没有办法得到这些系数的p值?

如果你的赫尔假设系数等于零,那么
t(rbind(apply(boot.example,2,quantile,c(0.025,0.975)),2*pmin(colMeans(boot.example>0),colMeans(boot.example<0)))
将提供95%的CI ans p值,正如您所预测的那样!非常感谢。有什么我可以添加到那里得到标准误差吗?还有(我可能推到这里),得到标准化的平均系数吗?还有一个问题(对不起)-有没有办法让p值显示更多的小数位?再次感谢您的帮助!如果您的赫尔假设系数等于零,那么
t(rbind(应用(boot.example,2,分位数,c(0.025,0.975)),2*pmin(colMeans(boot.example>0),colMeans(boot.example<0))
将给出95%的CI的ans p值,这与您的预测一样有效!非常感谢。有什么我可以添加到那里得到标准误差吗?还有(我可能推到这里),得到标准化的平均系数吗?还有一个问题(对不起)-有没有办法让p值显示更多的小数位?再次感谢您的帮助!