similar to: as.formula and lme ( Fixed effects: Error in as.vector(x, "list") : cannot coerce to vector)

Displaying 20 results from an estimated 4000 matches similar to: "as.formula and lme ( Fixed effects: Error in as.vector(x, "list") : cannot coerce to vector)"

2001 Feb 23
1
as.formula and lme ( Fixed effects: Error in as.vector(x, "list") : cannot coerce to vector)
Using a formula converted with as.formula with lme leads to an error message. Same works ok with lm, and with lme and a fixed formula. # demonstrates problems with lme and as.formula demo<-data.frame(x=1:20,y=(1:20)+rnorm(20),subj=as.factor(rep(1:2,10))) demo.lm1<-lme(y~x,data=demo,random=~1|subj) print(summary(demo.lm1)) newframe<-data.frame(x=1:5,subj=rep(1,5))
2003 Jul 30
2
Comparing two regression slopes
Hello, I've written a simple (although probably overly roundabout) function to test whether two regression slope coefficients from two linear models on independent data sets are significantly different. I'm a bit concerned, because when I test it on simulated data with different sample sizes and variances, the function seems to be extremely sensitive both of these. I am wondering if
2010 Apr 08
2
Overfitting/Calibration plots (Statistics question)
This isn't a question about R, but I'm hoping someone will be willing to help. I've been looking at calibration plots in multiple regression (plotting observed response Y on the vertical axis versus predicted response [Y hat] on the horizontal axis). According to Frank Harrell's "Regression Modeling Strategies" book (pp. 61-63), when making such a plot on new data
2012 Jan 13
2
Help needed in interpreting linear models
Dear members of the R-help list, I have sent the email below to the R-SIG-ME list to ask for help in interpreting some R output of fitted linear models. Unfortunately, I haven't yet received any answers. As I am not sure if my email was sent successfully to the mailing list I am asking for help here: Dear members of the R-SIG-ME list, I am new to linear models and struggling with
2006 Mar 10
1
add trend line to each group of data in: xyplot(y1+y2 ~ x | grp...
Although this should be trivial, I'm having a spot of trouble. I want to make a lattice plot of the format y1+y2 ~ x | grp but then fit a lm to each y variable and add an abline of those models in different colors. If the xyplot followed y~x|grp I would write a panel function as below, but I'm unsure of how to do that with y1 and y2 without reshaping the data before hand. Thoughts
2007 Aug 06
1
test the significances of two regression lines
R-help, I'm trying to test the significance of two regression lines , i.e. the significance of the slopes from two samples originated from the same population. Is it correct if I fit a liner model for each sample and then test the slope signicance with 'anova'. Something like this: lm1 <- lm(Y~ a1 + b1*X) # sample 1 lm2 <- lm(Y~ a2 + b2*X) # sample 2 anova(lm1, lm2)
2012 Jul 06
2
Anova Type II and Contrasts
the study design of the data I have to analyse is simple. There is 1 control group (CTRL) and 2 different treatment groups (TREAT_1 and TREAT_2). The data also includes 2 covariates COV1 and COV2. I have been asked to check if there is a linear or quadratic treatment effect in the data. I created a dummy data set to explain my situation: df1 <- data.frame( Observation =
2002 Dec 20
1
Printing correlation matrices (lm/glm)
Hi Folks, I'm analysing some data which, in its simplest aspect, has 3 factors A, B, C each at 2 levels. If I do lm1 <- lm(y ~ A*B) say, and then summary(lm1, corr=T) I get the correlation matrix of the estimated coeffcients with numerical values for the correlations (3 coeffs in this case). Likewise with 'glm' instead of 'lm'. However, if I do lm2 <- lm(y ~
2008 Nov 24
3
Is this correct?
I have to answer the following question for a homework assignment. A researcher was interested in whether people taking part in sports at university made more money after graduating, taking into account the students' GPA. They sampled 200 alumni from a large university. The variables are: income (income 10 years after graduating), sports (1 if they did sports, 0 if they did not), and GPA (the
2003 Oct 28
1
error message in simulation
Dear R-users, I am a dentist (so forgive me if my question looks stupid) and came across a problem when I did simulations to compare a few single level and two level regressions. The simulations were interrupted and an error message came out like 'Error in MEestimate(lmeSt, grps) : Singularity in backsolve at level 0, block 1'. My collegue suggested that this might be due to my codes
2014 Jun 13
3
p values con LMER
Hola Manuel lo he tratado de hacer pero me sale Error: unexpected string constante in: "anova(a,as,test=Chisq") no tengo ni idea de por qué... Me resulta alucinante no poder contar ya con pvals.fnc. ¿Será imposible hacerse con ello? Saludos, Miguel -------------------------------------------- El vie, 13/6/14, Manuel Azcárate <mazcarategarcia en gmail.com> escribió:
2005 Nov 17
1
anova.gls from nlme on multiple arguments within a function fails
Dear All -- I am trying to use within a little table producing code an anova comparison of two gls fitted objects, contained in a list of such object, obtained using nlme function gls. The anova procedure fails to locate the second of the objects. The following code, borrowed from the help page of anova.gls, exemplifies: --------------- start example code --------------- library(nlme) ##
2008 Jun 04
1
Comparing two regression lines
Dear R users, Suppose I have two different response variables y1, y2 that I regress separately on the same explanatory variable, x; sample sizes are n1=n2. Is it legitimate to compare the regression slopes (equal variances assumed) by using lm(y~x*FACTOR), where FACTOR gets "y1" if y1 is the response, and "y2" if y2 is the response? The problem I see here is that the
2014 Jun 13
3
p values con LMER
Existe discusión sobre el uso de los p-valores en modelos mixtos. Como se ha dicho antes, para mi lo más adecuado es comparar modelos mediante la función anova. Por Internet se puede encontrar un buen libro de Douglas Bates y en español, busca modelos mixtos con R de Luis Cayuela, enfocado hacia ecología, pero está muy bien El 13/06/2014 14:00, "Jorge I Velez"
2004 Aug 26
1
Why terms are dropping out of an lm() model
Hi all! I'm fairly new to R and not too experienced with regression. Because of one or both of those traits, I'm not seeing why some terms are being dropped from my model when doing a regression using lm(). I am trying to do a regression on some experimental data d, which has two numeric predictors, p1 and p2, and one numeric response, r. The aim is to compare polynomial models in p1
2010 Jul 07
3
Large discrepancies in the same object being saved to .RData
Hi developers, After some investigation I have found there can be large discrepancies in the same object being saved as an external "xx.RData" file. The immediate repercussion of this is the possible increased size of your .RData workspace for no apparent reason. The function and its three scenarios below highlight these discrepancies. Note that the object being returned is exactly
2007 Jul 17
1
Speed up computing: looping through data?
Dear all, Please excuse my ignorance, but I am having difficulty with this, and am unable to find help on the website/Google. I have a series of explanatory variables that I am aiming to get parsimony out of. For example, if I have 10 variables, a-j, I am initially looking at the linear relationships amongst them: my.lm1 <- lm(a ~ b+c+d+e+f+g+h+i+j, data=my.data) summary(my.lm1) my.lm2
2000 Jul 12
2
Removing Objects from workspace
Hi all, how can I remove objects from the workspace which starts with a certain pattern, e.g. lm (lm1, lm2, lm3 etc). Wildcards won?t work. Thanks, Sven -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the
2007 Apr 02
2
Why does lmList() fail when lm() doesn't?
Dear r-helpers, Can anyone suggest why lm() doesn't complain here: summary(osss.lm1 <- lm(logOdds ~ c.setSize %in% task, data = osss)) whereas in package:nlme (and in package:lme4) osss.lmL <- lmList(logOdds ~ c.setSize %in% task | subj, data = osss) # Error in `contrasts<-`(`*tmp*`, value = "contr.treatment") : # contrasts can be applied only to factors with 2 or more
2006 Aug 27
1
how to create many objects with sequencial names?
Dear Lister, Is there a way to create many objects with sequencial names, say lm1, lm2...lm100? Thanks.