similar to: lmList, tapply() and lm()

Displaying 20 results from an estimated 500 matches similar to: "lmList, tapply() and lm()"

2008 Feb 18
2
skip non-converging nls() in a list
Howdee, My question appears at #6 below: 1. I want to model the growth of each of a large number of individuals using a 4-parameter logistic growth curve. 2. nlme does not converge with the random structure that I want to use. 3. nlsList does not converge for some individuals. 4. I decided to go around nlsList using: t(sapply(split(data, list(data$id)), function(subd){coef(nls(mass ~
2003 Oct 31
4
dnorm() lead to a probability >1
Howdee, One of my student spotted something I can't explain: a probability >1 vs a normal probability density function. > dnorm(x=1, mean=1, sd=0.4) [1] 0.9973557 > dnorm(x=1, mean=1, sd=0.39) [1] 1.022929 > dnorm(x=1, mean=1, sd=0.3) [1] 1.329808 > dnorm(x=1, mean=1, sd=0.1) [1] 3.989423 > dnorm(x=1, mean=1, sd=0.01) [1] 39.89423 > dnorm(x=1, mean=1, sd=0.001) [1]
2009 Jun 05
3
from 3 numeric variables to a string
Hi there, I have 3 numeric variables: day (e.g., 05), month (e.g., 06), year (e.g., 2009). I would like to create a (string) variable of the following form: month/day/year (e.g., 06/05/2009). I would be grateful to anyone who could point me toward a solution. Sincerely, Marc =================== Marc B?lisle Professeur agr?g? Chaire de recherche du Canada en ?cologie spatiale et en ?cologie
2005 Mar 02
1
Applying a function to all combinations of factors
Is there a way to apply a function, say cor(), to each combination of some number of variables, and this, without using loops? For example, I have day, hour, var1 and var2. How could I compute cor(var1,var2) for each day*hour combination and obtain a matrix with day, hour and the cor value for each combination? Thanks for your time, Marc =================== Marc Bélisle Professeur adjoint
2008 Feb 19
0
nlsList - Error in !unlist(lapply(coefs, is.null))
Howdee, I am able to fit a 4-parameter logistic growth curve to a dataset which comprise many individuals (using R v. 2.3.1). Yet, if I want to obtain the parameters for each individual (i.e., for each 'id') using nlsList, then I obtain an Error message which I have trouble interpreting. Any advice as to how I can solve this problem? Thanks for your time, Marc > reg <-nls(mass ~
2008 Jan 29
0
number of rescaling cycles in decorana
How do one dertermine the optimal number of rescaling cycles to use when performing DCA using the decorana function (library vegan)? Thanks for your time, Marc =================== Marc Bélisle Professeur adjoint Chaire de recherche du Canada en écologie spatiale et en écologie du paysage Département de biologie Université de Sherbrooke 2500 Boul. de l'Université Sherbrooke, Québec J1K 2R1
2009 Aug 28
1
how to explain the interaction terms regarding "treatment contrast" of lm model
Dear list, I am confused on how to explain the interaction term in the context of "treatment contrast". for example, I have an data frame as below: sub group val 1 a group1 3.685625 2 a group1 3.407445 3 a group1 4.040920 4 a group1 2.890875 5 b group1 3.853280 6 b group1 4.113585 7 b group1 3.043250 8 b group1 3.800920 9 c group1 5.394305 10 c
2007 May 17
4
bug or feature?
R version 2.5.0, under gentoo linux. This may be just my ignorance about naming conventions inside loops and subsets, but the following appears like a bug to me. y = c( 1963, 1963, 1964, 1964, 1965, 1965 ); r1= rnorm(6); d= data.frame ( y=y, r1=r1 ); ## note: I am not attach()ing anything anywhere ## this should give me two results, which it does ahw.y= subset(d, d$y==1963);
2010 Oct 25
1
Error: could not find function "lmList"
Dear colleges, I would like to use the lmList function. I have installed the lme4 library but when I try to use the lmList function I get this error message. Error: could not find function "lmList" Here you can see what kind of messages I am getting when installing lme4 package. Does anyone know how to solve this problem? Thanks Rosario > install.packages() --- Please select a
2005 May 13
1
error in plot.lmList
Hello, in R-2.1.0 I'm trying to prodice trellis plots from an lmList object as described in the help for plot.lmList. I can generate the plots from the help, but on my own data plotting fails with an error message that I cannot interpret (please see below). Any hints are greatly appreciapted. kind regards, Arne > dim(d) [1] 575 4 > d[1:3,] Level_of_Expression SSPos1 SSPos19
2013 Nov 20
1
nlme function summary.lmList cannot be found with new versions
Hello, I installed the newest version of R (3.0.2) as well as the newest version of nlme (3.1-113) in order to use summary.lmList and other nlme functions. Once loading the new library, lmList and summary.lm can be found, but a number of additional functions cannot be found via command. Versions installed and loaded are correct. Any suggestions on how to allow for these functions of the new
2003 Sep 08
0
lmList with NAs
Hello R-Helpers, I was trying to use the lmList function to get the lmList graphic similar to Pinheiro and Bates (pg 33). I did not have a problem creating the graphic when I used the Orthodont data frame or 2 other data sets when there are no missing values. My data has missing values. Do I need to remove the missing values before the lmList function will work? for a small example: > a
2003 Feb 13
1
sorting in lmList object
Hi all, Forgive me if this is an obvious one.... I want to make a plot of confidence intervals from an lmList object with a collection of simple linear models (lm(y~x)) using: plot(intervals(mylmList)) and sort the plot by increasing mean values for the intercept. Is there an easy way of doing this? I've tried the "order()" and "sort.list()" functions, but I suspect
2003 May 07
1
[R ] Query : problems with the arithmetic operator "^" with function "lme" and "lmList"
Dear all, I've got a problem in including square variables in lme and lmlist functions. I've tried to work on Oxboys data of Pinheiro and Bates'book, which consist of the heights of 26 boys, each mesured on nine different occasions : > Oxboys Grouped Data: height ~ age | Subject Subject age height Occasion 1 1 -1.0000 140.50 1 2 1 -0.7479 143.40
2011 Jun 17
3
rle on large data . . . without a for loop!
I think need to do something like this: dat<-data.frame(state=sample(id=rep(1:5,each=200),1:3, 1000, replace=T,prob=c(0.7,0.05,0.25)),V1=runif(1,10,1000),V2=rnorm(1000)) rle.dat<-rle(dat$state) temp<-1 out<-data.frame(id=1:length(rle.dat$length)) for(i in 1:length(rle.dat$length)){ temp2<-temp+rle.dat$length[[i]] out$V1[i]<-mean(dat$V1[temp:temp2])
2005 Apr 08
1
subset arg lmList
I'm having trouble understanding how functions in the subset argument for lmList search for the objects they need. This trivial example produces "Error in rownames(fakedf) : Object "fakedf" not found": library(nlme) fitbyID <- function() { fakedf <- data.frame(ID = gl(5, 10, 50), A = sample(1:100, 50), B = rnorm(50))
2006 Aug 18
0
lmList and missing values
Dear all, I have a question on handling of missing values in lmList. My data set have continuous predictor and response, x and y, and a grouping variable group.id. All these variables have NAs and the data set also has several other variables that also contains NAs. To create the lmList-object seems to work fine: y.list <- lmList(y ~ x | group.id, data=mydata, na.action=na.omit) However,
1998 Oct 21
0
anovalist.lm or anova.lmlist?
In R, we currently have the functions anovalist.lm and anova.glmlist S / S-plus has anova.lmlist anova.glmlist On the other hand, the [n]lme package (library) of Doug Bates and Jose Pinheiro has an "lmList" class and an anova.lmList(.) method for that. We are considering to use anovalist.lm and anovalist.glm instead of the S/S-plus names mentioned above. These functions
2018 Jul 28
1
possible bug in plot.intervals.lmList
Dear R-devel members, I think I've found a minor bug in plot.intervals.lmList. ( The guide https://www.r-project.org/bugs.html suggests to report it here, as I do not have a bugzilla account.) Here is a minimal reproducible example to demonstrate the problem: fm1 <- lmList(distance ~ age | Subject, Orthodont) plot(intervals(fm1),ylab="a") This results in: "Error in
2004 May 01
1
changes to y-axis labels in lmList intervals plot
Dear List, I am plotting lmList objects using plot(intervals()) in nlme package. I want to make changes to the y-axis labels. When I try to change cex of y-axis labels using the following: fm1 <- lmList(distance ~ age | Subject, Orthodont) plot(intervals(fm1), scales=list(y=list(cex = .7))) I receive: Error in bwplot(formula = group ~ intervals | what, data = structure(list( : formal