similar to: problem with lme in nlme package

Displaying 20 results from an estimated 300 matches similar to: "problem with lme in nlme package"

2004 Jan 07
2
problem assigning an array to a variable in a data frame
Dear r-devel list members, Dirk Eddelbuettel brought the following problem to my attention. The code is abstracted from the appendix on mixed models from my R and S-PLUS Companion: > set.seed(12345) # for reproducibility > library(nlme) Loading required package: lattice > data(MathAchieve) > data(MathAchSchool) > attach(MathAchieve) > mses <- tapply(SES, School,
2012 May 12
2
Why can we combine design matrix and data-frame in R?
Hi all, Could you please help me? I am trying to understand why this line works: lm1x = lm(y~X-1, tmp) Here it seems that I was combining the design matrix and the data frame... And X below is not a single column, in fact, it's a bunch of columns in matrix form... I don't understand why this line works... Is it just luck, i.e. if we change the data-set and/or formulas to something
2003 Jun 25
3
joining columns as in a relational database
In our recent workshop on "Multilevel Modeling in R" we discussed handling data for multilevel modeling. An classic example of such data are test scores of students grouped into schools. We may wish to model the scores as functions of both student-level covariates and school-level covariates. Such data are often organized in a multi-table format with a separate table for each level of
1998 Mar 05
1
User time and system time
I am running the R-0.62.0 snapshot on a Linux system. This system has 128 Mb of real memory and almost never swaps. I am trying to use lme() on a very large example (7200 observations, 10 columns in the fixed effects, 2 columns in the random effects). We have the optimization nicely tuned so that goes relatively quickly. It seems, though, that all the data manipulation steps before the
2012 Jan 18
0
examine grouped data lmList
Dear community, I'm trying to examine my grouped data following page 6 http://cran.r-project.org/doc/contrib/Fox-Companion/appendix-mixed-models.pdf. I'm trying lmList this way: model.list <- lmList(log(v.dep) ~ log(v2) +log(v4) + v3 | v5, subset = v6=0, data=data) and obtain this error message: In Ops.factor(v4, v4) : | not meaningful for factors My original model is
2003 Oct 04
2
(no subject)
Dear all, I have the following question. I have to fit the hierarchical model for the hypothesis concern the individual-level effects by controlling for the individual -level attributes and national-level contextual effects on individuals by using R. O have to obtain the estimates of the impact of the second-level (national: GDP per capita) effects on individuals ( in this instance the impact
2013 Nov 04
2
Fwd: recodificar variables
Buenas noches, mi pregunta es tal vez sencilla. tengo esta libreria y estos datos library(nlme) data(MathAchieve) Infoest = MathAchieve en esta base quiero contar la cantidad de casos en la que la columna Sex, toma el valor Female, como puedo hacerle el filtro para ver solo los Females. y como puedo dentro del mismo conjunto de datos agregar la variable numerica que me cuente 1 si es Female y 0
2006 Nov 27
1
Help with response CIs for lme
Hi, Can someone please offer a procedure for going from CIs produced by intervals.lme() to fixed-effects response CIs. Here's a simple example: library(mlmRev) library(nlme) hsb.lme <- lme(mAch ~ minrty * sector, random = ~ 1 | cses, Hsb82) (intervals(hsb.lme)) (hsb.new <- data.frame minrty = rep(c('No', 'Yes'), 2), sector = rep(c('Public',
2003 Jun 25
2
within group variance of the coeficients in LME
Dear listers, I can't find the variance or se of the coefficients in a multilevel model using lme. I want to calculate a Chi square test statistics for the variability of the coefficients across levels. I have a simple 2-level problem, where I want to check weather a certain covariate varies across level 2 units. Pinheiro Bates suggest just looking at the intervals or doing a rather
1999 Apr 15
2
regression with uncertainty in both variables
Hi, all. I'm trying to use some linear regression models in which both the dependent and independent variables are measured with some error. To make things worse, while the errors in the dependent variable are uniform, the errors in the independent (or explanatory, or "x") variables can be heteroskedastic. I've been looking at the book _Measurement Error Models_ by Fuller
2003 Aug 25
2
Book recommendations: Multilevel & longitudinal analysis
Hi, does anyone out there have a recommendation for multilevel / random effects and longitudinal analysis? My dream book would be something that's both accessible to a non-statistician but rigorous (because I seem to be slowly turning into a statistician) and ideally would use R. Peter
2004 Dec 19
1
PBIB datataset
I'm looking at Pinheiro & Bates "Mixed-Effects Models in S and S-PLUS" at the moment. Several datasets are used, one of which is called "PBIB" (a partially balanced incomplete block design). All the other datasets can be found somewhere or other in R. However, I cannot locate PBIB, and it does not seem to be mentioned in the latest edition of the R Full Reference
2002 Jun 21
0
Interpreting output from glmmPQL
Greetings. I'm running some models under R using glmmPQL from MASS. These are three-level models (two grouped levels and the individual level) with dichotomous outcomes. There are several statistics of interest; for the moment, I have two specific questions: 1.) This question refers to the following model (I present first the call, then the output of summary():
2006 Mar 23
0
HABTM relationship
Hi all, I''ve got the following two objects and the habtm relationship isn''t putting records in the DB: class Cse < ActiveRecord::Base has_and_belongs_to_many :conditions end class Condition < ActiveRecord::Base has_and_belongs_to_many :cses end I''m creating a Cse object and filling the collection of Conditions, then calling save on the Cse object.
2009 Apr 07
1
axis values on lattice log-scale plot
I'm plotting the following (stripped of inessentials) xyplot(sd ~ distance | wshed,data=sdvar.df,scales=list(x=list (log=TRUE),y=list(log=TRUE))) sdvar.df is a data frame, sd and distance are numeric, wshed is an ordered factor trying to replicate the action of log="xy" in plot() The plot works fine but the axis values at the ticks are in scientific notation, e.g. 10^1.5,
2013 Dec 05
0
mgcv gam modeling trend variation over cases
Dear R-Helpers, I posted two days ago on testing significance of random effects in mgcv, but realize I did not make my overall purpose clear. I have a series of N short time series, where N might range from 3-10 and short means a median of 20 time points. The sample data below (PCP) has N = 4 cases with 9, 13, 16 and 16 observations over time respectively. The data set contains four
2006 Dec 01
2
package installation fails only for "sp"
I have escaped Splus for Windows (mostly) and have started using R (v 2.3.1 on i686 redhat). Installing packages has been routine except for "sp" (classes and methods for spatial data). I get the following error message > install.packages("sp") Warning in download.packages(unique(pkgs),destdir=tmpd,available=available,: no package 'sp' at the
2009 Nov 03
1
hierarchical clustering with Jaccard index
hi, I want to do hierarchical clustering with Jaccord index. I tried to do with vegan package for finding index and hierarchical clustering with hclust function. While doing clustering it is showing an error message as "invalid distance method". I would be grateful if anyone tells how to rectify the error. Thanks in advance,   kind regards, Ms.Karunambigai M PhD Scholar Dept. of
2009 Aug 24
1
Unique command not deleting all duplicate rows
Hello everyone, when I run the "unique" command on my data frame, it deletes the majority of duplicate rows, but not all of them. Here is a sample of my data. How do I get it to delete all the rows? 6 -115.38 32.894 195 162.94 D 8419 D 7 -115.432 32.864 115 208.91 D 8419 D 8 -115.447 32.773 1170 264.57 D 8419 D 9 -115.447 32.773 1170 264.57 D 8419 D 10 -115.447 32.773 1170
2011 Mar 11
1
Partial Cross Correlation
Does anyone know of any R code for computing partial cross-correlation? I have examples of cross correlation functions (ccfs) that are not smooth but rather consist of a peak of several high values in consecutive lags, with sharp drops on either side. This indicates that y(t) is a function of some average of x(t-tau) at the set of lags tau over which the ccf is high. I could sort out these