search for: newdate

Displaying 20 results from an estimated 87 matches for "newdate".

Did you mean: newdata
2010 Sep 11
3
confidence bands for a quasipoisson glm
Dear all, I have a quasipoisson glm for which I need confidence bands in a graphic: gm6 <- glm(num_leaves ~ b_dist_min_new, family = quasipoisson, data = beva) summary(gm6) library('VIM') b_dist_min_new <- as.numeric(prepare(beva$dist_min, scaling="classical", transformation="logarithm")). My first steps for the solution are following: range(b_dist_min_new)
2009 Feb 08
5
glmmBUGS: logistic regression on proportional data
Hello, I am trying to run a logistic regression with random effects on proportional data in glmmBUGS. I am a newcomer to this package, and wondered if anyone could help me specify the model correctly. I am trying to specify the response variable, /yseed/, as # of successes out of total observations... but I suspect that given the error below, that is not correct. Also, Newsect should be a
2012 Jun 06
3
Sobel's test for mediation and lme4/nlme
Hello, Any advice or pointers for implementing Sobel's test for mediation in 2-level model setting? For fitting the hierarchical models, I am using "lme4" but could also revert to "nlme" since it is a relatively simple varying intercept model and they yield identical estimates. I apologize for this is an R question with an embedded statistical question. I noticed that a
2017 Aug 09
3
Plotting log transformed predicted values from lme
Hi, I am performing meta-regression using linear mixed-effect model with the lme() function that has two fixed effect variables;one as a log transformed variable (x) and one as factor (y) variable, and two nested random intercept terms. I want to save the predicted values from that model and show the log curve in a plot ; predicted~log(x) mod<-lme(B~log(x)+as.factor(y),
2006 Oct 20
1
Questions about date/time and truncating
...rly_met_data$date <- as.POSIXct(hourly_met_data$date) works exactly as it is supposed to (e.g. Min/max of that field are calculated correctly). However, when I perform this command to convert a date/time to just a date (e.g. I'm removing the hour portion of the date/time): hourly_met_data$newdate <- trunc(hourly_met_data$date,"day") I get: Error in `$<-.data.frame`(`*tmp*`, "newdate", value = list(sec = 0, min = 0, : replacement has 9 rows, data has 252020 If I simply set: newdate <- trunc(hourly_met_data$date,"day") And then print the data (e....
2004 Jan 08
3
Strange parametrization in polr
In Venables \& Ripley 3rd edition (p. 231) the proportional odds model is described as: logit(p<=k) = zeta_k + eta but polr apparently thinks there is a minus in front of eta, as is apprent below. Is this a bug og a feature I have overlooked? Here is the naked code for reproduction, below the results. ------------------------------------------------------------------------ --- version
2017 Aug 10
0
Plotting log transformed predicted values from lme
Dear Alina If I understand you correctly you cannot just have a single predicted curve but one for each level of your factor. On 09/08/2017 16:24, Alina Vodonos Zilberg wrote: > Hi, > > I am performing meta-regression using linear mixed-effect model with the > lme() function that has two fixed effect variables;one as a log > transformed variable (x) and one as factor (y)
2007 Aug 04
2
Problems using "lm" in combination with "predict"
...ression model but it does not work. My Model: y = Worktime + Vacation + Illnes + Bankholidays My modelmatrix is of dimension 28x4 Then I want to make use of the function predict because there confidence.intervals are include. My idea was: mod <- lm(y~Worktime+Vacation+Illnes+Bankholidays) newdate=data.frame(x=c(324,123,0.9,0.1)) predict(y,newdate) But I always get the message: 'newdata' had 1 rows but variable(s) found have 28 rows What can I do? Yours, Maja -- Psssst! Schon vom neuen GMX MultiMessenger geh?rt? Der kanns mit allen: http://www.gmx.net/de/go/multimessenger
2011 Sep 08
1
predict.rma (metafor package)
Hi (R 2.13.1, OSX 10.6.8) I am trying to use predict.rma with continuous and categorical variables. The argument newmods in predict.rma seems to handle coviariates, but appears to falter on factors. While I realise that the coefficients for factors provide the answers, the goal is to eventually use predict.rma with ANCOVA type model with an interaction. Here is a self contained example
2017 Aug 10
1
Plotting log transformed predicted values from lme
Thank you Michael, Curves for each level of the factor sounds very interesting, Do you have a suggestion how to plot them? Thank you! Alina *Alina Vodonos Zilberg* On Thu, Aug 10, 2017 at 7:39 AM, Michael Dewey <lists at dewey.myzen.co.uk> wrote: > Dear Alina > > If I understand you correctly you cannot just have a single predicted > curve but one for each level of your
2008 Jul 09
2
sorting a data frame by rownames
Hi there, I'm sure there's an easy answer to this, and I can't wait to see it. The question: is there an easy way to sort a data frame by it's row names? My dilemma: I've had to pull apart a data frame, run it through a loop to do some calculations and generate new variables, and then re-construct the chunks back into a data frame at the end. Doing this preserves the row
2007 Feb 01
2
Losing factor levels when moving variables from one context to another
Hi, there I'm currently trying to figure out how to keep my "factor" levels for a variable when moving it from one data frame or matrix to another. Example below: vec1<-(rep("10",5)) vec2<-(rep("30",5)) vec3<-(rep("80",5)) vecs<-c(vec1, vec2, vec3) resp<-rnorm(2,15) dat<-as.data.frame(cbind(resp, vecs))
2012 Apr 18
3
normal distribution assumption for multi-level modelling
Hello, I'm analysing reaction time data from a linguistic experiment (a variant of a lexical decision task). To ascertain that the data was normally distributed, I used *shapiro.test *for each participant (see commands below), but only one out of 21 returns a p value above p.0 05. > f = function(dfr) return(shapiro.test(dfr$Target.RTinv)$p.value) > p = as.vector(by(newdat,
2011 Jun 24
2
mgcv:gamm: predict to reflect random s() effects?
Dear useRs, I am using the gamm function in the mgcv package to model a smooth relationship between a covariate and my dependent variable, while allowing for quantification of the subjectwise variability in the smooths. What I would like to do is to make subjectwise predictions for plotting purposes which account for the random smooth components of the fit. An example. (sessionInfo() is at
2004 May 26
2
Subtracting number of days from a date
Hi group, suppose I have a date, say May 15 2004, and I want to now what date it is 23 days before that date. The way to calculate the new date should (...) take account of leap years :) In pseudocode: olddate <- "May 15 2004" newdate <- olddate-23 I looked around in POSIXct etc..., maybe I overlooked? Thanks, Maarten -------------------------------------------------------------- Zie ook/see also: http://www.knmi.nl/maildisclaimer.html
2011 Apr 04
1
Clarks 2Dt function in R
Dear Ben, you answerd to Nancy Shackelford about Clarks 2Dt function. Since the thread ended just after your reply, I would like to ask, if you have an idea how to use this function in R I defined it the following way: function(x , p, u) { (p/(pi*u))*(1+(x^2/u))^(p+1) } and would like to fit this one to my obeservational data (count) [,1] [,2] [1,] 15 12 [2,] 45 13 [3,]
2005 May 13
1
manipulating dataframe according to the values of some columns
hi netters, I'm a newbie to R and there are some very simple problems puzzeled me for two days. I've a dataframe here with several columns different in modes. Two of the columns are special for me: column 1 has the mode "factor" and column 2 has the mode "numeric vectors". The values for column 1 are either "T" or "F". I wanna do two things:
2005 May 24
3
obtaining first and last record for rows with same identifier
I have a dataframe that contains fields such as patid, labdate, labvalue. The same patid may show up in multiple rows because of lab measurements on multiple days. Is there a simple way to obtain just the first and last record for each patient, or do I need to write some code that performs that. Thanks, Steven
2009 Aug 21
2
compare observed and fitted GAM values
Hi, I am comparing the observed and fitted values of my GAM model, which includes the explanatory variables: longitude, depth, ssh, year and month. When I compare observed and fitted values for longitude, depth and ssh it works. But when I try to do it for month and year (which are as factors in the GAM model) it doesn't work. My observed and fitted values are exactly the same.. How is that
2011 Jun 14
0
error message trying to plot survival curves from hypothetical covariate profiles
Dear colleagues, following John Fox' advice in this article (http://cran.r-project.org/doc/contrib/Fox-Companion/appendix-cox-regression.pdf), I'm trying to create a new data frame to examine the differential survival curves from a combination of covariates. These are derived from a Cox Proportional Hazards model I fit to data about the diffusion of a particular policy across American