Displaying 20 results from an estimated 4000 matches similar to: "standard error of difference for mixed effects"
2010 Jul 14
1
Converting POSIXct vales to real values
I have a dataframe that contains time values in the form of yyyy-mm-dd hh:mm i.e. 2010-07-14 13:00. When I convert this to numeric via tvec <- as.numeric(Time) I get a number that is in seconds. So far so good. When I then divide the numeric value by the number of seconds in a day eg tvec/(60*60*24) I only get integer values and not fraction of a day which is what I want.
What do I need to
2010 Jul 15
2
taking daily means from hourly data
I have a data frame (morgan) of hourly river flow, river levels and wind direction and speed thus:
Time hour lev.morgan lev.lock2 lev.lock1 flow direction velocity
1 2009-07-06 15:00:00 15 3.266 3.274 3.240 1710.6 180.282 4.352
2 2009-07-06 16:00:00 16 3.268 3.272 3.240 1441.8 192.338 5.496
3 2009-07-06 17:00:00 17 3.268
2010 Aug 12
0
termplot for mixed linear effects models
Is there an equivalent package for mixed linear effects models developed using the package "nlme" as there is for linear models?
Tschüß
Tony Meissner
Principal Scientist (Monitoring/Statistics)
Resource Monitoring
Science, Monitoring and Information Division
Department for Water
"Imagine" ©
*(ph) (08) 8595 2209
*(mob) 0401 124 971
*(fax) (08) 8595 2232
* 28 Vaughan Terrace,
2010 May 26
0
substitution in a function
I have the following function defined as below
match.trace <- function(dfobj, distance, day1, day2) {
day1 <- substitute(dfobj$day1); day1
day2 <- substitute(dfobj$day2)
distance <- substitute(dfobj$distance)
xx <- NULL
for (i in 0:10) xx[i+1] <- with(dfobj,
cor(Lag((day1-day1[1]),i), (day2-day2[1]), use='pair'))
i <- match(max(xx), xx)
with(dfobj, {
2011 Feb 01
1
Setting maximum value of the legend on an image.plot and animation
Hello,
I'm doing the following:
library(ncdf)
library(fields)
library(animation)
saline <- open.ncdf("salinity_1990.nc")
salt = get.var.ncdf(nc=saline, varid="Salinity")
# create an animation of the complete temporal domain in the ncdf file.
saveHTML({
for (i in 1:364) {
image.plot(salt[, , i])
}
}, img.name = "salinity.img",
2009 Jun 08
4
increase number of ticks on x axis of dates
My x axis is a series of daily dates (e.g., 01/01/2000, 01/02/2000,
etc.) from 2000 to end of 2008. The default only gives me 4 ticks. I
want more. Why doesn't this work?
sdate<-as.POSIXct(strptime(date,format="%m/%d/%Y"))
plot(ppt~sdate,type="l",ylim=c(0,47),col=1,lwd=1,pch=16,ylab="Salinity,
psu",xlab="Year",las=1,main="Duck Key
2010 Dec 09
1
Barplot with "Independent" Lines Y axis
Hi list. I'm plotting pluviometric (Rain) data as a barplot, and then adding
the salinity variable to this plot as lines. Obviously as these Y scales are
completely different the salinity appears at the lower part of the graph
extremely compacted. I need to plot the line at the exactly same area of the
barplot but with its own Y axis (at the right), so the salinity can use the
plot area
2009 Dec 07
2
data.frame to "stacked frame"
Hi,
have anybody a hint how i could avoid the cumbersome way (..especially
the value part)
change the data representation from n column data.frame to an stacked
representation.
many thanks
Christian
#example data
dfw <- as.data.frame(matrix(runif(10*10),ncol=10))
dfw$group <- sample(c("X","Z"),nrow(dfw),replace=T,prob=c(0.75,0.25))
# change
var <-
2007 Oct 12
1
Differencing data by groups
Colleagues,
I am analyzing data collected during oceanographic cruises. We have
conducted many cruises over the last decade. On each cruise we visit ~50
stations. At each station (termed EventNum)we lower an instrument that
measures depth, temperature, salinity and oxygen every few seconds as it is
lowered through the water. Data from all EventNums on all cruises are
stacked, generating a data
2012 Nov 21
3
Help with loop
Hi,
I have used R for some time, but managed to avoid writing loops. But this
time I am afraid there is no way around it.
I have a dataframe with time and salinity (see below). I would like to
extract the time intervals where salinity changes by less than 0.05. So
using the values below this would mean that a subset was made from
2003-07-19 to 2003-07-24, where the change in salinity exceeded
2012 Dec 12
2
help with predict.glm, and charting with factors
Dear R Wizards,
After much frustration and days of confusion I have finally broken down and
am asking for help, which I don’t like doing, but I just can’t figure this
one out on my own. I’ve conducted a laboratory experiment testing the
effects of temperature and salinity on whether or not a biological event
will occur (Go or NoGo). I’ve coded the factors temperature and salinity
as factors for
2003 May 05
3
polr in MASS
Hi, I am trying to test the proportional-odds model using the "polr" function in the MASS library with the dataset of "housing" contained in the MASS book ("Sat" (factor: low, medium, high) is the dependent variable, "Infl" (low, medium, high), "Type" (tower, apartment, atrium, terrace) and "Cont" (low, high) are the predictor variables
2002 Aug 20
1
About lm()
Dear Mr. and Mrs.
I'm very grateful for these software and this list.
My question is:
when a use linear multiple regression (lm()) for my data,
abundance ichthyoplankton ~ salinity + temperature + month of the
year(f1 is a factor: 1 for january, 2 for february, ..., 12 for december),
the summary() of results is
...
Coefficients:
Estimate Std. Error t value Pr(>|t|)
2012 Jul 11
2
Modifying the design matrix X in GAMS to suit data assimilation
I have a data assimilation problem that might be amenable to the use of GAMS, but I am not sure how feasible it is to implement. I was told the R mailing list was a great resource.
My observations are spatiotemporal salinity in the San Francisco Bay at a number of instruments over a few days. The thing that I want to fit is the initial condition for a salt transport model at the beginning of this
2012 Feb 10
2
apply pairs function to multiple columns in a data frame
I am very new to R and programming and thank you in advance for your patience
and help with a complete novice!
I am working with a large multivariate data set that has 10 explanatory
environmental variables (e.g. temp, depth) and over 60 response variables
(each is a separate species). My data frame is set up like the simplified
version below:
JulianDay Temperature Salinity Depth Copepod
2010 Dec 09
2
RES: Barplot with "Independent" Lines Y axis
Oh sorry. An example say lots more than words. The data below, when
submitted to twoord.plot return the mentioned error. Rain are bars and Salt
lines, the bars appear and the error occurs with the salt data.
Point Rain Salt
Fev/03 365.6 13
Mar/03 235 18
Abr/03 115.1 18
Mai/03 47.4 18.75
Jun/03 112 15
Jul/03 156.8 17
Ago/03 66.1 15
Set/03 149.8 14
Out/03 167,1 11.5
Nov/03 269.3 17.5
Dez/03 283.7
2009 Aug 13
3
How to get the n (number of observations) per conditional group
Hello all,
I have a huge data set that I'm cleaning up a bit. I am extracted the
means per condition, but also need to get the n. Strangely enough I am
unable to find a function that could actually pull this off. I am
unable to use replications or count the rows using nrow.
What I am trying to obtain is the number of observations fitting
something along the lines of
2004 Mar 03
8
need help with smooth.spline
Dear R listers,
When using smooth.spline to interpolate data, results are generally
good. However, some cases produce totally unreasonable results.
The data are values of pressure, temperature, and salinity from a
probe that is lowered into the ocean, and the objective is to
interpolate temperature and salinity to specified pressures. While
smooth.spline provides excellent values at the
2005 May 30
3
sapply following using by with a list of factors
Background:
OS: Linux Mandrake 10.1
release: R 2.0.0
editor: GNU Emacs 21.3.2
front-end: ESS 5.2.3
---------------------------------
Colleagues
I am having some trouble extracting results from the function by, used to
average variables in a data.frame first by one factor (depth) and then by a
second factor (station). The real data.frame is quite large
> dim(data.2001)
[1] 32049 11
Here is a
2006 Nov 05
3
struggling to plot subgroups
Hi Folks,
I have data that looks like this:
freq gender xBar
1000 m 2.32
1000 f 3.22
2000 m 4.32
2000 f 4.53
3000 m 3.21
3000 f 3.44
4000 m 4.11
4000 f 3.99
I want to plot two lines (with symbols) for the two groups "m" and
"f". I have tried the following:
plot(xBar[gender=="m"]~freq[gender=="f"]) followed by