lapl_aprx2.Rdlapl_aprx2 is a more flexible alternative to lapl_aprx. This creates
glm objects from which joint asymptotic distributions can be computed.
lapl_aprx2(y, x, family = "binomial", ...)
| y | the binary dependent variable y |
|---|---|
| x | the matrix of independent variables. |
| family | a parameter to be passed |
| ... | additional parameters to be passed to |
val A list of mode variance-covariance matrix, and scale factor for proposal draws from the multivariate normal distribution.
y = indicat(faithful$waiting,mean(faithful$waiting)) x = scale(cbind(faithful$eruptions,faithful$eruptions^2)) (gg<- lapl_aprx2(y,x)); coef(gg); vcov(gg)#> #> Call: stats::glm(formula = dat$y ~ ., family = family, data = dat) #> #> Coefficients: #> (Intercept) X1 X2 #> -0.6255 -4.3353 -0.2306 #> #> Degrees of Freedom: 271 Total (i.e. Null); 269 Residual #> Null Deviance: 364.6 #> Residual Deviance: 68.49 AIC: 74.49#> (Intercept) X1 X2 #> -0.6255109 -4.3352841 -0.2306354#> (Intercept) X1 X2 #> (Intercept) 0.5113988 -3.335057 3.199333 #> X1 -3.3350566 27.657200 -26.558498 #> X2 3.1993331 -26.558498 25.926695