search for: deltamethod

Displaying 10 results from an estimated 10 matches for "deltamethod".

2013 Mar 22
1
Trouble embedding functions (e.g., deltaMethod) in other functions
...ion of a function within my own function produces NaN's or fails to execute as intended. My conundrum is that I can execute the function outside of my function without error, so it's difficult for me, as a novice functioneer, to figure out what's going wrong. Here's my example for deltaMethod(): t <- c(0.00000, 26.24551, 61.78180, 86.88254, 221.75480) m <- c(48.591707, 15.655895, 12.284635, 5.758547, 0.000000) dat <- data.frame(t = t, m = m) m0 <- m[1] t0 <- t[5] nlls <- nls(m ~ (m0^(1/lambda) - (t * m0/t0)^(1/lambda))^lambda, start = list(lambda = 1), data = da...
2005 Nov 07
1
Newbie on functions
...rying to write a simple function like case1 <- function (m, cov, Q, R) { theta <- (acos(R/sqrt(Q^3))) beta <- (-2)*sqrt(Q)*cos(theta/3)+m[1]/3 rho1 <- (-2)*sqrt(Q)*cos((theta+2*pi)/3)+m[1]/3 rho2 <- (-2)*sqrt(Q)*cos((theta-2*pi)/3)+m[1]/3 stderrb <- deltamethod( ~(-2)*sqrt(Q)*cos(theta/3)+x1/3,m,cov) stderrr1 <- deltamethod( ~(-2)*sqrt(Q)*cos((theta+2*pi)/3)+x1/3, m, cov) stderrr2 <- deltamethod( ~(-2)*sqrt(Q)*cos((theta-2*pi)/3)+x1/3, m, cov) stderr <- c(stderrb,stderrr1,stderrr2) results <- c(beta,rho1,rho2,stderr) results2 &...
2011 Feb 15
0
Delta method using numerical derivatives
Dear all, Is there a fairly general R implementation of the delta method that uses numerical derivatives? I realise that the delta method has been implemented using symbolic derivatives (e.g. alr3::delta.method, emdbook::deltamethod, msm::deltamethod and survey:::nlcon), however possibly non-linear estimators using the delta method with numerical derivatives can be quite useful (e.g. predictnl in Stata and the estimate and predict statements for proc nlmixed in SAS). I would like something akin to the following predictnl() fu...
2015 Jun 26
1
[R-pkg-devel] Guidelines for S3 regression models
...w which lists some (but not all) useful methods is in Table 1 of vignette("betareg", package = "betareg"). For coef() and vcov() it is useful/important that the names and dimension match. Then Wald tests can be easily computed in functions like car::linearHypothesis(), car::deltaMethod(), lmtest::waldtest(), or lmtest::coeftest(). Thanks & best wishes, Achim > http://www.milbo.org/doc/modguide.pdf > > Your comments would be appreciated. > > Stephen Milborrow > > ______________________________________________ > R-package-devel at r-project.org mailin...
2013 Sep 01
0
Time lag Regression and Standard Error
...ds for the lag. The real Beta of this regression is ?real = ?1 + ?2 + ?3 First: How can I run the regression without manually laging the B's? And second: I need the standard error for ?real. How can I calculate it with the information given from the lm(Regression1)? (I read something about the deltamethod?) Thank you a lot! Kind regards -- View this message in context: http://r.789695.n4.nabble.com/Time-lag-Regression-and-Standard-Error-tp4675130.html Sent from the R help mailing list archive at Nabble.com.
2010 Aug 27
1
calculate the elasticities by linear.hypothesi commander
Dear all If I run the model and get the estimated parameter a11. Then I want to use the estimated parameter to calculate the elasticities by using the formula e11=a11/mw1-1. What I have done is using the command of linear. Hypothesis. > formulas1=dWfresh~dlnPfresh+dlnPfrozen+dlnPsmoke+dlnQP+cosL1+sinL1+cosL2 >
2008 Feb 18
3
mean and variance of ratio
Hi all! I try to estimate a statistic of the form: (x1-x2)/(y1-y2), where x1,x2,y1,y2 represent variable means, so each has an estimate and standard error associated with it. How is it possible to estimate the mean and the variance of this ratio? Thank you! [[alternative HTML version deleted]]
2008 Mar 25
1
Error propagation
Dear R-helpers, I´m in the context of writing a general function for error propagation in R. There are somehow a few questions I would like to ask (discuss), as my statistical knowledge is somewhat restricted. Below is the function I wrote, the questions are marked. Many thanks in advance. propagate <- function(expr, varList, type = c("stat", "raw"), cov = TRUE) {
2004 Nov 05
0
R check passes code and docs that don't match
...* checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking Rd files ... OK * checking for missing documentation entries ... WARNING Undocumented code objects: MatrixExp absorbing.mspath coef.mspath crudeinits.mspath deltamethod ematrix.mspath expit expitsum expsum hazard.mspath lik.mspath logit mspath.check.consistency mspath.check.ematrix mspath.check.model mspath.check.qmatrix mspath.check.state mspath.check.times mspath.form.output mspath.process.covs mspath.results observed.mspath odds.mspath plot.mspath pma...
2012 Mar 02
5
Calculation of standard error for a function
Dear list, If I know the standard error for k1 and k2, is there anything I can call in R to calculate the standard error of k1/k2? Thanks. Jun [[alternative HTML version deleted]]