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)"

2005 Aug 12
1
as.formula and lme ( Fixed effects: Error in as.vector(x, "list") : cannot coerce to vector)
This is a continuing issue with the one on the list a long time ago (I couldn't find a solution to it from the web): -------------------------------------------------------------------------- > 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
2001 Feb 27
2
Remove columns by name data[-c("subj","drug")]
Is there an easy way to remove data frame columns by name instead of by index? The following gives the idea remove<-c("subj","drug") data[-remove] I found a solution with a few evals and substitutes, similar to that used in reshapeLong, but there must be an easier way out. Dieter --------------------------------------- Dr. Dieter Menne Biomed Software 72074 T?bingen Tel
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)
2002 Jul 16
2
r-square for non-linear regression
We have extracted parameters from physiological measurements by fitting SSlogis-like curves with nlsList and nlme. We presented residuals plot in a paper, but a referee argues that these cannot be included (too technical), and r-square values should be given instead to compare the goodness of fit with those of other authors. I remember that 30 years ago in my stat 101, I learned that r-square is
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 ~
2001 Mar 01
2
Individual rename of list items
I am confused by the logic of renaming: # Rename individual list items? Empl<-list(employee="Anna",spouse="Fred") names(Empl)<-c("empl","spo") names(Empl) #[1] "empl" "spo" # worked like a charm... but names(Empl[1])<-"newempl" # no error message, yet .... names(Empl) #[1] "empl" "spo" #
2002 Jun 20
1
Psychometric curves, two altnerative force choice, glm, and budbworms
Dear R-Listers, to measure the psychometric curve of pitch discrimination, one sequentially presents two tones of slightly different pitch to an observer (animal will do), and asks "which is higher". The pschometric curve is the fraction of correct responses plotted against the pitch difference. It passes through 50% (pure guessing) at zero and normally approaches 100% at large
2001 Feb 04
1
quinModel S != R
Dear friends of nlme, Running quinModel (Pinheiro/Bates page 380) on R (current release, windows) gives: Nonlinear mixed-effects model fit by maximum likelihood Model: conc ~ quinModel(Subject, time, conc, dose, interval, lV, lKa, lCl) Data: Quinidine Log-likelihood: -497 Fixed: lV + lKa + lCl ~ 1 lV lKa lCl 5.382 -0.273 2.470 Random effects: Formula: list(lV ~ 1, lCl ~ 1)
2001 Oct 07
1
Bug in Deriv? (PR#1119)
deriv seems to have problems with a minus-sign before a bracket. Below are four examples of the same function, the top one is wrong, all others are correct (hopefully). Rest of expression not shown, it is the same for all versions. _ platform i386-pc-mingw32 arch x86 os Win32 system x86, Win32 status major 1 minor 3.0 year 2001 month 06 day 22 language R
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
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ó:
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
2001 Feb 21
1
Gradient field from loess
I have a two-dimensional loess fit, and need to calculate the gradient field from it. Even after looking at loess.c and loess.f, I don't understand the meaning of the returned polynomial coefficients. Or is the brute force method of using a tangential approx to the fitted values the way to go? Dieter Menne --------------------------------------- Dr. Dieter Menne Biomed Software 72074
2002 May 27
1
nlme cross-over and fixed nested
I have problem getting the concept of a nested fixed variable into the nlme scheme. I fear the question is very stupid. In the past I had asked this before, and never got a reply (in other cases, the response was within hours). I also checked the S-list, where several similar enquiries of other people are orphaned. We have a cross-over design, where patient are treated two weeks with placebo,
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) ##