Displaying 20 results from an estimated 34 matches for "btcaldwel".
Did you mean:
btcaldwell
2011 May 18
0
using hglm to fit a gamma GLMM with nested random effects?
....thick.bh+ht.any, random=~1|site, family=Gamma(link=log), data=rws30.BL)
Error in hglm.default(X = X, y = Y, Z = z, family = family, rand.family =
rand.family, :
Length of X and Z differ.
>
* Dennis Murphy <djmuser at gmail.com> Tue, May 17, 2011 at 6:18 PM
To: Benjamin Caldwell <btcaldwell at berkeley.edu>
Hi:
Someone else (Wayne Zhang, CNA) asked a similar question re
hierarchical Gamma models on R-help today and responded to suggestions
as follows:
"Hglm does the work! Thanks!
Also, I find that the developing version of lme4, called lme4a, has
the capability to fit Gam...
2013 Jan 09
2
writing to .xlsx
Dear r helpers;
I'm interested in reading from and writing to large .xlsx files fairly
regularly. (Why, the naysayers may ask - and the answer is basically
colleagues and clients who prefer that format). I've tried out the
XLConnect and xlsx libraries, but the java implementation they use just
takes too much RAM for the files I'm working with.
gdata leverages perl and works really
2012 Oct 08
3
turn list into dataframe
Dear R users,
I'm starting to use 'apply' functions rather than for loops in R, and
sometimes the output is a bit different than what I want. In this case, the
command was
tapply(myvector,myindex,cumsum)
And the output was something like this:
$`SNRL1 Core 120`
[1] 2.8546 4.0778 5.2983 6.3863 7.5141 8.5498 9.5839 10.6933
$`SNRL1 Core 230`
[1] 7.6810 8.7648 9.8382
2011 Jul 30
2
iterative using values from a data frame to parameterize a function
Hello,
I'm just trying to wrap my head around the syntax for creating loops,
functions in R. I have an array of values from a .csv. Looks something like
header<-c(species,coefficient1, exponent1, coefficient2, exponent2,
constant)
with a species name for the first column, and values for coefficient1,
exponent1, coefficient2, exponent2, constant for each species.
The values are
2012 Mar 29
3
scalar assignment within a vector within function
Hello,
I'm trying to create a vector of r^2 values for using a function which I
will run in a "for" loop. Example:
per<-rnorm(100,.5,.2)^2
x<-rnorm(100,10,5)
y<-rnorm(100,20,5)
fr<-data.frame(x,y,per)
test<-rep(0,9)
plotter<-function(i){
temp.i<-fr[fr$per <=(i*.10),]
with(temp.i, plot(x, y, main=(i*.10),))
mod<-lm(y~x-1,data=temp.i)
2011 Apr 13
1
print to .jpeg
Evening folks,
I'm trying to print a series of graphs to .jpeg using a variable as the
title, but run into the difficultly that I can't find a way to append the
file extension to the .jpeg (in this case extensionless!) files.
Example:
----
species.name="CussoniaHolstii"
dia<-10:100
biomass = -21.4863 + 0.5797 * (dia ^ 2)
biomass
jpeg(species.name)
plot (biomass,
2011 May 17
0
hierarchical gamma model in lme4
Addendum: I tried a gamma fit in glmmPQL and got the same errors.
*Ben Caldwell*
PhD Candidate
University of California, Berkeley
On Tue, May 17, 2011 at 3:51 PM, Benjamin Caldwell
<btcaldwell@berkeley.edu>wrote:
> Hello
> After seeing this (
> https://stat.ethz.ch/pipermail/r-sig-mixed-models/2011q1/005213.html) email
> I thought I would check the issue with a gamma family in lme4 hadn't been
> fixed; can I fit a hierarchical gamma model in lme4 at this time? The...
2011 Jul 21
1
simulation for equation with two variables
Hi,
I'm trying to run a basic simulation and sensitivity test by running an
equation with two variables and then plotting the results against each of
the vectors. R is running the vectors like this : 0 with 0, 1 with 1, etc. I
would like it to run them like 0 for 1:100, 1 for 1:100, and then the
reverse (so 100^2*100@ iterations. How do I get it to do that? Here's what I
have so far:
2012 Feb 02
1
gsub syntax help
I have some elements in a vector with extraneous information (e.g. file
name and sample IDs) that I'd like to strip from every element.
For example, I would like "SPI1.S1.str1.P3.sample.tif"
"SPI1.S1.STR2.P1.sample.tif" to read "SPI1.S1.str1.P3" "SPI1.S1.STR2.P1".
Will someone help me with the syntax in gsub? It needs to be something
like
2011 Feb 10
2
for loop to merge .csvs
So I needed to merge 17 .csv files, and did so by brute force, but I might
need to do so again. Anyone have suggestions for a for loop that might do
the below for me (where a:r are separate .csv files)
ab<-merge(a,b,all=TRUE)
cd<-merge(c,d,all=TRUE)
ef<-merge(e,f,all=TRUE)
gh<-merge(g,h,all=TRUE)
ij<-merge(i,j,all=TRUE)
kl<-merge(k,l,all=TRUE)
no<-merge(m,n,all=TRUE)
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]
2011 May 13
1
using glmer to fit a mixed-effects model with gamma-distributed response variable
Sub: using glmer to fit a mixed-effects model with gamma-distributed
response variable
Hello,
I'm currently trying to fit a mixed effects model , i.e.:
> burnedmodel1.2<-glmer(gpost.f.crwn.length~lg.shigo.av+dbh+leaf.area+
bark.thick.bh+ht.any+ht.alive+(1|site/transect/plot), family=gaussian,
na.action=na.omit, data=rws30.BL)
If I run this code, I get the error below:
Error:
2012 Jun 01
1
trouble with append() in a for loop
Hello all,
*
*
I'm having some difficulty, and I think the problem is with how I'm using
append() nested inside a for loop. The data are:
y,x
237537.61,873
5007.148438,227
17705.77306,400
12396.64369,427
228703.4021,1173
350181.9752,1538
59967.79376,630
140322.7774,710
42650.07251,630
5382.858702,264
34405.82429,637
92261.34614,980
144927.1713,1094
362998.7355,1420
203313.6442,1070
2012 Mar 30
1
avoiding expression evaluation when calling a function
Another question on functions - I have something that looks like
plotter<-function(i){
temp.i<-rwb[rwb$vector1 <=(i*.10),]
with(temp.i, plot(vector2, vector3, main=(i*.10),))
mod<-lm(vector3~vector3-1,data=temp.i)
r2<-summary(mod)$adj.r.squared
rsqrd[i]<-r2
legend("bottomright", legend=signif(r2), col="black")
abline(mod)
rsqrd<<-rsqrd
}
I'd
2012 Nov 02
1
mergeing a large number of large .csvs
Dear R help;
I'm currently trying to combine a large number (about 30 x 30) of large
.csvs together (each at least 10000 records). They are organized by plots,
hence 30 X 30, with each group of csvs in a folder which corresponds to the
plot. The unmerged csvs all have the same number of columns (5). The fifth
column has a different name for each csv. The number of rows is different.
The
2010 Jul 15
5
Cut a within elements by length, not value, of vectors
Hello, I have a vector, "dates", as a series of 3 digit elements, i.e. > date
[1] 528 528 528 528 528 528 528 528 528 528 528 528 708 708 708 708 708
708
[19] 708 708 708 708 529 529 529 529 529 529 529 529 529 529 529 529 529
529
[37] 529 624
I need to convert them into julian, but have to insert a "/" or "-" after
the first number within each element of the
2013 Apr 20
2
matrix of size 30^5
Dear R helpers
Reproducible example:
#warning - this causes a hard freeze on the machines I've tried it on
matrix.holder<- matrix(rnorm(150), nrow=30, ncol=5)
Out=
expand.grid(matrix.holder[,1],matrix.holder[,2],matrix.holder[,3],matrix.holder[,4],
matrix.holder[,5])
Problem:
I'm running an analysis that I would like to do using a matrix containing
all the possible combinations of
2012 Apr 01
1
indexing in a function doesn't work?
Hello,
I've written a small function that's supposed to save me some time, and
it's ending up killing it- the intention is to iteratively subset a dataset
fram on framevec, fit a model (either lm or nls depending on type) and
return the r2 or AIC from the model, respectively. Although as far as I can
tell in my code the plots are dependent on the fit of the model to the data
and the
2013 Feb 12
3
improving/speeding up a very large, slow simulation
Dear R help;
I'll preface this by saying that the example I've provided below is pretty
long, turgid, and otherwise a deep dive into a series of functions I wrote
for a simulation study. It is, however, reproducible and self-contained.
I'm trying to do my first simulation study that's quite big, and so I'll
say that the output of this simulation as I'd like it to be is
2013 Feb 21
2
ggplot2, geomtile fill assignment
Dear R help,
I have some readings in three dimensions (x, y, z) and an amplitude for
each. I'd like to visualize the data using ggplot, using tile plots, as I
have some additional point data I would like to eventually overlay on the
tile plots.
I would like to subset the data by sections, slices if you will, in the z
dimension, and plot the data for that slice.
I can do all of this, but am