search for: estfun

Displaying 18 results from an estimated 18 matches for "estfun".

Did you mean: testfun
2010 May 14
1
Creating an S3 method when the generic function is defined in another (imported) package
Hi, In one of my packages (maxLik), I would like to add an S3 method, where the generic function (estfun) is defined in another package (sandwich). Everything works fine if my package "Depends" on the other package and I import the generic function "estfun" from the "sandwich" package and define the new method in the NAMESPACE file. However, I prefer not to load the entir...
2007 Oct 08
2
estfun & df
Hello EVERYONE, I need an URGENT help from you please! How can I see the "estfun" (empirical estimating function) and "df" (degree of freedom) from the following mixed-model please? (fm1 <- lmer2(Reaction ~ Days + (Days|Subject), sleepstudy)) Many thanks in advance for your kind help. Sattar ___________________________________________________...
2007 Oct 05
0
Extracting df (degree of freedom) & estfun (estimating function) from model built in lmer or lmer2
Hello R-users: Could you please tell me how can I extract the "df (degree of freedom)" and "estfun (estimating functions)" for the following lmer (or lmer2) model? wtd.mixed<-lmer(ddimer~race+steroid+psi+sofa+apache + (1|subject), method="ML", data=final, cluster="id", weights=w) I tried the following codes: - for the degree of freedom (erorr message in the red)...
2011 Sep 19
1
"could not find function" after import
...ot;) I have sandwich version 2.2-7 installed. When I run R CMD check on my package, I get the following error during checking of examples: * using R Under development (unstable) (2011-08-29 r56828) * using platform: x86_64-apple-darwin9.8.0 (64-bit) ... * checking examples ... ERROR ... Error in estfun.glm(x) : could not find function "is.zoo" Calls: assocTestRegression ... meatHC -> rowMeans -> is.data.frame -> estfun -> estfun.glm I import sandwich, sandwich depends on zoo, but a function in zoo cannot be found during execution. I tried to get around this by explicitly...
2010 May 10
2
Robust SE & Heteroskedasticity-consistent estimation
Hi, I'm using maxlik with functions specified (L, his gradient & hessian). Now I would like determine some robust standard errors of my estimators. So I 'm try to use vcovHC, or hccm or robcov for example but in use one of them with my result of maxlik, I've a the following error message : Erreur dans terms.default(object) : no terms component Is there some attributes
2010 Jun 08
2
how to ignore rows missing arguments of a function when creating a function?
...here is a clustering function I wrote: cl <- function(dat, na.rm = TRUE, fm, cluster){ attach( dat , warn.conflicts = F) library(sandwich) library(lmtest) M <- length(unique(cluster)) N <- length(cluster) K <- fm$rank dfc <- (M/(M-1))*((N-1)/(N-K)) uj <- data.frame(apply(estfun(fm),2, function(x) data.frame(tapply(x, cluster, sum)) ) ); vcovCL <- dfc*sandwich(fm, meat=crossprod(uj)/N) coeftest(fm, vcovCL) } When I run my function, I get the message: Error in tapply(x, cluster, sum) : arguments must have same length If I specify instead attach(na.omit(dat), war...
2007 Feb 19
1
Urgent: How to obtain the Consistent Standard Errors after apply 2SLS through tsls() from sem or systemfit("2SLS") without this error message !!!!!!!!!!!!!
...ry to obtain the HCSE with robcov I obtain the following error message in both cases: Error in rep.default(1, p) : rep() incorrect type for second argument If I tried to apply vcovHAC or vcovHC in the systemfit output of 2SLS I receive the following messages of errors respectively: Error in estfun(x) : no applicable method for "estfun" (for vcovHAC) Error in terms.default(object) : no terms component (for vcovHC) If somebody can help me to solve this problem I will thank you a lot. Best regards Guillermo [[alternative HTML version deleted]]
2007 May 02
0
KS test pvalue estimation using mctest (library truncgof)
...e following command is the most appropriate: Let: x<-sample t<-threshold xt<-x[x>t] xihat<-gpdFit(x, threshold=t, type = "pwm")$par.ests[1] betahat<-gpdFit(x, threshold=t, type = "pwm")$par.ests[2] (1) ks.test(xt,"pgpd",list(xi=xihat,beta=betahat),H=t,estfun = "as.list(gpdFit(x, 0)$par.ests)", tol = 1e-02) (2) ks.test(xt,"pgpd",list(xi=xihat,beta=betahat),H=t,estfun = "as.list(gpdFit(x, t)$par.ests)", tol = 1e-02) (3) ks.test(xt,"pgpd",list(xi=xihat,beta=betahat,mu=t),estfun = "as.list(gpdFit(x, t)$par.ests)...
2006 Nov 24
2
low-variance warning in lmer
...qrt(totvar*(1-reefeff)) y.det = ifelse(treat==1,0,t.eff) r.vals = rnorm(nreef,sd=r.sd) e.vals = rnorm(ntot,sd=e.sd) y <- y.det+r.vals[as.numeric(reef)]+e.vals data.frame(y,treat,reef) } getranvar <- function(x) { vc <- VarCorr(x) c(diag(vc[[1]]),attr(vc,"sc")^2) } estfun <- function(reefeff,...) { x <- simfun(reefeff=reefeff,...) ow <- options(warn=2) f1 <- try(lmer(y~treat+(1|reef),data=x)) w <- (class(f1)=="try-error" && length(grep("effectively zero",f1))>0) options(ow) f2 <- lmer(y~treat+(1|reef),data...
2009 Apr 22
0
error when using vcovHC()
...(plm) > data<-plm.data(data, c("state","year")) > fn<-plm(y~x1+x2, data=data, method="within", effect="individual") > library(lmtest) > coeftest(fn,vcovHC(fn, type="HC0")) But I always get a warning: "Error in UseMethod("estfun") : no applicable method for "estfun"" Do anyone knows the why it is like this and how to solve it?? Thank you very much. Sincerely, Olivia -- View this message in context: http://www.nabble.com/error-when-using-vcovHC%28%29-tp23166624p23166624.html Sent from the R help ma...
2011 Jul 25
1
biglm() and NeweyWest()
...correction. So far, I have worked with NeweyWest() in the sandwich package. NeweyWest() however seems to be unable to handle an object of class "biglm". Looking into the code, I figured out that NeweyWest() calls i) bwNeweyWest() and ii) vcovHAC(), and that both of these functions use estfun(x)... which is unable to handle the object. I tried: est <- biglm(y~x1+x2,...) res <- y - predict(est,...) estfun<-function(res,x1,x2){ return(res*cbind(1,x1,x2)) } ...but NeweyWest() still did not work. Is there a way to work around this problem? Do you know a package that is able to...
2006 Dec 10
1
Use of bread() function
Hello, I am trying to extract an estimator for the bread of the sandwich function. I used bread(fitted model) however it seems that I have missed something as an error message "no applicable method for "bread" appears. My fitted model is a Spatial simultaneous autoregressive error model.(errorsarlm in spdep package) Can anyone please tell me what I might be doing wrong? Your
2007 Oct 26
1
Newey-West and SUR regression models
Is anyone aware of a procedure to apply Newey-West corrections for autocorrelation to a SUR regression model? The SANDWICH package seems to be applicable only to LM or GLM models. Thanks, Richard Saba Department of Economics Auburn University Email: sabaric at auburn.edu
2010 May 02
1
question about 2SLS
Hi All, I am using R 2.11.0 on a Ubuntu machine. I estimated a model using "tsls" from the package "sem". Is there a way to get Newey West standard errors for the parameter estimates? When estimating the model by OLS, I used "NeweyWest" from the package "sandwich" to get HAC standard errors. But, I am not able to use the same method with the results of the
2013 Oct 12
0
[R-pkgs] new package 'midasr'
...tion and then use the selected model for forecasting. The package provides the usual methods for generic functions which can be used on fitted MIDAS regression object: summary, coef, residuals, deviance, fitted, predict, logLik. It also has additional methods for estimating robust standard errors: estfun and bread. The package also provides all the popular MIDAS regression restrictions such as normalized Almon exponential lag, normalized beta lag and etc. The package has the project webpage (http://mpiktas.github.io/midasr/) and you can follow its development on github (https://github.com/mpiktas...
2013 Mar 30
1
vcovHC and arima() output
Dear all, how can I use vcovHC() to get robust/corrected standard errors from an arima() output? I ran an arima model with AR(1) and got the estimate, se, zvalue and p-value using coeftest(arima.output). However, I cannot use vcovHC(arima.output) to get corrected standard errors. It seems vcovHC works only with lm and plm objects? Is there another way I can get robust/corrected
2011 Oct 09
1
strucchange Nyblom-Hansen Test?
I want to apply Nyblom-Hansen test with the strucchange package, but I don't know how is the correct way and what is the difference between the following two approaches (leeding to different results): data("longley") # 1. Approach: sctest(Employed ~ Year + GNP.deflator + GNP + Armed.Forces, data = longley, type = "Nyblom-Hansen") #results in: # Score-based CUSUM
2012 Oct 12
2
party for prediction [REPOST]
Apologies for re-posting, my original message seems to have been overlooked by the moderators. ---------- Forwarded message ---------- From: Ed <icelus2k5 at gmail.com> Date: 11 October 2012 19:03 Subject: party for prediction To: R-help at r-project.org Hi there I'm experiencing some problems using the party package (specifically mob) for prediction. I have a real scalar y I want to