Displaying 20 results from an estimated 5000 matches similar to: "Plot fixed effect with covariates failed"
2002 Apr 08
1
Error in nlme ranef plot()
Dear R list members;
I have a 10 x 423 data frame which consisting of response, time, subject,
site, plot and covariates (continueous and categorical) measured at the plot
level. When the data frame was converted into a groupedData object, a
warning appeared
> A <- groupedData(ht ~ time | Subject, data = tt, outer = ~ site * plot,
+      labels=list(y = "Height", x =
2003 May 12
1
plot.ranef.lme (PR#2986)
library(nlme)
data(Phenobarb)
na.include <- function(x)x
phe1 <- nlme(conc~phenoModel(Subject, time, dose, lCl, lV),
     data  = Phenobarb,
     fixed = lCl+lV~1,
     random= pdDiag(lCl+lV~1),
     start = c(-5,0),
     na.action = na.include,
     naPattern = ~!is.na(conc))
phe.ranef <- ranef(phe1,augFrame=TRUE)
plot(phe.ranef, form=lCl~Wt+ApgarInd)
[Error in max(length(x0),
2006 Aug 03
2
NLME: Problem with plotting ranef vs a factor
Hi
I am following the model building strategy that is outlined in the Pinheiro and Bates book wrt including covariates but am having a problem with the plot. Basically I am using 4 covariates (1 of them is continuous) and 3 of them are fine but the 4th one is being shown as a scatterplot despite the fact that it is a factor. I have explicitly declared this to be a factor (pcat<-as.factor(pcat))
2010 Jul 28
0
nlme: augPred.lme for factor covariates
Hi everybody,
as you may be aware the function augPred.lme does not work as soon as
the covariate is a factor. The problem lies in the line
newprimary <- seq(from = minimum, to = maximum, length.out = length.out)
which does not make sense for factors. I think augPred.lme can be useful
for models with a factor covariate as well. Thus, I propose to change
the code to:
augPred.lme <-
2006 Jul 31
1
Random Effects Model with Interacting Covariates
Hi
I have been asked by a colleague to perform a statistical analysis 
which uses random effects - but I am struggling to get this to work 
with nlme in R. Help would be very much appreciated!
Essentially, the data consists of:
10 patients. Each patient has been given three different treatments (on 
three separate days). 15 measurements (continuous variable) have been 
taken from each patient
2010 Nov 18
1
lme Random Effects and Covariates
1.  I'm attempting to test for Random Effects.  I've grouped the data on
subject (grid) but want to use lme to build the model without subject as a
RE then add it and do anova between the 2 models.  This is the result I get
and it appears it's adding Random Effects.
tmp.dat4 <- groupedData(Trials ~ 1 | grid, data = tmp.dat4)
mod2a <- lme(Trials ~ factor(group_id) + reversal,
2004 Nov 16
1
Pairwise Distances -- How to vectorize the loop
R-List,
I'm trying to compute pairwise distances among pairs of observations, 
which each pair containing data from 2 groups. There are more than 
100000 unique pairs. I have programmed a distance function that has 
three parameters, a vector of covariates from the ith observation in 
Group 1, a vector of covarites from the jth observation in Group 2, and 
a weighting matrix.
I have used
2009 Oct 13
2
How to choose a proper smoothing spline in GAM of mgcv package?
Hi, there,
I have 5 datasets. I would like to choose a basis spline with same knots in
GAM function in order to obtain same basis function for 5 datasets.
Moreover, the basis spline is used to for an interaction of two covarites.
I used "cr" in one covariate, but it can only smooth w.r.t 1 covariate. Can
anyone give me some suggestion about how to choose a proper smoothing spline
2007 Sep 26
1
Accessing the fixed- and random-effects variance-covariance matrices of an nlme model
I would appreciate confirmation that the function vcov(model.nlme)  
gives the var-cov matrix of the fixed effects in an nlme model.  
Presumably the random-effects var-cov matrix is given by cov(ranef 
(model.nlme)?
Rob Forsyth
2002 May 08
3
R 1.5.0 terminated while plotting groupedData
Dear R-help;
Following the installation of R 1.5.0  and library packages to my Win 2K
machine,  I tested the new R system:
> library(nlme)
Loading required package: nls 
> library(lattice)
Loading required package: grid 
>data(Soybean)
>plot(Soybean)
A program error appears: "Rgui.exe has generated errors and will be closed
by Windows. You will need to restart the program. An
2006 Dec 31
2
zero random effect sizes with binomial lmer [sorry, ignore previous]
I am fitting models to the responses to a questionnaire that has
seven yes/no questions (Item). For each combination of Subject and
Item, the variable Response is coded as 0 or 1.
I want to include random effects for both Subject and Item. While I
understand that the datasets are fairly small, and there are a lot of
invariant subjects, I do not understand something that is happening
here, and in
2018 Mar 22
0
How do I include a factor in a groupedData object? Meaning and use of inner and outer parameters
Dear John
You are only allowed to have the primary covariate on the left hand side 
of the vertical bar. Other covariates go in inner or outer.
Michael
On 22/03/2018 12:59, Sorkin, John wrote:
> Windows 10 64-bit, R-Studio, R version 3.4.3
> 
> 
> Several questions relating to groupedData:
> 
> (1) I am trying to create a groupedData object that can be used to run an analysis
2011 Mar 23
1
import question
I have been struggling all day to import a particular function/method
combination (ranef(), which extracts the random effects from a mixed
model fit) from the nlme package into another package ... so far without
success.
  The NAMESPACE for nlme contains the following lines:
export(..., ranef, ...)
S3method(ranef, lme)
  ranef is defined as a standard S3 generic,
function (object, ...)
  
2018 Mar 22
3
How do I include a factor in a groupedData object? Meaning and use of inner and outer parameters
Windows 10 64-bit, R-Studio, R version 3.4.3
Several questions relating to groupedData:
(1) I am trying to create a groupedData object that can be used to run an analysis that I have been able to urn using lmer. When I include the interaction terms in the groupedData opbject I get an error message stating that + is not meaningful for factors. How do I include factors in my model? See code and
2015 Nov 21
0
[Aarch64 v2 08/18] Add Neon fixed-point implementation of xcorr_kernel.
Used for celt_pitch_xcorr on aarch64, and celt_fir and celt_iir on both armv7 and aarch64.
---
 celt/arm/arm_celt_map.c   | 17 +++++++++++++
 celt/arm/celt_neon_intr.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++-
 celt/arm/pitch_arm.h      | 31 +++++++++++++++++++++++-
 3 files changed, 107 insertions(+), 2 deletions(-)
diff --git a/celt/arm/arm_celt_map.c b/celt/arm/arm_celt_map.c
index
2010 Mar 05
2
Defining a method in two packages
The coxme package has a ranef() method, as does lme4.  I'm having
trouble getting them to play together, as shown below.  (The particular
model in the example isn't defensible, but uses a standard data set.)
The problem is that most of the time only one of lme4 or coxme will be
loaded, so each needs to define the basic ranef function as well as a
method for it.  But when loaded together
2015 Mar 02
1
clarification on import/depends for a method
User of the coxme library (mixed effects Cox models) are instructed to use ranef(), 
fixed(), VarCorr(), etc to retrieve bits out of a fitted model; it purposely uses the same 
methods as nlme and/or lmer.
The current behavior is to "depend" on nlme.  If I defined the methods myself in coxme, 
then someone who had both nlme and coxme loaded will suffer from "last loaded wins",
2008 Nov 07
0
help with syntax of random formula
Dear R-users
Thanks to Jose Pinheiro, Douglas Bates and coworkes for providing R with the nlme package.
Could someone help me, please, to specify a correct random formula for a
mixed model, that specifies no random effect on a higher level?
I have the following dataset of timeseries of respiration measurements
(column resp) of biomass including a parameter initial biomass x0. Respiration
2002 Aug 24
1
nlme
In the non linear mixed effects package a groupedData object can be 
created to facilitate modeling.
The gD object includes a formula of the form 'response variable' ~ 
'primary covariate' | 'grouping factor'.
In experiments creating response surfaces there are 2 or more primary 
covariates.
Is there any way to use the groupedData() function to include 2 primary 
2003 Jun 25
2
NLME Covariates
Dear list
 
In HLM, one can specify a covariate at one of the "levels". For example, if the data structure are repeated observations nested within students nested within schools, school size might be a covariate that is used at level 3, but not at the other levels. In HLM this is rather easy to do. 
 
However, how can one specify a covariate in R for only one of the levels? I have a