similar to: unbalanced anova with subsampling (Type III SS)

Displaying 20 results from an estimated 3000 matches similar to: "unbalanced anova with subsampling (Type III SS)"

2005 Jan 14
5
subsampling
hi, I would like to subsample the array c(1:200) at random into ten subsamples v1,v2,...,v10. I tried with to go progressively like this: > x<-c(1:200) > v1<-sample(x,20) > y<-x[-v1] > v2<-sample(y,20) and then I want to do: >x<-y[-v2] Error: subscript out of bounds.
2003 Feb 12
1
Na/NaN error in subsampling script
R-help readers, I''m having a problem with an R script (see below), which regularly generates the error message, Error in start:(start + (sample.length - 1)) : NA/NaN argument , for which I am unsure of the cause. In essence, the script (below) generates the start and end points for random subsamples from along a vector (in reality a transect (of a given length,
2009 Apr 06
3
how to subsample all possible combinations of n species taken 1:n at a time?
Hello I apologise for the length of this entry but please bear with me. In short: I need a way of subsampling communities from all possible communities of n taxa taken 1:n at a time without having to calculate all possible combinations (because this gives me a memory error - using combn() or expand.grid() at least). Does anyone know of a function? Or can you help me edit the combn or
2012 Aug 16
1
Big Data reading subsample csv
Hello, I'm most grateful for your time to read this. I have a uber size 30GB file of 6 million records and 3000 (mostly categorical data) columns in csv format. I want to bootstrap subsamples for multinomial regression, but it's proving difficult even with my 64GB RAM in my machine and twice that swap file , the process becomes super slow and halts. I'm thinking about generating
2011 Feb 06
2
Subsampling out of site*abundance matrix
Hello, How can I randomly sample individuals within a sites from a site (row) X species abundance (column) data frame or matrix? As an example, the matrix "abund2" made below. ##### (sorry, Im a newbie and this is the only way I know to get an example on here) abund1 <- c(150, 300, 0, 360, 150, 300, 0, 240, 150, 0, 60, 0, 150, 0, 540, 0, 0, 300, 0, 240, 300, 300,
2011 Aug 11
1
Subsampling data
*Dear R community* * * *I have two questions on data subsample manipulation. I am starting to use R again after a long brake and feel a bit rusty.* * * *I want to select a subsample of data for males and females separately* * * library(foreign) Datatemp <- read.spss("H:/Skjol/Data/HL/t1and2b.sav", use.value.labels = F) > table(Datatemp$sex) 1 2 3049 3702
2008 Sep 26
1
Type I and Type III SS in anova
Hi all, I have been trying to calculate Type III SS in R for an unbalanced two-way anova. However, the Type III SS are lower for the first factor compared to type I but higher for the second factor (see below). I have the impression that Type III are always lower than Type I - is that right? And a clarification about how to fit Type III SS. Fitting model<-aov(y~a*b) in the base package and
2011 Sep 08
1
random sampling but with caveats!
Hi, I wonder if someone can help me. I have built a gam model to predict the presence of cold water corals and am now trying to evaluate my model by splitting my dataset into training/test datasets. In an ideal world I would use the sample() function to randomly select rows of data for me so for example with 936 rows of data in my HH dataset I might say ss <- sample(nrow(HH), size =
2010 Nov 09
1
subsampling table
G'day R-helpers, I want to subsample rows of a large table based on the value in its first column. Of all rows sharing the same value in the first column I want to RANDOMLY extract only one. Thanks in advance, Achim example input 1 15 34 1 4 66 1 24 65 2 23 47 2 9 36 3 58 9 3 38 64 3 12 64 3 4 15 4 1 88 4 23 90 desired output 1 4 66 2 23 47 3 12 64 4 1 88
2005 Jan 26
2
Source code for "extractAIC"?
Dear R users: I am looking for the source code for the R function extractAIC. Type the function name doesn't help: > extractAIC function (fit, scale, k = 2, ...) UseMethod("extractAIC") <environment: namespace:stats> And when I search it in the R source code, the best I can find is in (R source root)/library/stats/R/add.R: extractAIC <- function(fit, scale, k = 2,
2006 Aug 06
1
extractAIC using surf.ls
Although the 'spatial' documentation doesn't mention that extractAIC works, it does seem to give an output. I may have misunderstood, but shouldn't the following give at least the same d.f.? > library(spatial) > data(topo, package="MASS") > extractAIC(surf.ls(2, topo)) [1] 46.0000 437.5059 > extractAIC(lm(z ~ x+I(x^2)+y+I(y^2)+x:y, topo)) [1]
2011 Nov 01
1
Subsampling-oversampling from a data frame
If no one has a better solution, split it, take a sample of size X from both and put it back together. hgwelec wrote: > > Dear members, > > Consider the following data frame (first 4 rows shown) > > > age sex class > 15 m low > 20 f high > 15 f low > 10 m low > > in my original data set i have 1200 rows and a class distribution
2010 Oct 31
2
Randomly split a sample in two equal subsamples
Dear all, I would like to randomly split a sample in two equally large subsamples. The sample data is stored as a matrix with each row representing an individual and each column representing some variable (e.g., name, age, sex, etc.); the first row contains the names of the variables; the first column contains the individual number (1:n, for n individuals); the number of individuals is even (so,
2017 Jun 08
1
stepAIC() that can use new extractAIC() function implementing AICc
I would like test AICc as a criteria for model selection for a glm using stepAIC() from MASS package. Based on various information available in WEB, stepAIC() use extractAIC() to get the criteria used for model selection. I have created a new extractAIC() function (and extractAIC.glm() and extractAIC.lm() ones) that use a new parameter criteria that can be AIC, BIC or AICc. It works as
2010 Nov 18
1
lme Random Effects and Covariates
1. I'm attempting to test for Random Effects. I've grouped the data on subject (grid) but want to use lme to build the model without subject as a RE then add it and do anova between the 2 models. This is the result I get and it appears it's adding Random Effects. tmp.dat4 <- groupedData(Trials ~ 1 | grid, data = tmp.dat4) mod2a <- lme(Trials ~ factor(group_id) + reversal,
2004 Jul 26
1
group definition for a bootstrap
Hi, This is probably really simple, but I am clearly not R-minded, I have read the help files, and reread them, and I still can't work out what to do... I have a data frame (d) with 3 columns (age (0-5), quarter (1-4) and x). I want to estimate the precision of my mean x by age and quarter, so I want to carry out a bootstrap for each group. I am trying to do this within a loop, so I don't
2010 Dec 26
1
Calculation of BIC done by leaps-package
Hi Folks, I've got a question concerning the calculation of the Schwarz-Criterion (BIC) done by summary.regsubsets() of the leaps-package: Using regsubsets() to perform subset-selection I receive an regsubsets object that can be summarized by summary.regsubsets(). After this operation the resulting summary contains a vector of BIC-values representing models of size i=1,...,K. My problem
2007 Dec 07
1
AIC v. extractAIC
Hello, I am using a simple linear model and I would like to get an AIC value. I came across both AIC() and extractAIC() and I am not sure which is best to use. I assumed that I should use AIC for a glm and extractAIC() for lm, but if I run my model in glm the AIC value is the same if I use AIC() on an lm object. What might be going on? Did I interpret these functions incorrectly? Thanks,
2008 Nov 28
2
AIC function and Step function
I would like to figure out the equations for calculating "AIC" in both "step() function" and "AIC () function". They are different. Then I just type "step" in the R console, and found the "AIC" used in "step() function" is "extractAIC". I went to the R help, and found: "The criterion used is AIC = - 2*log L + k *
2004 Dec 01
2
unbalanced design
Hi all, I'm new to R and have the following problem: I have a 2 factor design (a has 2 levels, b has 3 levels). I have an object kidney.aov which is an aov(y ~ a*b), and when I ask for model.tables(kidney.avo, se=T) I get the following message along with the table of effects: Design is unbalanced - use se.contrast() for se's but the design is NOT unbalanced... each fator level