search for: fitlme

Displaying 11 results from an estimated 11 matches for "fitlme".

Did you mean: fitlm
2006 Nov 09
1
Extracting the full coefficient matrix from a gls summary?
Hi, I am trying to extract the coefficients matrix from a gls summary. Contrary to the lm function, the command fit$coefficients returns only the estimates of the model, not the whole matrix including the std errors, the t and the p values. example: ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14) trt <- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69) group <-
2006 Jan 11
3
how to obtain "par(ask=TRUE)" with trellis-plots
Dear alltogether, how can a delay like possible with par(ask=TRUE) be attained while using trellis-plots within a loop or something like that? the following draws each plot without waiting for a signal (mouse-klick), so par() does not work for that: library(nlme) for(i in 1:3) { fitlme <- lme(Orthodont) par(ask=TRUE) # does not work with trellis.... print( plot(augPred(fitlme)) ) } thanks, leo -- email: leog at anicca-vijja.de www: http://www.anicca-vijja.de/
2012 Nov 07
5
Calling R object from R function
Hi, Can you please help me with this please? What I am trying to do is call a vector from R function and used in the new function So I create 4 functions with these arguments M11 <- function(TrainData,TestData,mdat,nsam) { ls <- list() I have few statments one of them is vectx <- c(,1,2,3,4,5,6,6) vectz <- c(12,34,5,6,78,9,90) and then................ ls(vectx=vtecx,vectz=vectz)
2007 Jan 12
2
Magnitude of trend in time series
Hello, I am analyzing some climate time series data using the Mann Kendall package and was wondering if there was a way to calculate the trend using Sen's nonparametric estimator slope in R? Thank you in advance, Barry _________________________ Barry Baker, Ph.D. Global Climate Change Initiative The Nature Conservancy 2424 Spruce St., Suite 100 Boulder, CO 80302 Tel: (303)-541-0322 Fax:
2010 Mar 15
3
the problem about sample size
Hi all: I am a user of "JM" package. Here's the problem of "sample size". The warning is: Error in jointModel(fitLME, fitSURV_death, timeVar = "time", method = "piecewise-PH-GH") : sample sizes in the longitudinal and event processes differ. According to the suggestion of "missing data",I use the same data set(data_JM) without any missing value. fitLME <- lme(CD4 ~ time + t...
2012 Oct 05
0
jointModel error messages
...I am trying to use the jointModel function in the JM package to fit a > simple joint model to longitudinal and survival data. > I have come accross a range of errors when trying different things and > just can't seem to get around them all. > > The code I use is as follows: > fitLME = lme(cd4~trt+time, random=~time|num, data=mnuts2); summary(fitLME) > fitSURV = coxph(Surv(fail.time, SI.code)~trt, x=TRUE, data=cov); > summary(fitSURV) > fitJM = jointModel(fitLME, fitSURV, timeVar="time", > method="piecewise-PH-GH"); summary(fitJM) > > Both...
2005 Dec 12
2
convergence error (lme) which depends on the version of nlme (?)
Dear list members, the following hlm was constructed: hlm <- groupedData(laut ~ design | grpzugeh, data = imp.not.I) the grouped data object is located at and can be downloaded: www.anicca-vijja.de/lg/hlm_example.Rdata The following works: library(nlme) summary( fitlme <- lme(hlm) ) with output: ... AIC BIC logLik 425.3768 465.6087 -197.6884 Random effects: Formula: ~design | grpzugeh Structure: General positive-definite StdDev Corr (Intercept) 0.3772478 (Intr) dsgn:8 dsgn:7 designmit:8 0.6776543 0.183...
2012 Nov 16
2
R-Square in WLS
Hi, I am fitting a weighted least square regression and trying to compute SSE,SST and SSReg but I am not getting SST = SSReg + SSE and I dont know what I am coding wrong. Can you help please? xnam <-colnames(X) # colnames Design Matrix fmla1 <- as.formula(paste("Y ~",paste(xnam, collapse=
2011 Nov 22
0
plotting output from LME with natural cubic spline
...This model has run without any problem, but now I would like to plot trajectories for subjects using their fitted random effects and incorporating the shape of the natural cubic spline. I am able to plot a point for each subject's fitted random effect score at the time the outcome was measured (fitLME$fitted[,2]). However, I cannot figure out how to connect the points to reflect the natural cubic spline. Does anyone know how to do this using output produced in the LME model object (e.g., fixed or random model coefficients) ? Code: fitLME<-lme(Y~ns(time, df=4), random=list(id = pdDiag(fo...
2007 Sep 12
0
constructing an lm() formula in a function
I'm working on some functions for generalized canonical discriminant analysis in conjunction with the heplots package. I've written a candisc.mlm function that takes an mlm object and computes a candisc object containing canonical scores, coeficients, etc. But I'm stumped on how to construct a mlm for the canonical scores, in a function using the *same* right-hand-side of the model
2003 Jan 29
1
Scoping rule problem -- solved
Thanks to some comments from Brian D. Ripley, I found my error: I should not have given a data argument to lm() after creating a formula-object. This obviously confused things... Thanks again, I've really learnt again a bit more on R-programming... Cheers, Winfried --------------------------------------------------------------------- E-Mail: Winfried Theis <theis at