similar to: subset without removing NAs

Displaying 20 results from an estimated 5000 matches similar to: "subset without removing NAs"

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:
2011 Apr 28
1
using lme4 with three nested random effects
Hi all, I'm trying to fit models for data with three levels of nested random effects: site/transect/plot. For example, modelincrBS<-glmer(l.ru.ba.incr~shigo.av+pre.f.crwn.length+bark.thick.bh+Date+slope.pos.num+dens.T+dbh+leaf.area+can.pos.num+(1|site/transect/plot), data=rws30.UL, family=gaussian, na.action=na.omit) but I get the following error: Error: length(f1) == length(f2) is not
2011 May 18
0
using hglm to fit a gamma GLMM with nested random effects?
Apologies for continuing to ask about this but . . in my quest to fit a gamma GLMM model to my data (see partial copy of thread below), I'm exploring using hglm today. The question of the day has to do with the errors I'm currently getting from the hglm package. Can hglm handle a model with nested random effects? I don't see an example of one of those in the package documentation. If
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
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 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,
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
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 Dec 05
1
In factor analysis in the psych package, how can I work out which factors the columns in $scores relate to? How do I know what each of the scores is scoring?
Hi I have used fa() to perform a factor analysis of a psychological battery which is thought to have 11 factors. I can identify which factors the loadings relate to easily enough because I can see which items are loading onto each of the columns in the $loading output. However, how can I identify which items or loadings are being used to create each of the columns in the $scores output? I have
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 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
2013 Apr 29
2
bigmemory and R 3.0
Dear helpers, Does anyone have information on the status of bigmemory and R3.0? Will it just take time for the devs to re-code for the new environment? Or is there an alternative for this new version? Thanks Ben Caldwell [[alternative HTML version deleted]]
2012 Nov 27
3
Psych package: fa.diagram, how to re-arrange layout so numbers do not over-write each other
Dear R help I have conducted a fa() analysis, and I want to use fa.diagram to assess the extent to which the 11 latent factors predict the 37 items in a psychological battery. However, the display on the screen has very large font size for the coefficients of the relationship between the 11 factors and the 37 items, so the numbers overlap and are therefore illegible. When I output this to a
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)
2013 Apr 24
1
getting started in parallel computing on a windows OS
Dear R help, I've what I think is a fairly simple parallel problem, and am getting bogged down in documentation and packages for much more complex situations. I have a big matrix (30^5,5]. I have a function that will act on each row of that matrix sequentially and output the 'best' result from the whole matrix (it compares the result from each row to the last and keeps the
2016 Aug 15
3
how to enable auto-start on newer versions of Xen ?
Hello, In days past, all I had to do was create /etc/xen/auto and put a symlink in there to the config file for each VM I wanted to have started automatically. Since updating to 4.6, this doesn't work.? Period. I'm having a hard time finding what needs to change in order to get VMs to auto start on reboot of a server.? Can someone please point me to documentation that I have missed
2012 Sep 20
1
question on assigning an argument in a function that is create by the function itself
Hi, I need some help with making a function a bit more elegant. How would you all suggest avoiding the problem I've made myself below - I've written a function that creates a temporary matrix by subseting a larger one I assign it. I then call vectors from that matrix, add each item in the vector to create a cumulative vector for each factor, and then patch them all back together.
2012 Nov 26
1
Plotting an adjusted survival curve
First a statistical issue: The survfit routine will produce predicted survival curves for any requested combination of the covariates in the original model. This is not the same thing as an "adjusted" survival curve. Confusion on this is prevalent, however. True adjustment requires a population average over the confounding factors and is closely related to the standardized