Displaying 20 results from an estimated 1000 matches similar to: "Error message when using zero-inflated count regression model in package zicounts"
2007 Jul 31
2
choosing between Poisson regression models: no interactions vs. interactions
R gurus,
I'm working on data analysis for a small project. My response
variable is total vines per tree (median = 0, mean = 1.65, min = 0,
max = 24). My predictors are two categorical variables (four sites
and four species) and one continuous (tree diameter at breast height
(DBH)). The main question I'm attempting to answer is whether or not
the species identity of a tree has
2007 Jul 08
1
generating a data frame with a subset from another data frame
R gurus,
I have a data set that looks something like this:
Site Species DBH #Vines
G PLOC 45.9 4
G ACNE 23.3 1
G ACNE 12.0 0
G FRAM 35.9 5
G AEGL 11.2 2
N PLOC 77.3 12
N JUNI 78.6 7
N ACNE 18.9 1
N ACNE 15.7 3
N ACRU 35.5 4
H ACSA2 24.1 6
H ULAM 35.2 7
There are 730 individual trees (22 species) from four sites in the
actual data set. I would like to create a second data frame that
2007 Oct 24
1
Zicounts package
Dear R users,
I have been using the zicounts package (verson 1.1.4) in R (version
2.4.1). I have been fitting zero inflated Poisson regressions to model
the number of trips made by a household. Whilst I can get the best fit
parameter set from zicounts, I can't get the package to return the
fitted values for the model. I have attempted to calculate the fitted
values from the optimal
2006 Sep 12
1
Using XY location data to calculate ecological parameters
Dear R gurus,
I have XY data giving the locations of tree seedlings that were
surveyed during a 210 meter belt transect. This belt transect was
taken by stretching a line across the field, then measuring all
seedlings within 1 meter on either side of the line. The end result
was XY coordinates and height for ~1,300 seedlings. I would like to
use that data to calculate density of
2007 Mar 09
1
help with zicounts
Dear UseRs:
I have simulated data from a zero-inflated Poisson model, and would like
to use a package like zicounts to test my code of fitting the model.
My question is: can I use zicounts directly with the following simulated
data?
Create a sample of n=1000 observations from a ZIP model with no intercept
and a single covariate x_{i} which is N(0,1). The logit part is
logit(p_{i})=x_{i}*beta
2007 Jul 26
1
zeroinfl() or zicounts() error
I'm trying to fit a zero-inflated poisson model using zeroinfl() from the
pscl library. It works fine for most models I try, but when I include either
of 2 covariates, I get an error.
When I include "PopulationDensity", I get this error: Error in solve.default
(as.matrix(fit$hessian)) : system is computationally singular:
reciprocal condition number = 1.91306e-34
When I
2007 Aug 31
1
Strange behavior using subset
Dear R Gurus,
Let's get the technical details out of the way first:
Computer: 1.83 GHz MacBook
R version 2.5.1
I have a data set that contains the following variables: site,
species, total.vines. I need to partition the main data set by site,
the further select only those species that occurred at each site.
When I select by site (site.name<-subset(data frame,Site=="Site
2007 Jun 12
4
Generating artificial datasets with a specific correlation coefficient.
I need to create artificial datasets with specific correlation
coefficients (i.e. a dataset that returns r = 0.30, etc.) as examples
for a lab I am teaching this summer. Is there a way to do that in R?
Thanks.
Jim Milks
Graduate Student
Environmental Sciences Ph.D. Program
136 Biological Sciences
Wright State University
3640 Colonel Glenn Hwy
Dayton, OH 45435
[[alternative HTML version
2005 Feb 11
3
Saving graphs in formats other than PDF?
I am running R 2.01 on Mac OS 10.3.7. Whenever I save graphs, they are
saved as PDF files. Are there any other file formats to which I could save
my graphs. I would like to directly export my graphs to MS Word, if
possible.
Thank you in advance.
Sincerely,
Jim Milks
Graduate Student
Environmental Sciences Ph.D. Program
Wright State University
3640 Colonel Glenn Hwy
Dayton, OH 45435
2005 May 31
2
plane3d
I am attempting to fit a logistic regression plane to a 3-D scatterplot
(which was generated using scatterplot3d). I've noticed that the help
pages of scatterplot3d include a function titled "plane3d." However,
when I attempt to use the function, I get the following message:
Error: couldn't find function "plane3d"
I've searched the archives and found no
2007 Jul 02
4
Extracting sums for individual factors in data frames
I have a data frame with two columns, one of which is a factor
(Species) and the other is numeric (BA, which stands for basal
area). Here's a sample:
Species BA
ACSA 55.7632696
FRAM 122.9933524
ACSA 67.54424205
ACSA 89.22123136
ACSA 82.46680716
ACSA 22.46238747
ACSA 19.94911335
ACSA 20.42035225
ACSA 19.00663555
ACSA 21.67698931
ACSA 57.80530483
ACSA 30.31636911
Dead 43.98229715
Dead
2012 Feb 22
1
Package 'fCalendar'
Dear,
I'm a master student mathematics at university Gent, who's writing a thesis about vines and copula's.
I'm in trouble with the package 'fCalendar' which I need for running 'QRMlib'.
The problem is that 'fCalendar' doesn't have a namespace. I need to use R.2.14.1 because
I also need the package 'vines' which only works for R.2.14.1.
I'm
2005 Apr 18
1
Forcing best-fit lines to go through the origin
Dear All,
I have a rather unusual problem. I have a set of data for a class in
subsurface processes. From that dataset, I must calculate the slope of
the best-fit line (which is the parameter of interest). The problem I
have is twofold: 1) for the purposes of the exercise, I must force my
best-fit line to go through the origin (0,0), and 2) the line must be
linear, even though the data is
2007 Aug 21
2
Optimization problem
Hello Folks,
Very new to R so bear with me, running 5.2 on XP. Trying to do a zero-inflated negative binomial regression on placental scar data as dependent. Lactation, location, number of tick larvae present and mass of mouse are independents. Dataframe and attributes below:
Location Lac Scars Lar Mass Lacfac
1 Tullychurry 0 0 15 13.87 0
2 Somerset 0 0 0
2004 Dec 10
1
subset bug?
I ran into a problem with "subset" while working at home that I am not sure is a bug or not. I defined a custom function to take a data frame of tree positions, sizes, and types (containing the columns TRT, COMP, PLOT, X, Y, DBH and CON) and wanted to make a stem map of the plot using different symbols and colors to represent the different types of tree stems. I copied a bit of the
2013 Apr 06
1
Plotting a curve for a Holling Type III Functional Response
Hey,
So I have a scatter plot and I am trying to plot a curve to fit the data
based on a Holling Type III functional response. My function is this:
nll2<-function(a,b) {
conefun<-(a*DBH^2)/(b^2+DBH^2)
nlls2<-dnbinom(x=cones ,size=DBH, mu=conefun,log=TRUE)
-sum(nlls)
}
and my plot is this:
plot (DBH,cones)
DBH is on the x-axis and cones is on the y-axis. How do I get the curve
2007 Dec 12
1
How to plot the grid figure using R?
Now I have the forest plot data with x, y locations, and I measured the DBH for every indivicuals.
The data looks like that:
x=runif(100,0,100)
y=runif(100,0,100)
dbh=runif(100,1,100)
rdata=data.frame(x,y,dbh)
> rdata[1:5,]
x y dbh
1 99.5354145 1.412844 34.10112
2 0.8259361 87.737036 39.12914
3 6.5678613 65.699032 22.55990
4 67.2987881 72.053877 45.83978
5 2.2491372
2011 Jul 22
1
3d plotting with cloud and wireframe
Hi,
I'm trying to plot an equation in two variables to get a feel
for sensitivity to its parameters. I've run expand.grid to get made-up
vectors of the combinations of the two independent variables, and am trying
to plot the output of the dependent, M, against both the dependent in a 3d
space.
t <- 0:100
DBH <- 10:100
TxDBH<-expand.grid(t,DBH)
time<-TxDBH[,1]
2005 Oct 26
2
changing memory limits to speed up lsoda
Hi All,
I am running R 2.2.0 on Mac OS 10.4.2, dual G5 processors with 8 Gig
RAM.
I am running a simulation with lsoda that requires ~378 s to complete
one set of time intervals. I need to optimize the parameters, and so
need to considerably speed up the simulation.
I have tried to figure out how to change the appropriate memory
allocation and have search R help and Introductory
2011 Jun 23
3
help- subtitles for multiple charts
Hello, I have a problem with my script. I don'y know how to apply subtitles.
I have 9 charts per page (for combination of 3 blocks and 3 treatments). I
want to have subtitles for this interaction (e.g. Block A Trt 1, Block A Trt
2, ...)
MBE$bt<- interaction(MBE$Block,MBE$trt)
par(mfrow=c(3,3))
for(i in unique(MBE$bt)){
ss <- MBE$bt==i
plot(MBE$Year[ss], MBE$DBH[ss])