Displaying 20 results from an estimated 800 matches similar to: "glm models with more than one response"
2010 Jun 21
2
ctree
Hello,
This is a re-submittal of question I submitted last week, but haven't rec'd
any responses.
I need to extract the probabilities used to construct the barplots
displayed as part of the graph produced by plot("ctree").
For example,
library(party)
iris.ct <- ctree(Species ~ . , data = iris)
plot(iris.ct)
Instead of a simple example with only 4 terminal nodes, my
2010 May 17
1
Help with RandomForest
I'm working with the randomForest package and have successfully build a
model. I'd like to go one step further however, and use the output from
the model to construct a map using the output. My input data are spatial,
and I have an independent set of rasterize maps for each of the predictor
variables, to map the classification solution.
Using the getTree function:
>
2010 Jun 25
1
variograms and kriging
Hello
Trying to develop variograms and kriged surfaces from a point file. Here is
what I've done so far.
library(gstat) # also loads library(sp)
library(lattice)
soilpts$x <- soilpts$UTM_X
soilpts$y <- soilpts$UTM_Y
soil.dat <- subset(soilpts, select=c(x, y, Area, BulkDensity, LOI, TP, TN,
TC, Total_Mg))
dim(soil.dat)
[1] 1292 7
coordinates(soil.dat) <- ~ x+y
2010 Jun 14
1
script development for Unconditional Density and Probability estimation
Hello,
I'd like to automate this script a bit more and cycle several
parameters(both the species and the metric). For example where AnnualDepth
occurs, I need to process about 12 metrics so instead of writing this
entire script 12 times once for each metric I'd like to be able to
automatically get another metric.
Any suggestion will be greatly appreciated.
Currently running Windows
2010 Feb 10
0
mlogit: Error reported using sample dataset
I've been working on a multinomial logit model, trying to predict
vegetation types as a function of total phosphorus. Previous responses to
my postings have pointed me to the mlogit package. I'm now trying to work
examples and my data using this package.
data("Fishing", package = "mlogit")
Fish <- mlogit.data(Fishing, varying = c(4:11), shape = "wide",
2003 Nov 04
1
glm offset and interaction bugs (PR#4941)
Full_Name: Charles J. Geyer
Version: 1.8.0
OS: i686-pc-linux-gnu (Suse 8.2)
Submission from: (NULL) (134.84.86.22)
Two bugs (perhaps related, perhaps independent) revealed by the same
Poisson regression with offset
mydata <- read.table(url("http://www.stat.umn.edu/geyer/5931/mle/seeds.txt"))
out.fubar <- glm(seedlings ~ burn01 + vegtype * burn02 +
offset(log(totalseeds)),
2009 Oct 27
1
Using a variable in the formula
I am sure this question has come up, but searching hasn't given me any
results.
So I need to enter this line:
mx1 <- randomForest(X1 ~ elevation + slope + vegtype, data = moths.train)
But the problem is that X1 is currently hard coded. I would instead like to
be able to put in the value of X1 through a list. For example:
list <- list("X1", "X2", "X3")
2010 Jun 09
0
Plotting Question
Hello,
I would like to produce a series of graphs comparing the probability
distributions for 8 factors against a continuous metric.
The kind of graph I'm hoping to produce would look like the density
comparison graphs (library sm) using the function sm.density.compare.
However, instead of calculating the density distributions for comparisons,
I'd like this comparison to be based on
2005 Sep 19
4
factor as seq() in for loop
Dear all,
I would like to use the values in vegaggr.BLMCMR02$colony
str(vegaggr.BLMCMR02)
`data.frame': 1678 obs. of 3 variables:
$ vegtype : Factor w/ 27 levels "2010","2020",..: 3 4 5 19 4 5 19 5
$ colony : Factor w/ 406 levels "0","1","10","100",..: 1 1 1 1 2 2 2
$ Totvegproparea: num 0.00055 0.03956 0.95705
2006 Oct 15
1
gamma distribution don't allow negative value in GLMs?
Dear friends,
when i use glm() to fit my data, i use
glm(formula = snail ~ vegtype + mhveg + humidity + elevation + soiltem, *family
= Gamma(link = inverse),* data =a,))
It shows: error in eval(expr, envir, enclos) : *gamma distribution don't
allow negative value*.
But i use
result<-glm(formula = snail ~ vegtype + mhveg + humidity + elevation +
soiltem, family = poisson, data =a) #this
2006 Jun 09
1
binomial lmer and fixed effects
Hi Folks,
I think I have searched exhaustively, including, of course R-help (D.
Bates, S. Graves, and others) and but I remain uncertain about
testing fixed effects with lmer(..., family=binomial).
I gather that mcmcsamp does not work with Do we rely exclusively on z
values of model parameters, or could we use anova() with likelihood
ratios, AIC and BIC, with (or without)
2006 Jun 14
2
lmer binomial model overestimating data?
Hi folks,
Warning: I don't know if the result I am getting makes sense, so this
may be a statistics question.
The fitted values from my binomial lmer mixed model seem to
consistently overestimate the cell means, and I don't know why. I
assume I am doing something stupid.
Below I include code, and a binary image of the data is available at
this link:
2006 May 24
5
Joining variables
Hello,
If I have two variables that are factors or characters and I want to
create a new variable that is the combination of both what function can
I use to accomplish this?
Ex.
Var1 Var2
SA100055113 19851113
And I want
NewVar
SA10005511319851113
Thanks in advance.
Cameron Guenther, Ph.D.
Associate Research Scientist
FWC/FWRI, Marine Fisheries Research
100 8th Avenue S.E.
St.
2006 May 16
3
subset
Hello everyone,
I have a large dataset (x) with some rows that have duplicate variables
that I would like to remove. I find which rows are the duplicates with
X1<-which(duplicated(x)). That gives me the rows with duplicated
variables. Now, how can I remove just those rose from the original data
frame. I think I can create a new data frame without the duplicates
using subset. I have tried:
2006 Oct 19
2
randomize a matrix
Hello everyone,
If I have an incidence matrix of 0 and 1's
P=[1 1 1 1 1 1
1 1 1 1 0 0
1 1 1 0 0 0
1 1 1 0 0 0
1 1 0 0 0 0]
I want to create a new uniform random matrix [a] that is filled with 0's
and 1's but constrained so that the row and column sums are the same as
in [P]. Does anyone know how to accomplish this?
Thanks in advance
Cameron Guenther, Ph.D.
2005 Nov 21
3
Warning message help
I am trying to great a new column of effort data from an existing vector
of gears used.
It is a simple code where
effort[Gear==300]=(DIST_TOW*7412)
effort[Gear==301]=(DIST_TOW*7412)
The code appears to work for some of the data but fails for others and
inserts a NA value
I also get this warning message
Warning message:
number of items to replace is not a multiple of replacement length
Can
2013 Jun 07
0
error running mvabund package
Dear All,
This is my first post, and probably (and hence apologies that) my question
is very silly!
I'm having issues with a the mvabund package
(http://cran.r-project.org/web/packages/mvabund/index.html),
and would be great to get some help!
Here is the code (and files are attached):
library(mvabund)
##visualizing data
florabund <- read.csv("CPL_floristics_abund_v1d.csv",
2005 Oct 18
3
Repeating lines in a data frame
Hello,
I have a much larger dataset that is similar in form to:
year species length count
1998 1 150 1
1998 2 200 1
1998 3 250 2
1999 1 150 3
1999 2 200 4
1999 3 250 5
2000 1 150 1
2000 2 200 1
2000 3 250 1
2001 1 150 2
2001 2 200 3
2001
2006 May 10
3
Unique?
Hello,
I have sample data set that looks like:
YEAR MONTH DAY CONTINUE SPL TIMEFISH
TIMEUNIT AREA COUNTY DEPTH DEPUNIT GEAR TRIPID
CONVUNIT
1992 1 26 1 SP0073928 8
H 7 25 4 NA 1000000
02163399054 161
1992 1 26 1 SP0073928 8
H 7 25 4 NA 1000000
02163399054 8
1992 1 26 2 SP0004228 8
H 7 25 4 NA 1000000
02163399054 161
1992 1 26 2 SP0004228 8
H 7 25 4 NA 1000000
02163399054 8
1992
2012 Dec 11
1
Interpretation of ranef output
Hello.
I'm running a generalized linear model and am interested in using the
random effects that are output for further analysis. My random effect is
interacting with two different fixed effects (which which are factors with
two levels each). When I retrieve the random effects I get something like
this:
(Intercept) nutrient (Intercept) light (Intercept)
Aa-0 0.59679192