similar to: Improve aggregate.default ...?

Displaying 20 results from an estimated 100 matches similar to: "Improve aggregate.default ...?"

2007 Nov 12
0
Resid() and estimable() functions with lmer
Hi all, Two questions: 1. Is there a way to evaluate models from lmer() with a poisson distribution? I get the following error message: library(lme4) lmer(tot.fruit~infl.treat+def.treat+(1|initial.size),family=poisson)->model plot(fitted(model),resid(model)) Error: 'resid' is not implemented yet Are there any other options? 2. Why doesn't the function estimable() in gmodels
2008 Feb 19
4
[LLVMdev] 2008-01-25-ByValReadNone.c Failure
Hi all, I'm seeing this failure on my PPC G4 box running TOT with llvm-gcc 4.2. Is anyone else seeing this? I'm sure it's related to the byval stuff that's recently gone into LLVM. I'm attaching the output of this command: $ llvm-gcc -emit-llvm -O3 -S -o - -emit-llvm /Users/wendling/llvm/ llvm.src/test/CFrontend/2008-01-25-ByValReadNone.c As you can see in it, there
2008 Jul 09
4
Strptime/ date time classes
Dear all, I've come across a problem using strptime, can anyone explain what's going on? I'm using version 2.7.0 on Windows XP. Thank you Caroline First read in a data file using read.table alldata = read.table(file, header=F, skip=4, colClasses = c("character","numeric")) dim(alldata) [1] 223960 2 # inefficient, safe way of sorting out missing or dodgy
2007 Dec 11
3
matrix graph
Hi All, simple question: do you know how to graph the following object/matrix in a 'surface manner': [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.154 -0.065 0.129 0.637 0.780 0.221 [2,] 0.236 0.580 0.448 0.729 0.859 0.475 [3,] 0.401 0.506 0.310 0.650 0.822 0.448 [4,] 0.548 0.625 0.883 0.825 0.945 0.637 [5,] 0.544 0.746 0.823 0.877 0.861 0.642 [6,] 0.262 0.399
2005 Nov 29
1
Indexing variables within lapply?
Hello I am using R 2.2.0 with Windows XP. I've got a five element list object, each element containing two dataframes of equivalent size. > str(mylist) List of 1 $ data1:List of 2 ..$ data1a :`data.frame': 77 obs. of 63 variables: .. ..$ var1 : num [1:77] 0.41375 0.00056 1.43040 1.43528 0.61730 ... .. ..$ var2 : num [1:77] 1.154 1.686 0.673 0.800 0.760 ... ..
2006 Sep 13
1
S in cor.test(..., method="spearman")
Dear HelpeRs, I have some data: "ice" <- structure(c(0.386, 0.374, 0.393, 0.425, 0.406, 0.344, 0.327, 0.288, 0.269, 0.256, 0.286, 0.298, 0.329, 0.318, 0.381, 0.381, 0.47, 0.443, 0.386, 0.342, 0.319, 0.307, 0.284, 0.326, 0.309, 0.359, 0.376, 0.416, 0.437, 0.548, 41, 56, 63, 68, 69, 65, 61, 47, 32, 24, 28, 26, 32, 40, 55, 63, 72, 72, 67, 60, 44, 40, 32, 27, 28, 33,
2007 Apr 17
3
Extracting approximate Wald test (Chisq) from coxph(..frailty)
Dear List, How do I extract the approximate Wald test for the frailty (in the following example 17.89 value)? What about the P-values, other Chisq, DF, se(coef) and se2? How can they be extracted? ######################################################> kfitm1 Call: coxph(formula = Surv(time, status) ~ age + sex + disease + frailty(id, dist = "gauss"), data = kidney)
2008 Sep 09
1
write dataframes
Hi, After manipulate my data I have ended up with 5 different data frames with different number of observations but the same number of variables (columns) An example, if I write str(object1), I see this, data.frame': 47 obs. of 3 variables: $ ORF : Factor w/ 245 levels "YAL038W","YAL054C",..: 10 19 38 39 44 45 50 51 59 60 ... $ mRNA : num 0.891 1.148 1.202
2013 Mar 28
0
using cvlm to do cross-validation
Hello, I did a cross-validation using cvlm from DAAG package but wasn't sure how to assess the result. Does this result means my model is a good model? I understand that the overall ms is the mean of sum of squares. But is 0.0987 a good number? The response (i.e. gailRel5yr) has min,1st Quantile, median, mean and 3rd Quantile, and max as follows: (0.462, 0.628, 0.806, 0.896, 1.000, 2.400) ?
2008 Jun 05
1
choosing an appropriate linear model
I am trying to model the observed leaching of wood preservative chemicals from treated wood during an outdoor experiment where leaching is caused by rainfall events. For each rainfall event, the amount of rainfall was recorded as well as the amount of preservative chemical leached. A number of climatic variables were measured, but the most important is the amount of rainfall. I have tried a
2011 Aug 18
1
Using mixed models to analyze Longitudinal intervention
Dear R List, I am trying to use mixed models to analyze an intervention and want to make sure I am doing it correctly. The intervention is for lowing cholesterol and there are two groups: one with an intervention and one without. The subjects were evaluated a differing amount of time, so there were between 2 and 7 visits, equally spaced. Sample output is below. TC is total cholesterol,
2011 Nov 21
2
errors with lme4
Dear list, i'm a new R user, so I apologize if the topic is already being addressed by some other user. I'm trying to determine if the reproductive success of a species of bird is related to a list of covariates. These are the covariates: ? elev: elevation of nest (meters) ? seadist: distance from the sea (meters) ? meanterranova: records of temperature ? minpengS1: records
2009 Feb 23
1
why results from regression tree (rpart) are totally inconsistent with ordinary regression
Hi, In my analysis of impacts of insecticide-treated bednets on malaria, I look at the relationship between malaria incidence and mosquito behaviors. The condensed data set is copied here. Ordinary regression (lm) shows that Incidence was negatively related to Mortality. This makes sense because the latter reflected the strength of killing mosquitoes by insecticide-treated nets. Since the
2008 Aug 21
1
summary.lme and anova question
Dear all, When analyzing data from a climate change experiment using linear mixed-effects models, I recently came across a situation where: - the summary(model) showed a significant difference between the levels of a two-level factor, - while the anova(model) showed no significance for that factor (see below). My question now is: Is the anova.lme() approach correct for that model? And why does
2012 May 25
1
Problem with Autocorrelation and GLS Regression
Hi, I have a problem with a regression I try to run. I did an estimation of the market model with daily data. You can see to output below: /> summary(regression_resn) Time series regression with "ts" data: Start = -150, End = -26 Call: dynlm(formula = ror_resn ~ ror_spi_resn) Residuals: Min 1Q Median 3Q Max -0.0255690 -0.0030378 0.0002787
2008 Aug 16
1
ANCOVA: Next steps??
Having spent the last few weeks trying to decipher R, I feel I may finally be getting somewhere, but i'M still in need of some advice and all my tutors seem to be on holiday! Basically a bit of background, I have data collected on a population of Lizards which includes age,sex, and body condition. I collected data myself this year and I have data previously collected from 1999, 2002 and
2008 Feb 19
3
Why does plot() ignore the data type for axis labels?
Hello, I was wondering why the plot() command ignores the datatype when displaying axis labels. More specifically, if the data points are integers then the axis labels should intuitively also be integers, right? > x <- as.integer(c(1,2,3)) > y <-x > typeof(x) [1] "integer" > plot(x,y) > The axis labels are 1.0, 1.5, 2.0, 2.5, 3.0 but if the integer type were
2011 May 20
5
regression coefficient for different factors
Dear R-helpers, In my dataset I have two continuous variable (A and B) and one factor. I'm investigating the regression between the two variables usign the command lm(A ~ B, ...) but now I want to know the regression coefficient (r2) of A vs. B for every factors. I know that I can obtain this information with excel, but the factor have 68 levels...maybe [r] have a useful command. Thanks,
2012 Jul 02
1
How to get prediction for a variable in WinBUGS?
Dear all,I am a new user of WinBUGS and need your help. After running the following code, I got parameters of beta0 through beta4 (stats, density), but I don't know how to get the prediction of the last value of h, the variable I set to NA and want to model it using the following code.Does anyone can given me a hint? Any advice would be greatly appreciated.Best
2013 Sep 25
1
Best and worst values for each date
Hi, May be you can try this: obj_name<- load("arun.RData") Pred1<- get(obj_name[1]) Actual1<- get(obj_name[2]) library(reshape2) dat<-cbind(melt(Pred1,id.vars="S1"),value2=melt(Actual1,id.vars="S1")[,3])? # to reshape to long form colnames(dat)[3:4]<- c("Predict","Actual") dat$variable<- as.character(dat$variable) #not that