similar to: lme vs. lmer, how do they differ?

Displaying 20 results from an estimated 10000 matches similar to: "lme vs. lmer, how do they differ?"

2005 Jul 14
1
Error running lme.
I am trying to fit lme using R 2.1.1 under Windows 2k. I am getting the following message noted below. Any suggestions that would help me correct my error would be greatly appreciated. Thanks, John > fit1lme<-lme(Velocity~time,data=gate) Error in getGroups.data.frame(dataMix, groups) : Invalid formula for groups John Sorkin M.D., Ph.D. Chief, Biostatistics and Informatics
2009 Jul 23
1
setting up LMER for repeated measures and how do I get a p value for my fixed effect, group?
R 2.8.1 Windows XP I am trying to analyze repeated measures data (the data are listed at the end of this Email message) and I need help to make sure that I have properly specified my model, and would like to know why lmer does not return a p value for Group, my fixed effect. My subjects are divided into two groups (variable GROUP), individual subjects are indicated by the variable SS, Value is
2006 May 12
4
Title of page with multiple plots
I want to place four plots on a page, and I would like to have all four plots share a common title. I have tried the following code, but the title is centered over the fourth graph and not centered across all four plots. Does anyone have any suggestions? R 2.1.1 windows xp oldpar<-par(mfcol =c(1,4),ask=TRUE) plot(p,varp) plot(p,SEp) plot(p,CVp) plot(p,ppval) title(paste("P and 95%CI
2005 Jul 28
4
CSV file and date. Dates are read as factors!
I am using read.csv to read a CSV file (produced by saving an Excel file as a CSV file). The columns containing dates are being read as factors. Because of this, I can not compute follow-up time, i.e. Followup<-postDate-preDate. I would appreciate any suggestion that would help me read the dates as dates and thus allow me to calculate follow-up time. Thanks John John Sorkin M.D., Ph.D. Chief,
2005 Jul 29
6
Binary outcome with non-absorbing outcome state
I am trying to model data in which subjects are followed through time to determine if they fall, or do not fall. Some of the subjects fall once, some fall several times. Follow-up time varies from subject to subject. I know how to model time to the first fall (e.g. Cox Proportional Hazards, Kaplan-Meir analyses, etc.) but I am not sure how I can model the data if I include the data for those
2016 Apr 07
0
using apply to a data frame
??I would like to apply a function, fract, to the columns of a dataframe. I tried the following apply(data5NonEventEpochs,2,fract) but, no surprise it did not work as apply works on matrices not data frames. How can I apply a fuction to the columns of a data frame? (I can't covert data5NonEventsEpochs to a matrix as it contains character data). Thank you, John John David Sorkin M.D., Ph.D.
2007 Jan 18
3
selecting rows for inclusion in lm
I am having trouble selecting rows of a dataframe that will be included in a regression. I am trying to select those rows for which the variable Meno equals PRE. I have used the code below: difffitPre<-lm(data[,"diff"]~data[,"Age"]+data[,"Race"],data=data[data[,"Meno"]=="PRE",]) summary(difffitPre) The output from the summary indicates that
2005 Oct 11
2
Two factor (or more) non-parametric comparison of means
Can anyone suggest a good non-parametric test, and an R implementation of the test, that allows for two or more factors? Wilcoxon signed rank allows for only one. Thanks, John John Sorkin M.D., Ph.D. Chief, Biostatistics and Informatics Baltimore VA Medical Center GRECC and University of Maryland School of Medicine Claude Pepper OAIC University of Maryland School of Medicine Division of
2007 Oct 01
4
data structure with coefficients, and call from lm()
Widows XP R 2.3.1 I have been trying to make a data structure that will contain both the coefficients from a linear regression along with column and row titles AND the call, i.e. myreg<-lm(y~x+y+z) whatIwant<-cbind(c(summary(myreg)$call,"",""),summary(myreg)$coefficients) Neither the statement above, nor any one of twenty variations I have tried work. I would appreciate
2010 Dec 28
4
Reading sas7bdat files into R
Hi All, I am trying to import a .sas7bdat file into R. I tried using Hmisc package's sasxport.get() function. temp <- sasxport.get("path\abcd.sas7bdat") I get an error that says "Error in lookup.xport(file) : file not in SAS transfer format" I am not familiar with SAS transfer format. Could somebody please clarify what is it that I am missing, Thanks for your
2010 Sep 09
5
Highlighting a few bars in a barplot
Hello, I have a bar plot where I am already using colour to distinguish one set of samples from another. I would also like to highlight a few of these bars as ones that should be looked at in detail. I was thinking of using hatching, but I can't work out how or if you can have a background colour and hatching which is different between bars. Any suggestions on how I should do this? Thanks
2011 Jan 04
5
Page eject and clearing the console
(1) I know that \n when used in cat, e.g. cat("\n") produces a line feed (i.e. skips to the next line). Is there any escape sequence that will go to the top of the next page? (2) I know that control L will clear the console. Is there an equivalent function or other means that can be used in R code to clear the console? Thanks, John John David Sorkin M.D., Ph.D. Chief, Biostatistics
2006 Dec 09
7
Simulation with R
An apparatus exists whereby a collection of balls is displaced to the top of a stack by suction. A top level (Level 1) each ball is shifted 1 unit to the left or 1 unit to the right at random with equal probability. The ball then drops down to level 2. At Level 2, each ball is again shifted 1 unit to the left or 1 unit to the right at random. The process continues for 15 levels and the balls are
2005 Jul 15
3
Dividing a vector into ntiles
R 2.1.1 Win 2k Would someone suggest a method (or methods) that can be used to determine ntile cutpoints of a vector, i.e. to determine values that can be used to divide a vector into thirds such as 0-33 centile, 34-66 centile, 67-100 centile. If for example I had a vector: 1,2,3,4,5,6,7,8,9 and wanted to divide the vector into thirds I would have cut-points of 3, and 6. Thanks, John John
2005 Jun 26
1
Components of variance
Could someone identify a function that I might use to perform a components of variance analysis? In addition to the variance attributable to each factor, I would also like to obtain the SE of the variances. Thank you, John John Sorkin M.D., Ph.D. Chief, Biostatistics and Informatics Baltimore VA Medical Center GRECC and University of Maryland School of Medicine Claude Pepper OAIC University of
2006 Jul 03
6
macro facility in R
R 2.2 on windows XP I have a dataset with multiple columns. Some of the columns represent independent variables, some represent dependent variables. I would like to run the same analyses on a fixed set of independent variables, changing only the dependent variable, e.g. y1-y2=x1+x2+x3 y3-y4=x1+x2+x3 y5-y6=x1+x2+x3, etc. I know I can write a function to perform the analyses, however in order to
2007 Mar 26
4
Problem dropping rows based on values in a column
I am trying to drop rows of a dataframe based on values of the column PID, but my strategy is not working. I hope someoen can tell me what I am doing incorrectly. # Values of PID column > jdata[,"PID"] [1] 16608 16613 16355 16378 16371 16280 16211 16169 16025 11595 15883 15682 15617 15615 15212 14862 16539 [18] 12063 16755 16720 16400 16257 16209 16200 16144 11598 13594 15419 15589
2011 Mar 19
3
Generating repeated measures data
How would one generate data to be used in a simulation of a repeated measures ANOVA given a known (1) within-person correlation with known (2) mean and SD of data obtained at each of three times of observation? Thanks, John John Sorkin Chief Biostatistics and Informatics Univ. of Maryland School of Medicine Division of Gerontology and Geriatric Medicine JSorkin at grecc.umaryland.edu
2009 Dec 08
2
lm: RME vs. ML
windows XP R 2.10 As pointed out by Prof. Venables and Ripley (MASS 4th edition, p275), the results obtained from lme using method="ML" and method="REML" are often different, especially for small datasets. Is there any way to determine which method is preferable for a given set of data? Thanks, john John David Sorkin M.D., Ph.D. Chief, Biostatistics and Informatics
2007 Mar 06
5
Recalling and printing multiple graphs. Is there something in the HISTORY menu that will help?
I have written an R function that produces multiple graphs. I use par(ask=TRUE) to allow for the inspection of each graph before the next graph is drawn. I am looking for a way to recall all graphs drawn in an R session, and a method that can be used to print all the graphs at one time. I know that I could simply print each graph after I inspect the graph, but this gets tiresome if one's