similar to: plotting fitted lme values as a smooth line

Displaying 20 results from an estimated 700 matches similar to: "plotting fitted lme values as a smooth line"

2006 Mar 28
0
Help with the code
library(survival) library(boot) data=NULL lambda=NULL result=NULL pat=rep(1:102,each=1) trt=rep(c(1,0),51) status=rep(1,102) site=rep(1:51, each=2) nr.datasets=100 seed=2006 beta=log(1/2) for (i in 1:51) { lambda[i]=1+((3-1)/50)*(i-1)} lambda1=rep(lambda, each=2) dummy=rep(c(exp(beta),1),51) elf=lambda1*dummy r=70 #the number of bootstrap replicates
2003 Jun 07
2
Ordering long vectors
I need to order a long vector of integers with rather few unique values. This is very slow: > x <- sample(rep(c(1:10), 50000)) > system.time(ord <- order(x)) [1] 189.18 0.09 190.48 0.00 0.00 But with no ties > y <- sample(500000) > system.time(ord1 <- order(y)) [1] 1.18 0.00 1.18 0.00 0.00 it is very fast! This gave me the following idea: Since I don't care
2010 Aug 24
2
Attempted SIP connection by foreign host. Help!
Say, I just picked this up on my messages! There are a whole host of these requests! Anyone know whow there people are? Is there a way to report them? Any suggestions as to how to block them? [Aug 23 10:34:16] NOTICE[1010] chan_sip.c: Registration from '"912" <sip:1 at 41.1.1.1>' failed for '184.106.217.112' - Wrong password [Aug 23 10:34:16] NOTICE[1010]
2008 Mar 23
1
mapply
In an earlier post, a person wanted to divide each of the rows of rawdata by the row vector sens so he did below but didn't like it and asked if there was a better solution. rawdata <- data.frame(rbind(c(1,2,2), c(4,5,6))) sens <- c(2,4,6) temp <- t(rawdata)/sens temp <- t(temp) print(temp) Gabor sent three other solutions and I understood 2 of them but not the
2012 Nov 12
2
Using "apply" instead of "for" loop / multithreading
Hello , I'm new to R and don't really understand how to use the function "apply" instead of a "for loop", particularly for a function with multiple entries. I have a big data file and would like to apply a function in multi thread to accelerate the processus. I have a data frame containing values of* CO2 in ppm (resp[i,6])* that I want to convert in umol of CO2
2010 Apr 25
1
Manipulating text files
Dear R Community, I am trying to optimize a water quality model that I am using. Based on conversations with others more familiar with what I am doing I plan to implement DEOptim to do this. The water quality model is interfaced through a GUI. I have the input file necessary to alter parameters and run the model as a text file. To do the optimization I have figured out the general procedure
2008 Nov 07
0
help with syntax of random formula
Dear R-users Thanks to Jose Pinheiro, Douglas Bates and coworkes for providing R with the nlme package. Could someone help me, please, to specify a correct random formula for a mixed model, that specifies no random effect on a higher level? I have the following dataset of timeseries of respiration measurements (column resp) of biomass including a parameter initial biomass x0. Respiration
2006 Mar 06
3
Interleaving elements of two vectors?
Suppose one has x <- c(1, 2, 7, 9, 14) y <- c(71, 72, 77) How would one write an R function which alternates between elements of one vector and the next? In other words, one wants z <- c(x[1], y[1], x[2], y[2], x[3], y[3], x[4], y[4], x[5], y[5]) I couldn't think of a clever and general way to write this. I am aware of gdata::interleave() but it deals
2008 Oct 15
1
ggplot2: sub/super-script axes labels
How are sub/superscripts designated for text in axis labels? As in this y-axis label: scale_y_continuous("Respiration, pmol O2 h-1") where the "2" needs to be subscripted and the "-1" needs to be superscripted. Thanks. Adam --------------------------------------------------- Adam G. Marsh, Ph.D. Associate Professor Marine Biological Sciences University of
2012 Dec 04
1
control point size of superscript when labeling axes with title()
Hi- A journal has asked me to make all of my text annotations on a figure at 10-point size. For the most part this is easy, e.g. by creating figures with: pdf(..., family='Times', pointsize=10) But where I have superscripts (or subscripts) in axis labels, the default seems to be to shrink the superscripted text slightly. For example this code:
2008 Nov 09
1
choice of an HMM package
We are trying to build a human respiration model. Preliminary analysis of some breathing signals has shown that humans breathe through switching among a finite number of patterns. Hidden Markov seems to be the right approach. Since most of our code is written in R scripting language, finding an R package implementing an HMM that we can use for our prototype would be very helpful. I have been
2012 Mar 21
1
nlme error on dimensions in multiplication
Hello R users, When trying to fit a nonlinear mixed model to a respiration time series, I get the following error message: Error in recalc.varFunc(object[[i]], conLin) : dims [product 30] do not match the length of object [34] In addition: Warning message: In conLin$Xy * varWeights(object) : longer object length is not a multiple of shorter object length Below is an example that generates
2012 May 30
1
caret() train based on cross validation - split dataset to keep sites together?
Hello all, I have searched and have not yet identified a solution so now I am sending this message. In short, I need to split my data into training, validation, and testing subsets that keep all observations from the same sites together ? preferably as part of a cross validation procedure. Now for the longer version. And I must confess that although my R skills are improving, they are not so
2013 Jun 22
1
metaMDS Error, Nan similar or negative values
H ello R-experts, I want to do ordination plots using vegan metaMDS. I have a where many cells have zero values. Data structure: X[1:10,1:14] Height.1 Height.2 Height.3 Height.4 Height.5 Height.6 Height.7 Height.8 Height.9 Height.10 Height.11 Height.12 Height.13 D30I1A 46 0 0 0 0 0 0 0 0 0 39 0 98 D30I1B
2008 Jul 28
1
Interpolating a line and then summing there values for a diurnal oxygen curve (zoo object)
#I would like to interpolate a straight line between 06/08/06 04:16:00 - 06/08/06 20:31:00 with values and then sum them. This is an estimate of ecosystem #respiration and I will be using this in a larger context(48 days of these diurnal curves), but for right now I am just trying to figure out how to do it for this one #day example. I have some other code for Ecosystem (stream) Metabolism that
2011 May 03
3
ANOVA 1 too few degrees of freedom
I'm running an ANOVA on some data for respiration in a forest. I am having a problem with my degrees of freedom. For one of my variables I get one fewer degrees of freedom than I should. I have 12 plots and I therefore expected 11 degrees of freedom, but instead I got 10. Any ideas? I have some code and output below: > class(Combined.Plot) [1] "character" >
2007 Nov 28
0
Power Spectral Sensity
I am working with a dissolved oxygen dataset. continuous readings are taken at 15 minute intervals and we have been recording these data at 12 stations along the savannah river for two years now. The longest set of readings that are continuous without interuption is 53 days. I would like to look at the power spectral density at each of these sites (most likely one day will be the overridding
2009 Feb 02
0
repeated measures with gls
I am using the gls function of the nlme package to analyze data sets of soil respiration which have the following design: 3 complete blocks x 5 sampling dates (time from fertilization) x 3 fertilization levels. The fertilization dates are equal for all subjects (blocks) but not periodical (-46, 10, 24, 53, 123 days from the event). The code that I've been using is: fit.csnC<- gls(dno.C
2011 May 24
1
ANOVA Residual SS and MS of 0
I am trying to run an ANOVA on my soil respiration data, but I keep getting residual sum of squares and mean square of zero. As I understand it that would mean that the model terms explain all of the variation in the response variable. That should be virtually impossible, should it not? Where do I begin troubleshooting such a problem? -- View this message in context:
2007 Nov 16
1
graphics - line resolution/pixelation going from R to windows metafile
I have a recurring graphics issue that I've not been able to resolve with R. If I make a series of regression estimates and then plot the estimated function for the regression lines over a scatter plot of the data, e.g., using a sequence of plot( ) and lines ( ) similar to those below