Displaying 5 results from an estimated 5 matches for "hattrac".
Did you mean:
hattrace
2005 Jun 03
2
using so-library involving Taucs
...parse I would like to employ
Taucs linear solver ( http://www.tau.ac.il/~stoledo/taucs/ ) on
SX = B'B.
(Further improvement by implying a looping over i=1,...,p, calling
taucs_linsolve(S, X[,i], (B'B)[,i]) and saving X[i,i] only is pending.)
For this purpose I compiled the C code "hattrace.c" to a shared object
using:
gcc -g -Wall -I/usr/local/taucs/src -I/usr/local/taucs/build/linux -c
hattrace.c -o hattrace.o
gcc -g -L/usr/local/taucs/external/lib/linux
-L/usr/local/taucs/lib/linux -L/usr/local/lib -L/opt/gnome/lib
-L/usr/lib/R/lib -shared -fpic -o hattrace.so hattrace....
2012 Oct 13
2
Function hatTrace in package lme4
...unction to be used:
CAIC <- function(model) {
sigma <- attr(VarCorr(model), 'sc')
observed <- attr(model, 'y')
predicted <- fitted(model)
cond.loglik <- sum(dnorm(observed, predicted, sigma, log=TRUE))
rho <- hatTrace(model)
p <- length(fixef(model))
N <- nrow(attr(model, 'X'))
K.corr <- N*(N-p-1)*(rho+1)/((N-p)*(N-p-2)) +
N*(p+1)/((N-p)*(N-p-2))
CAIC <- -2*cond.loglik + 2*K.corr
return(CAIC)
}
Reference:
http://r.789695.n4.n...
2006 Nov 01
1
gamm(): degrees of freedom of the fit
...e a more efficient way than doing the spectral decomposition of an NxN-matrix.
The degrees of freedom associated with the linear and smooth parts can be read from the gam-part of the fitted gamm()-model, but not the degrees of freedom associated with the random effects. For lmer()-models, there is hatTrace() but I know of nothing of the sort for lme()-Objects.
Maybe somebody has some code or ideas to share?
--
2008 Feb 14
0
Using Conditional AIC with lmer
...f-list advice, we have decided that
appropriate code for CAIC is
CAIC <- function(model) {
sigma <- attr(VarCorr(model), 'sc')
observed <- attr(model, 'y')
predicted <- fitted(model)
cond.loglik <- sum(dnorm(observed, predicted, sigma, log=TRUE))
rho <- hatTrace(model)
p <- length(fixef(model))
N <- nrow(attr(model, 'X'))
K.corr <- N*(N-p-1)*(rho+1)/((N-p)*(N-p-2)) + N*(p+1)/((N-p)*(N-p-2))
CAIC <- -2*cond.loglik + 2*K.corr
return(CAIC)
}
where K.corr is the finite-sample correction for K, for ML model fits.
I am posting th...
2006 Sep 07
5
Conservative "ANOVA tables" in lmer
Dear lmer-ers,
My thanks for all of you who are sharing your trials and tribulations
publicly.
I was hoping to elicit some feedback on my thoughts on denominator
degrees of freedom for F ratios in mixed models. These thoughts and
practices result from my reading of previous postings by Doug Bates
and others.
- I start by assuming that the appropriate denominator degrees lies
between n