se_log {geostan} | R Documentation |
Standard error of log(x)
Description
Transform the standard error of x
to standard error of log(x)
.
Usage
se_log(x, se, method = c("mc", "delta"), nsim = 5000, bounds = c(0, Inf))
Arguments
x |
An estimate |
se |
Standard error of |
method |
The |
nsim |
Number of draws to take if |
bounds |
Lower and upper bounds for the variable, used in the monte carlo method. Must be a length-two numeric vector with lower bound greater than or equal to zero (i.e. |
Details
The delta method returns x^(-1) * se
. The monte carlo method is detailed in the examples section.
Value
Numeric vector of standard errors
Examples
data(georgia)
x = georgia$college
se = georgia$college.se
lse1 = se_log(x, se)
lse2 = se_log(x, se, method = "delta")
plot(lse1, lse2); abline(0, 1)
# the monte carlo method
x = 10
se = 2
z = rnorm(n = 20e3, mean = x, sd = se)
l.z = log(z)
sd(l.z)
se_log(x, se, method = "mc")
se_log(x, se, method = "delta")
[Package geostan version 0.8.1 Index]