search for: nlcon

Displaying 5 results from an estimated 5 matches for "nlcon".

Did you mean: ncon
2009 Aug 06
0
donlp2
Dear Sir, I am working with one example in R donlp2. How I can get the Hessian matrix from the output. p = c(10,10) par.l = c(-100,-100) par.u = c(100,100) nlin.l = nlin.u = 2 fn = function(x) { x[1]^2+x[2]^2 } dfn = function(x){ c(2*x[1], 2*x[2]) } attr(fn, "gr") = dfn nlcon = function(x){ x[1]*x[2] } dnlcon = function(x){ c(x[2], x[1]) } attr(nlcon, "gr") = dnlcon donlp2.control = function(hessian = TRUE) ret = donlp2(p, fn, par.u=par.u, par.l=par.l, nlin=list(nlcon), nlin.u=nlin.u, nlin.l=nlin.l,control = donlp2.control()) Thanks, -- Chirackel Ahamm...
2011 Aug 18
1
Comparison of means in survey package
Dear list colleagues, I'm trying to come up with a test question for undergraduates to illustrate comparison of means from a complex survey design. The data for the example looks roughly like this: mytest<-data.frame(harper=rnorm(500, mean=60, sd=1), party=sample(c("BQ", "NDP", "Conservative", "Liberal", "None", NA), size=500,
2009 Mar 24
3
confidence interval or error of x intercept of a linear regression
Hello all, This is something that I am sure has a really suave solution in R, but I can't quite figure out the best (or even a basic) way to do it. I have a simple linear regression that is fit with lm for which I would like to estimate the x intercept with some measure of error around it (confidence interval). In biology, there is the concept of a developmental zero - a temperature under
2011 Mar 07
1
Risk differences with survey package
I'm trying to use the survey package to calculate a risk difference with confidence interval for binge drinking between sexes. Variables are X_RFBING2 (Yes, No) and SEX. Both are factors. I can get the group prevalences easily enough with result <- svyby(~X_RFBING2, ~SEX, la04.svy, svymean, na.rm = TRUE) and then extract components from the svyby object with SE() and coef() to do the
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() function: ## get some data and fit a m...