similar to: A question on the library lme4

Displaying 20 results from an estimated 500 matches similar to: "A question on the library lme4"

2006 Jan 09
1
trouble with extraction/interpretation of variance structure para meters from a model built using gnls and varConstPower
I have been using gnls with the weights argument (and varConstPower) to specify a variance structure for curve fits. In attempting to extract the parameters for the variance model I am seeing results I don't understand. When I simply display the model (or use "summary" on the model), I get what seem like reasonable values for both "power" and "const". When I
2007 Jan 03
1
problem with logLik and offsets
Hi, I'm trying to compare models, one of which has all parameters fixed using offsets. The log-likelihoods seem reasonble in all cases except the model in which there are no free parameters (model3 in the toy example below). Any help would be appreciated. Cheers, Jarrod x<-rnorm(100) y<-rnorm(100, 1+x) model1<-lm(y~x) logLik(model1) sum(dnorm(y, predict(model1),
2011 Sep 08
1
predict.rma (metafor package)
Hi (R 2.13.1, OSX 10.6.8) I am trying to use predict.rma with continuous and categorical variables. The argument newmods in predict.rma seems to handle coviariates, but appears to falter on factors. While I realise that the coefficients for factors provide the answers, the goal is to eventually use predict.rma with ANCOVA type model with an interaction. Here is a self contained example
2010 Apr 01
2
Adding regression lines to each factor on a plot when using ANCOVA
Dear R users, i'm using a custom function to fit ancova models to a dataset. The data are divided into 12 groups, with one dependent variable and one covariate. When plotting the data, i'd like to add separate regression lines for each group (so, 12 lines, each with their respective individual slopes). My 'model1' uses the group*covariate interaction term, and so the coefficients
2009 Mar 09
1
lme anova() and model simplification
I am running an lme model with the main effects of four fixed variables (3 continuous and one categorical – see below) and one random variable. The data describe the densities of a mite species – awsm – in relation to four variables: adh31 (temperature related), apsm (another plant feeding mite) awpm (a predatory mite), and orien (sampling location within plant – north or south). I have read
2011 May 27
1
Error with BRugs 0.53 and 0.71, on Win7 with R 2.12.2 and 2.13.0 (crashes R GUI)
I've run into persistent problems with OpenBUGS crashing when using BRugs .53 and .71, and am hoping someone has suggestions. There is obviously something unusual going on in my environment, but I'm at a loss as to where to begin to try to solve it. In a nutshell, what happens is that, as soon as I call "modelCheck()" in BRugs, it gets an error or crashes ... but only some of
2006 Sep 12
4
variables in object names
Is there any way to put an argument into an object name. For example, say I have 5 objects, model1, model2, model3, model4 and model5. I would like to make a vector of the r.squares from each model by code such as this: rsq <- summary(model1)$r.squared for(i in 2:5){ rsq <- c(rsq, summary(model%i%)$r.squared) } So I assign the first value to rsq then cycle through models 2 through
2004 Oct 26
3
GLM model vs. GAM model
I have a question about how to compare a GLM with a GAM model using anova function. A GLM is performed for example: model1 <-glm(formula = exitus ~ age+gender+diabetes, family = "binomial", na.action = na.exclude) A second nested model could be: model2 <-glm(formula = exitus ~ age+gender, family = "binomial", na.action = na.exclude) To compare these two GLM
2008 Oct 02
1
An AIC model selection question
Dear R users, Assume I have three models with the following AIC values: model AIC df model1 -10 2 model2 -12 5 model3 -11 2 Obviously, model2 would be preferred, but it "wastes" 5 df compared to the other models. Would it be allowed to select model3 instead, simply because it uses up less df and the delta-AIC between model2 and model3 is just 1? Many thanks for any
2008 Nov 25
4
glm or transformation of the response?
Dear all, For an introductory course on glm?s I would like to create an example to show the difference between glm and transformation of the response. For this, I tried to create a dataset where the variance increases with the mean (as is the case in many ecological datasets): poissondata=data.frame( response=rpois(40,1:40), explanatory=1:40) attach(poissondata) However, I have run into
2011 Apr 14
1
mixed model random interaction term log likelihood ratio test
Hello, I am using the following model model1=lmer(PairFrequency~MatingPair+(1|DrugPair)+(1|DrugPair:MatingPair), data=MateChoice, REML=F) 1. After reading around through the R help, I have learned that the above code is the right way to analyze a mixed model with the MatingPair as the fixed effect, DrugPair as the random effect and the interaction between these two as the random effect as well.
2010 Oct 03
5
How to iterate through different arguments?
If I have a model line = lm(y~x1) and I want to use a for loop to change the number of explanatory variables, how would I do this? So for example I want to store the model objects in a list. model1 = lm(y~x1) model2 = lm(y~x1+x2) model3 = lm(y~x1+x2+x3) model4 = lm(y~x1+x2+x3+x4) model5 = lm(y~x1+x2+x3+x4+x5)... model10. model_function = function(x){ for(i in 1:x) { } If x =1, then the list
2009 Jan 16
2
Predictions with GAM
Dear, I am trying to get a prediction of my GAM on a response type. So that I eventually get plots with the correct values on my ylab. I have been able to get some of my GAM's working with the example shown below: * model1<-gam(nsdall ~ s(jdaylitr2), data=datansd) newd1 <- data.frame(jdaylitr2=(244:304)) pred1 <- predict.gam(model1,newd1,type="response")* The problem I am
2006 Sep 20
5
acts_as_ferret limit on multi_search not working?
I''m using acts_as_ferret to do a query like this: Model1.multi_search("my query",[Model2,Model3], :limit => 2) No matter what number i set limit to I get 10 items in the resultset. Am I doing something wrong? Thanks/David -- Posted via http://www.ruby-forum.com/.
2012 Jun 06
3
Sobel's test for mediation and lme4/nlme
Hello, Any advice or pointers for implementing Sobel's test for mediation in 2-level model setting? For fitting the hierarchical models, I am using "lme4" but could also revert to "nlme" since it is a relatively simple varying intercept model and they yield identical estimates. I apologize for this is an R question with an embedded statistical question. I noticed that a
2013 Jan 02
5
mgag200 driver does not work properly with Xen
When using Xen Hypervisor, the video goes very slow after module load in console. Xorg does not run. My boot process (in kernel 3.7.1 from elrepo, my default kernel.): 1. Hypervisor is loaded (from here, the screen resolution is 640x480 - text scrolling fast) 2. Kernel is loaded 3. mgag200 module is loaded 4. Screens enter native resolution (from here, the screen resolution is 1280x768 - text
2010 Sep 29
1
Understanding linear contrasts in Anova using R
#I am trying to understand how R fits models for contrasts in a #simple one-way anova. This is an example, I am not stupid enough to want #to simultaneously apply all of these contrasts to real data. With a few #exceptions, the tests that I would compute by hand (or by other software) #will give the same t or F statistics. It is the contrast estimates that R produces #that I can't seem to
2018 Mar 09
2
Package gamlss used inside foreach() and %dopar% fails to find an object
Hello all: Please help me with this "can't find object" issue. I'm trying to get leave-one-out predicted values for Beta-binomial regression. It may be the gamlss issue because the code seems to work when %do% is used. I have searched for similar issues, but haven't managed to figure it out. This is on Windows 10 platform. Thanks in advance, Nik #
2008 Oct 03
2
suggestions for plotting 5000 data points
Dear all, I have a collection of 5000 entries which represent the evolutionary rates of 3 animals. I would like to show the differences between the rates of all 3 animals and have tried using the function parallel (from the lattice package) and pairs() function. The parallel function would have been perfect save for the large number of data (5000). The pairs() function doesn't show
2012 Nov 08
2
Comparing nonlinear, non-nested models
Dear R users, Could somebody please help me to find a way of comparing nonlinear, non-nested models in R, where the number of parameters is not necessarily different? Here is a sample (growth rates, y, as a function of internal substrate concentration, x): x <- c(0.52, 1.21, 1.45, 1.64, 1.89, 2.14, 2.47, 3.20, 4.47, 5.31, 6.48) y <- c(0.00, 0.35, 0.41, 0.49, 0.58, 0.61, 0.71, 0.83, 0.98,