Displaying 6 results from an estimated 6 matches for "fyear".
Did you mean:
year
2013 Sep 19
3
lattice: double y - problem changing axis color after doubleYScale
...y-axis when not using a colorcode than the one I had.
I have annotated my questions in the code below.
Thank you for your time!
Here is some dummy data:
Ndata <- data.frame(
Ncellpercent = rnorm(400, mean = rep(c(14, 18, 65), each = 40),
sd = rep(c(1, 3, 6), each = 40)),
fyear = rep(c('2007', '2008'), each = 100*2),
Station = sample(c('B1', 'H2', 'H3', 'H4'), 400, replace = TRUE),
Week = sample(c('19', '21', '23', '25'), 400, replace = TRUE))
Pdata <- data.frame(
Ppercentcell = rnor...
2010 Feb 08
0
Poisson and neg. bin. regression with random effects
...er, I would like to treat each year separately so I believe I need to account for this by nesting year (as a factor) within body size (also a factor). My first question is whether or not the code below is correct for the models outlined above?
data= (mixed)
fBodySize <- factor(mixed$BodySize)
fYear<-factor(mixed$Year)
groupedData(ABUNDANCE~RoadDensity | fBodySize/fYear, data = mixed)
#random intercept
m1<-lmer(ABUNDANCE~RoadDensity +(1|fBodySize/fYear), family=poisson(log), data = mixed)
# random slope
m2<-lmer(ABUNDANCE~RoadDensity +(-1 + RoadDensity |fBodySize/fYear), family...
2010 Jan 22
2
sorted reshaping?
dear R wizards:? I am wrestling with reshape.? I have a long data set
that I want to convert into a wide data set, in which rows are firms
and columns are years.
> summary(rin)
firm fyear sim1
Min. :1004.00 Min. :1964.0 Min. : -1.00000
1st Qu.:1010.00 1st Qu.:1979.0 1st Qu.: -0.14334
Median :1016.00 Median :1986.0 Median : 0.00116
Mean :1016.34 Mean :1986.1 Mean : 1.03475
3rd Qu.:1021.00 3rd Qu.:1993.2 3rd Qu.: 0.26931
Max. :103...
2010 Nov 25
1
Help on running regression by grouping firms
...cteristics. I want to run a regression on the dependent variable and other explanatory variables and calculate the residual terms by grouping the firms in same year and same industry.
What I want to do is to divide my obseravtion into sub sample that contains the observation with same fiscal year(FYEAR=1990) and same firm characteristic (Industry =1) and run the regression and put the residual back to the observation by creating a new column. I want to do that for multiple years and multiple firms. I wonder is that any easy command with out creating multiple loops?
Ray
[[alternati...
2011 Nov 29
0
Labels in xy-plots
..."temp" conditional on "year" and "station".
library(lattice)
MyLines <- function(xi, yi, ...){ #Draws line in the panels while
avoiding spaghetti-plots
I <- order(xi)
panel.lines(xi[I], yi[I], col = 1)}
xyplot(het ~ temp | fstation, data = data1, groups = fyear, xlab = "temp",
ylab = "heterocyst freq",
panel = panel.superpose, #ensures that lines from all years (defined by
"groups") from the same stations are superimposed in he same panel
panel.groups = MyLines) #specifies which task should be carried out on the
data d...
2011 Dec 15
0
corCompSymm in gamm()?
...higher orders (ARMA)). If I rename weeks
as week 1-week 30 to get unique identifiers, I loose the seasonal and
year-specific effect in the final model.
M2c.gamm <- gamm(het ~ s(LN.DIN, k=3) + s(LN.totn, k=3) + s(Ncell,
k=3) + s(LN.biom) + s(temp, k=3) + s(week, k=3)
+ fstation + fyear, method = "ML",
weights = varIdent(form=~1 | fstation),
data = data1,
correlation = corCompSymm(form = ~ week|year)) #seems not to work in
a gamm()
Thank you for your time!
Anna Zakrisson Braeunlich
PhD Student
Department of Systems Ecology
Stockholm University
Svante...