similar to: get() within a command, specifically lmer

Displaying 20 results from an estimated 10000 matches similar to: "get() within a command, specifically lmer"

2005 Nov 03
1
Specify Z matrix with lmer function
Is there a way to specify a Z matrix using the lmer function, where the model is written as y = X*Beta + Z*u + e? I am trying to reproduce smoothing methods illustrated in the paper "Smoothing with Mixed Model Software" my Long Ngo and M.P. Wand. published in the /Journal of Statistical Software/ in 2004 using the lme4 and Matrix packages. The code and data sets used can be found at
2011 Jan 21
1
TRADUCING lmer() syntax into lme()
---------- Forwarded message ---------- From: Freddy Gamma <freddy.gamma@gmail.com> Date: 2011/1/21 Subject: TRADUCING lmer() syntax into lme() To: r-sig-mixed-models@r-project.org Dear Rsociety, I'd like to kingly ask to anyone is willing to answer me how to implement a NON NESTED random effects structure in lme() In particular I've tried the following translation from lmer to
2006 Apr 22
1
Partially crossed and nested random factors in lme/lmer
Hi all, I am not a very proficient R-user yet, so I hope I am not wasting people?s time. I want to run a linear mixed model with 3 random factors (A, B, C) where A and B are partially crossed and C is nested within B. I understand that this is not easily possible using lme but it might be using lmer. I encountered two problems when trying: Firstly, I can enter two random factors in lmer but
2005 Dec 09
1
lmer for 3-way random anova
I have been using lme from nlme to do a 3-way anova with all the effects treated as random. I was wondering if someone could direct me to an example of how to do this using lmer from lme4. I have 3 main effects, tim, trt, ctr, and all the interaction effects tim*trt*ctr. The response variable is ge. Here is my lme code: dat <-
2010 Dec 29
2
as.object: function doesn't exist but I wish it did
I seem to come to this problem alot, and I can find my way out of it with a loop, but I wish, and wonder if there is a better way. Here's an example (lmer1-5 are a series of lmer objects): bs=data.frame(bic=BIC(lmer1,lmer2,lmer3,lmer4,lmer5)$BIC) rownames(bs)=c('lmer1','lmer2','lmer3','lmer4','lmer5') best=rownames(bs)[bs==min(bs)] > best [1]
2009 Aug 26
3
tweedie and lmer
Hello all, I have count data with about 36% of observations being zeros. I found in some of the examples of the r-help mail archives that a tweedie family of distributions could be used to fit a model with random effects. Upon installing the tweedie package and attempting to fit the following model: lmer(SUS ~ 1 + (1|
2008 Dec 05
1
Question about lrandom effects specification in lme4
Folks: Suppose I have 3 random effects, A,B, and C. Using the older lme() function (in nlme) it was possible (using the pdMat classes) to specify that they are uncorrelated with identical variances. Is it possible to do this with lmer? My understanding is that if I specify them as lmer( y ~ ... + (A|Grp) + (B|Grp) + (C|Grp)) then they are uncorrelated but have different variances. Motivation:
2005 Jun 26
4
Mixed model
Hi All, I am currently conducting a mixed model. I have 7 repeated measures on a simulated clinical trial. If I understand the model correctly, the outcome is the measure (as a factor) the predictors are clinical group and trial (1-7). The fixed factors are the measure and group. The random factors are the intercept and id and group. I tried using 2 functions to calculate mixed effects.
2007 Aug 02
6
Error message in lmer
I do not think anyone has answered this. > I'm trying to run a simple one-way ANCOVA with the lmer > function in R package lme4, but have encountered some > conceptual problem. The data file MyData.txt is like this: > > Group Subj Cov Resp > A 1 3.90 4.05 > A 2 4.05 4.25 > A 3 4.25 3.60 > A 4 3.60 4.20 > A 5 4.20 4.05 > A 6 4.05 3.85
2006 Sep 26
2
treatment effect at specific time point within mixed effects model
All, The code below is for a pseudo dataset of repeated measures on patients where there is also a treatment factor called "drug". Time is treated as categorical. What code is necessary to test for a treatment effect at a single time point, e.g., time = 3? Does the answer matter if the design is a crossover design, i.e, each patient received drug and placebo? Finally, what would
2018 Mar 06
0
Capturing warning within user-defined function
1. I did not attempt to sort through your voluminous code. But I suspect you are trying to reinvent wheels. 2. I don't understand this: "I've failed to find a solution after much searching of various R related forums." A web search on "error handling in R" **immediately** brought up ?tryCatch, which I think is what you want. If not, you should probably explain why it
2018 Mar 06
0
Capturing warning within user-defined function
You can capture warnings by using withCallingHandlers. Here is an example, its help file has more information. dataList <- list( A = data.frame(y=c(TRUE,TRUE,TRUE,FALSE,FALSE), x=1:5), B = data.frame(y=c(TRUE,TRUE,FALSE,TRUE,FALSE), x=1:5), C = data.frame(y=c(FALSE,FALSE,TRUE,TRUE,TRUE), x=1:5)) withWarnings <- function(expr) { .warnings <- NULL # warning handler will
2018 Mar 06
1
Capturing warning within user-defined function
tryCatch() is good for catching errors but not so good for warnings, as it does not let you resume evaluating the expression that emitted the warning. withCallingHandlers(), with its companion invokeRestart(), lets you collect the warnings while letting the evaluation run to completion. Bill Dunlap TIBCO Software wdunlap tibco.com On Tue, Mar 6, 2018 at 2:45 PM, Bert Gunter <bgunter.4567 at
2008 Oct 26
0
LMER quasibinomial
Hi, a while ago I posted a question regarding the use of alternative models, including a quasibinomial mixed-effects model (see Results 1). I rerun the exact same model yesterday using R 2.7.2 and lme4_0.999375-26 (see Results 2) and today using R 2.7.2 and lme4_0.999375-27 (see Results 3). While the coefficient estimates are basically the same in all three regressions, the estimated standard
2011 Jul 27
1
How to adjust y-axis when using panel.densityplot within histogram function
Hi I would like to superimpose group-specific densityplots on top of an overall histogram using panel.histogram and panel.densityplot. Furthermore, I would like to automatically adjust the range of the y-axis to take into account the ranges of both histogram and densityplot. This last part is where I have a problem. I believe using the prepanel argument of histogram is typically the way to go,
2018 Mar 06
4
Capturing warning within user-defined function
Hi, I am trying to automate the creation of tables for some simply analyses. There are lots and lots of tables, thus the creation of a user-defined function to make and output them to excel. My problem is that some of the analyses have convergence issues, which I want captured and included in the output so the folks looking at them know how to view those estimates. I am successfully able to do
2013 Jun 07
1
gamm in mgcv random effect significance
Dear R-helpers, I'd like to understand how to test the statistical significance of a random effect in gamm. I am using gamm because I want to test a model with an AR(1) error structure, and it is my understanding neither gam nor gamm4 will do the latter. The data set includes nine short interrupted time series (single case designs in education, sometimes called N-of-1 trials in medicine)
2006 Oct 05
2
treatment effect at specific time point within mixedeffects model
Hi David: In looking at your original post it is a bit difficult to ascertain exactly what your null hypothesis was. That is, you want to assess whether there is a treatment effect at time 3, but compared to what. I think your second post clears this up. You should refer to pages 224- 225 of Pinhiero and Bates for your answer. This shows how to specify contrasts. > -----Original Message-----
2008 Feb 27
2
Prevent drag and drop within Samba shares
Hello, Is there a parameter in smb.conf that prevent users to use drag and drop within Samba shares? I know this is a Winedow$ function, but some users (hum, hum) use Explorer to open their files and accidentally they drag and drop sometimes a directory in the root of the share to another directory in the root of the share. My samba server is member of a native W2k3 server Active Directory
2011 Feb 10
2
Calling symbols from dataframe for xyplot
Hello, I am trying to make a xyplot plot with points that are different symbols. I want to call the symbol type (pch) from a column in my dataframe. Here is a simplified example. In my real example I also have groups, which I have not included here. This example doesn't change the symbols or colors. Any help you can provide would be appreciated. Thanks, John x<-c(1:12)