[R] Problems with installing R packages from source and running C++ in R, even on fresh R installation

2023-08-29 Thread Christophe Bousquet via R-help
Dear all, I am having issues with R that are giving me headaches since a few weeks. Basically, I cannot: (i) install packages from source (ii) run packages relying on C++ I really do not understand how and why this is happening [it was working perfectly fine before and I cannot determine when th

Re: [R] logLIk(lme(...))?

2023-08-29 Thread Spencer Graves
I found my problem: The following function gave llGp1, llGp2 and ll22: logLik_lm <- function(object){ res <- resid(object) n <- length(res) s2MLE <- sum(res^2)/n lglk <- (-n/2)*(log(2*pi*s2MLE)+1) lglk } logLik(fitGp1) logLik(fitGp1)-logLik_lm(fitGp1) llGp1 - logLik_lm(fitGp1) logL

[R] logLIk(lme(...))?

2023-08-29 Thread Spencer Graves
Hello, all: I have a dataset with 2 groups. I want to estimate 2 means and 2 standard deviations. I naively think I should be able to use lme to do that, e.g., lme(y~gp, random=y~1|gp, method='ML'). I think I should get the same answer as from lm(y~1, ...) within each level of group. I