similar to: sem package subscript out of bounds error

Displaying 20 results from an estimated 8000 matches similar to: "sem package subscript out of bounds error"

2011 Sep 13
1
mvpart analyses with covariables
Hi all, I am fairly new to R and I am trying to run mvpart and create a MRT using explanatory variables and covariables. I've been following the procedures in Numerical Ecoogy with R. The command (no covariables) which works fine - ABUNDTMRT <- mvpart(abundance ~ .,factors,margin=0.08,cp=0,xv="1se",xval=nrow(abundance),xvmult=100,which=4) where abundance is 4th root
2010 Dec 01
1
procrustes results affected by order of sites in input file
Dear All, I am using a Procrustes analysis to compare two NMDS ordinations for the same set of sites. One ordination is based on fish data, the other is based on invertebrate data. Ordinations were derived using metaMDS() from the {vegan} library as follows: fish.mds<-metaMDS(fish.data, distance="bray", k=3, trymax=100, wascores=TRUE, trace=TRUE, zero="add")
2012 Mar 03
1
interpreting the output of a glm with an ordered categorical predictor.
Greetings. I'm a Master's student working on an analysis of herbivore damage on plants. I have a tried running a glm with one categorical predictor (aphid abundance) and a binomial response (presence/absence of herbivore damage). My predictor has four categories: high, medium, low, and none. I used the "ordered" function to sort my categories for a glm. ah <-
2012 Jul 18
2
loop searching the id corresponding to the given index (timestamp)
Hello, I have the following loop for two data sets: diveData_2008 and diveData_2009. It uses two other data: diveCond_all and fishTable. The problem is at the point to identify the dive_id for the given index (index is timestamp). It keeps on saying for the1st loop Error in fishReport$dive_id[i] <- dive_id : replacement has length zero for the 2nd loop Error in fishReport$dive_id[i + j] <-
2011 Mar 29
2
List extraction
I have created a list of tables with the same columns but different number of row. Example (actual list has ~200 elements): > temp1<- data.frame(ID=c("Herb","Shrub"),stat=c(4,5),pvalue=c(.03,.04)) > temp2<- data.frame(ID=c("Herb","Shrub", > "Tree"),stat=c(12,15,13),pvalue=c(.2,0.4,.3)) > L<-list(a=temp1,b=temp2) > L $a
2010 Jan 27
2
using functions with multiple arguments in the "apply" family
typically, the apply family wants you to use vectors to run functions on. However, I have a function, kruskal.test, that requires 2 arguments. kruskal.test(Herb.df$Score,Herb.df$Year) This easily computes the KW ANOVA statistic for any difference across years.... However, my data has multiple sites on which KW needs to be run... here's the data: Herb.df<-
2007 Sep 29
1
templates with same name before extension are cached
Hi all, I was just wondering if this is the intended behavior. Here is my setup: controller def index respond_to do |f| f.xml { render :xml => true } f.html { render :layout => :none } end end In my views I have a file for each type index.herb index.xerb The first request I send is cached and interferes with the other one. For example, if I send an xml request
2010 Feb 24
1
extracting results from wilcox_test (package::coin)
Recently, I ran a series of Kruskal-Wallace tests [kruskal.test()] using by() to group by site Output is a list: >Herb.KW Herb.df$ID: 10-1 Kruskal-Wallis rank sum test data: Indicator_Rating by Year Kruskal-Wallis chi-squared = 15.24, df = 7, p-value = 0.03302 ----------------------------------------------------------------------------------------------------- Herb.df$ID: 18-1
2009 Jun 04
3
Plot and lm
I want to make a log-log plot with a regression line, but I can't figure out what I'm doing wrong. What I'm trying is: plot(mass,area, log="xy", pch=as.numeric(food)) abline(lm(mass~area)) or plot(mass,area, log="xy", pch=as.numeric(food)) islands$logmass <- log(mass) islands$logarea <- log(area) attach(islands) abline(lm(logmass~logarea)) But that does
2012 May 23
3
barplot
Hey, I am trying to create barplot of abundances over time (in days). The period is over 171 days, so I don't want to have all labels there but only the first day of the month. I couldn't find anything like this on the forum yet. Mostrly it's about year to year data. This is the relevant part of my table: datum month abundance 26/03/11 March 1 27/03/11 March 0 28/03/11 March 1
2011 Jun 13
2
log2() and -min() very quick question
I'm looking over good-code a post-doc in my lab wrote and trying to learn how it works. I came across the following: rel.abundance <- as.matrix(read.delim("rel.abundance.csv",row.names=1,as.is =TRUE)) rel.abundance <- log2(rel.abundance-min(rel.abundance)+1) I'm not sure what the second line is doing. I ran each line in R and couldn't see a noticeable difference in
2006 Oct 12
3
Extrapolated regression lines
Dear list members, When I create a simple scatterplot with a regression line (se below) the line is automatically extrapolated outside the range of data points. Why is this and how can I prevent R from extrapolating the regression line? Thank you in advance, Johan model<-lm(Herb~Para) plot(Para,Herb) abline(model)
2010 May 15
1
Barchart reorder
Hi fellow R users, I have a dataset that looks something like this. species class abundance K 1 592 K 2 288 G 1 254 G 2 239 C 2 173 D 2 123 E 3 89 F 2 87 B 2 86 H 2 82 I 1 79 J 2 76 B 1 73 D 3 72 A 2 62 L 2 58 I want to plot a stacked barchart. species is the x-axis, abundance is y-axis, and class will appear as the stacks in different colours. I need the species to be displayed in descending
2009 Mar 02
2
Unrealistic dispersion parameter for quasibinomial
I am running a binomial glm with response variable the no of mites of two species y->cbind(mitea,miteb) against two continuous variables (temperature and predatory mites) - see below. My model shows overdispersion as the residual deviance is 48.81 on 5 degrees of freedom. If I use quasibinomial to account for overdispersion the dispersion parameter estimate is 2501139, which seems
2009 May 01
3
adding zeros to dataframe
Greetings, I am new to R and am hoping to get some tips from experienced R-programmers. I have a dataset that I've read into R as a dataframe. There are 5 columns: Plot location,species name, a species number code (unique to each species name), abundance, and treatment. There are 272 plots in each treatment, but only the plots in which the species was recorded have an abundance value. For
2013 Jan 18
1
lattice: loess smooths based on y-axis values
Hi there, I'm using the lattice package to create an xy plot of abundance vs. depth for 5 stages of barnacle larvae from 5 species. Each panel of the plot represents a different stage, while different loess smoothers within each panel should represent different species. However, I would like depth to be on the y-axis and abundance to be on the x-axis, because this is more intuitive as an
2012 Dec 06
2
lme4 glmer general help wanted - code included
Hi guys, I'm very new to R and have been teaching myself over the past few months - it's a great tool and I'm hoping to use it to analyse my PhD data.As I'm a bit of a newb, I'd really appreciate any feedback and/or guidance with regards to the following questions that relate to generalized linearmixed modelling (or, at least, I think they do!)(if there is a 'better',
2010 Nov 09
2
new column from column in another df
If I have a data frame where a species occupies several rows with different phases such as (both col's ar factors): species,phase Populus tremula,1 Populus tremula,2 Populus tremula,3 Calluna vulgaris,1 Calluna vulgaris,2 Betula alba,1 Betula alba,2 Betula alba,3 Primula veris,1 Primula veris,2 and another df where each species only have one row: species,growth_form Populus tremula,tree Acer
2006 Dec 05
1
Spearman correlation ties and discrepancies
Hi. I am currently trying to run some Spearman correlations, and have encountered two issues. 1) When using cor.test() with a variable that includes ties, I get the "Cannot compute exact p-values with ties" error. I have read that this function now uses an asymptotic formula that allows for ties, so do not understand why I am getting this error. (I am running version 2.4.0.) I
2011 Aug 11
1
Mixed effect models
I am using two mixed effect models. Firstly, what I am trying to do is to compare green roofs abundance with brownfield, green roof with green space abundance, and finally green space with brownfield abundance. I am unsure if I have done the correct model. I have to use a mixed effect model because my data is nested. This is the code and output >