Displaying 4 results from an estimated 4 matches for "basegmm".
Did you mean:
basecmd
2024 Nov 01
1
Invalid term in model formula with gmm after formula.tools is loaded
...t;na.pass")
7: model.frame(data = object$data, formula = NA ~ NA, drop.unused.levels = TRUE,
na.action = "na.pass") # <-- formula is already NA ~ NA here
6: eval(mfh, parent.frame())
5: eval(mfh, parent.frame())
4: getDat(object$g, object$x, data = object$data)
3: getModel.baseGmm(all_args, ...)
2: getModel(all_args, ...)
1: gmm(z ~ zm, x = ~zm)
It seems that in base R, as.character(z ~ zm) returns a three-element
character vector, while with formula.tools loaded, it only returns a
single string, 'z ~ zm'. This breaks formula manipulation in getDat().
An immediate...
2010 Jun 08
0
GMM: "The covariance matrix of the coefficients is singular"
...*sigma_s^4+15*sigma^6-30*prob*sigma_s^6)/(1-2*prob)
g <- cbind(m1, m2, m3, m4, m5, m6)
return(g)
}
Initial value for the parameters:
tet0
[1] 12.1824940 -0.7408182 20.0855369 0.5000250 2.0137527 2.2255409
Calling the function:
res <- gmm(g,x,tet0)
Warning message:
In FinRes.baseGmm.res(z, Model_info) :
The covariance matrix of the coefficients is singular
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Cheers,
Fernando
2024 Nov 03
1
Invalid term in model formula with gmm after formula.tools is loaded
...me(data = object$data, formula = NA ~ NA, drop.unused.levels =
> TRUE,
> na.action = "na.pass") # <-- formula is already NA ~ NA here
> 6: eval(mfh, parent.frame())
> 5: eval(mfh, parent.frame())
> 4: getDat(object$g, object$x, data = object$data)
> 3: getModel.baseGmm(all_args, ...)
> 2: getModel(all_args, ...)
> 1: gmm(z ~ zm, x = ~zm)
>
> It seems that in base R, as.character(z ~ zm) returns a three-element
> character vector, while with formula.tools loaded, it only returns a
> single string, 'z ~ zm'. This breaks formula manipulatio...
2024 Oct 30
1
Invalid term in model formula with gmm after formula.tools is loaded
Hi everyone,
I am using the gmm function from the gmm package and encountered an
unexpected error. No model can be estimated if I load formula.tools?I need
to restart R each time. Here is a simple reproducible example:
*library(gmm)data(Finance)r <- Finance[1:300, 1:10]rm <- Finance[1:300,
"rm"]rf <- Finance[1:300, "rf"]z <- as.matrix(r-rf)zm