similar to: how to fit model to split data and get residual plots

Displaying 20 results from an estimated 1000 matches similar to: "how to fit model to split data and get residual plots"

2006 Mar 15
1
manipulating weeks dates
Hi, I have these vectors: > WEEK <- rep(c(1:52),2) > YEAR <- rep(c(2000,1999),c(52,52)) How to make a vector of Date with weeks in years? I try as.date from survival package, but it dont work with weeks, just only with days, months etcs. Thanks Ronaldo -- "Realmente minha cidade e muito facultativa" --Elivelton, ao rep?rter da Jovem Pan que falava das muitas
2005 Nov 16
3
Difficulties with for() {while(){}}
Hi, I have the follow function: function() { ## Init of function ... for(i in test) { ... while(j <= test2) { ... } } } The problem is that sometimes, naturally, the while is not possible to be resolved, and so the program abort. In this case I need that program return to the init of function and run again. How I can make this? Abort the while, abort the for
2005 Sep 09
2
best way to fit a model
Hi, I have some data that have this behaviour: | |******* | * | * | * | * |---------------- What is the best and simpler way to fit this in R? Thanks Ronaldo -- Ela pilotava um Continenal 2001 com igni????o autom??tica Magiclic... -- |> // | \\ [***********************************] | ( ?? ?? ) [Ronaldo Reis J??nior ] |>
2005 Sep 04
1
specification for glmmPQL
Hello All, I have a question regarding how glmmPQL should be specified. Which of these two is correct? summary(fm.3 <- glmmPQL(cbind(response, 100 - response) ~ expt, data = data.1, random = ~ 1 | subject, family = binomial)) summary(fm.4 <- glmmPQL(response ~ expt, data = data.2, random = ~ 1 | subject, family =
2008 Jul 03
3
apply with a division
Hi, I'd like to normalize a dataset by dividing each row by the first row. Very simple, right? I tried this: > expt.fluor X1 X2 X3 1 124 120 134 2 165 163 174 3 52 51 43 4 179 171 166 5 239 238 235 >first.row <- expt.fluor[1,] > normed <- apply(expt.fluor, 1, function(r) {r / first.row}) >normed [[1]] X1 X2 X3 1 1 1 1 [[2]] X1 X2 X3 1
2005 Oct 24
3
lme and lmer syntax
Hi, I have this: lme(y~x1+x2,random=~1|x1/x2) How to make this random effect using lmer? I try this: lmer(y~x1+x2+(1|x1/x2) But it dont work. Any idea? Thanks Ronaldo -- System halted! -- |> // | \\ [***********************************] | ( ?? ?? ) [Ronaldo Reis J??nior ] |> V [UFV/DBA-Entomologia ] | / \ [36570-000 Vi??osa -
2006 Jan 23
1
simple problem
Hi, look this: > summary(fam??lia) Anacardiaceae Annonaceae Bombacaceae Cecropiaceae 2 4 1 3 Chrysobalanaceae Clusiaceae Euphorbiacaea Fabacea 1 1 4 3 Fabaceae Flacourtiaceae Humiriaceae indeterminada
2006 Apr 04
1
Problem with Crawley book example
Hi, I try to run the example of Crawley's Book on the page 661, but it fail, look > repmeasures <- read.table("../Packages/Crawley/data/repmeasures.txt",header=T) > attach(repmeasures) > rep <- as.factor(rep) > library(nlme) > model <- lme(height~seed,random=~time|rep/seed) Erro em lme.formula(height ~ seed, random = ~time | rep/seed) : iteration limit
2013 Aug 24
1
Divide the data into sub data on a particular condition
Hi, Use ?split() #dat1 is the dataset: lst1<- split(dat1,dat1$BaseProd) lst1 #$`2231` ?# BaseProd? CF OSA #1???? 2231 0.5 0.7 #2???? 2231 0.8 0.6 #3???? 2231 0.4 0.8 # #$`2232` ?# BaseProd CF OSA #4???? 2232? 1?? 2 #5???? 2232? 3?? 1 # #$`2233` ?# BaseProd? CF OSA #6???? 2233 0.9 0.5 #7???? 2233 0.7 0.5 #8???? 2233 4.0 5.0 #9???? 2233 5.0 7.0 lst1[[1]] #? BaseProd? CF OSA #1???? 2231 0.5 0.7
2006 May 25
1
is possible to use update with lmer models
Hi, the question on subject is possible? example: m1 <- lmer(y~1+(1|subject)) m2 <- update(m1,.~.+x) I try but dont work, exist any other method for this? Thanks Ronaldo -- He won a Toyota now, eh? -- pal?ndromo -- |> // | \\ [***********************************] | ( ? ? ) [Prof. Ronaldo Reis J?nior ] |> V [UNIMONTES/Depto. Biologia
2005 May 09
4
Error in F test on version 2.1.0
Hi, I make a upgrade to R 2.1.0 and in some analysis I give an error: anova(model,test="F") Analysis of Deviance Table Model: binomial, link: logit Response: landing/total Terms added sequentially (first to last) Df Deviance Resid. Df Resid. Dev F Pr(>F) NULL 16 105.079 trat 1 93.149 15 11.930 93.15 Warning message:
2005 Oct 22
2
simple question
Its just a simple question I guess: I have a vector with missing information like x<-c(0,1,31,131,NA,133,NA,310,NA,112,3,1,2,93) How can I make a vector like this no missing in it. I used the x[x<0] commabd and tried some more, with no success. thx Korbinian
2003 Oct 14
1
[OFF] Dataset for extra Crawley Chapter
Hi, anybody have the dataset used in Gamma Errors chapter of the Crawley's books (An Introduction to Data Analysis using S-Plus). specifically the functionalresponse and the Density datasets. Thanks Ronaldo -- For every problem there is one solution which is simple, neat, and wrong. -- H. L. Mencken -- |> // | \\ [***********************************] | ( ? ? ) [Ronaldo Reis
2001 Oct 01
3
can I add to a plot and auto-re-scale axes?
(I'm new to R) Is there a way to add data to an existing plot, and have the plot axes rescaled automatically (i.e. if the new data lie outside the current axes) ? If not, how can I specify multiple datasets at once, so the axes are scaled to accomodate all sets? Details: (Am I using R's data structures in a reasonable way?) I have many small datasets taken under different
2008 Jul 23
1
Calling LISP programs in R
I have written some programs in Common Lisp and I have been using SAS to pipe those programs to my lisp compiler in batch mode by using the %xlog and %xlst SAS commands. I wonder if there is in R a similar way to pipe commands to LISP so that all my work would be concentrated in R even when I have to call a LISP program? I have looked at the foreign library but this seems to adjust data types not
2003 Jun 20
1
glmm and overall goodness of fit
Hi, exist in R any glmm function that have any tools for test for overall goodness of fit? Thanks Ronaldo -- O papel da impressora ? sempre mais forte na parte picotada. -- | // | \\ [***********************************] |> ( ? ? ) [Ronaldo Reis J?nior ] | V [UFV/DBA-Entomologia ] |> / \ [36571-000 Vi?osa - MG ] |
2004 Jun 03
1
[OFF] program to estimate the best fit
Hi, exist in R or any other program for linux that estimate the best fit for data using severals functions? Somethink like tablecurve Thanks Ronaldo -- Um menino-prodigio e uma crianca cujos pais tem muita imaginacao. -- Jean Costeau -- |> // | \\ [***********************************] | ( ?? ?? ) [Ronaldo Reis J??nior ] |> V [UFV/DBA-Entomologia
2004 Nov 09
1
glm.nb stop on Error.
Hi, I make an analysis sequence on R. In some cases the function glm.nb fail to ajust the model. Its Ok. The problem is that this error stop the program. I need treat this error and not stop the program. Something like this: ... model <- glm.nb(y~x,maxit=1000) if(glm.nb fail) { teste[i] <- 0 } else { teste[i] <- anova(modelo)$"P(>|Chi|)"[2] } ... I try this: ...
2009 Apr 21
3
broken example: lme() + multcomp() Tukey on repeated measures design
I am trying to do Tukey HSD comparisons on a repeated measures expt. I found the following example on r-help and quoted approvingly elsewhere. It is broken. Can anyone please tell me how to get it to work? I am using R 2.4.1. > require(MASS) ## for oats data set > require(nlme) ## for lme() > require(multcomp) ## for multiple comparison stuff > Aov.mod <- aov(Y ~ N + V +
2003 Oct 14
2
different results depending of variable position.
Hi, I make an analysis and depending of the order of the variables, the significance change, look. m1 <- glm((infec/ntot)~idade+sexo+peso,family=binomial,weights=ntot) > anova(m1,test="F") Analysis of Deviance Table Model: binomial, link: logit Response: (infec/ntot) Terms added sequentially (first to last) Df Deviance Resid. Df Resid. Dev F Pr(>F)