Displaying 20 results from an estimated 500 matches similar to: "glmmBUGS: logistic regression on proportional data"
2005 May 18
1
'fitdistr' and two views of the same data?
Hello,
I have detailed (with pictures and whatnot) my question on my weblog at
http://www.cs-ed.org/blogs/mjadud/archives/2005/05/a_question_abou.html
The short version of the question is this:
When I ask 'fitdistr' to try and fit my distribution as a "weibull"
distribution, it comes up with some rather wacky parameters.
If I take the same distribution, and do something
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)
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),
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)
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
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
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
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
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
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,
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))
2003 May 19
1
plotting a simple graph
I am having great difficulty plotting what should be a simple graph.
I have measured 1 'y' and 5 'x' variables in each of two groups.
Linear regression shows significant differences in the slopes of the
regression for each 'x' variable between the two groups.
All that I want to do is to plot one graph that shows the scatterplot
for the three groups (each group represented
2009 Mar 31
1
Can not get a prediction interval from Predict
I am trying to get a prediction interval from a glm regression.
With newdat being my set of values to be fitted, and glmreg the name of my
regression, I am using the following code.
predict(glmreg, newdat, se.fit = TRUE, interval = "confidence", level =
0.90)
The problem is that I am only getting the standard error and the fitted
value, not a prediction interval.
Any help would be
2011 Oct 27
0
glmmBUGS fails to accept higher level covariates
Hello
I am using glmmBUGS to fit a multilevel model. Treatments are nested in
Course are nested in Patients. The predicted variable in total EEG duration.
The predictors are:
at the observation level : Medication dose
at the Course level: Weight in KG and Age
at the Patient level: Weight in KG and Age
I am trying to fit a multilevel model as in lmer, but in BUGS. Here is an
example of the
2017 Jun 12
0
plotting gamm results in lattice
Hi Maria
If you have problems just start with a small model with predictions and then plot with xyplot
the same applies to xyplot
Try
library(gamm4)
spring <- dget(file = "G:/1/example.txt")
str(spring)
'data.frame': 11744 obs. of 11 variables:
$ WATERBODY_ID : Factor w/ 1994 levels "GB102021072830",..: 1 1 2 2 2 3 3 3 4 4 ...
$ SITE_ID
2011 Jun 27
0
OpenBUGS and glmmBUGS package
Dear All,
I am trying to use the glmmBUGS package with OpenBUGS under Linux.
Here is a short list of code I modified from the diseasemapping
package document:
----------------------------------------
library(diseasemapping)
data(popdata)
data(casedata)
model = getRates(casedata, popdata, ~age*sex, breaks=seq(0, 90, by=10) )
ontario = getSMR(popdata,model, casedata)
spplot(ontario,
2010 Aug 13
1
loop for inserting rows in a matrix
Dear R friends,
I have a matrix with 2060 rows and 41 columns. One column is Date, another is Transect, and another is Segment. I want to ensure that there are 9 Transects (1 to 9) for each Date, and 8 Segments (1 to 8) for each Transect in the matrix, by inserting rows where these are missing.
I am new to coding, but am trying to write a loop which checks if each of the transects already
2020 Oct 26
0
How to shade area between lines in ggplot2
Hi
Put fill outside aes
p+geom_ribbon(aes(ymin = slope_1*x + intercept_1 - 1/w[2],
ymax = slope_1*x + intercept_1 + 1/w[2]), fill = "blue", alpha=0.1)
The "hole" is because you have two levels of data (red and blue). To get rid
of this you should put new data in ribbon call.
Something like
newdat <- trainset
newdat$z <- factor(0)
p+geom_ribbon(data=newdat, aes(ymin =
2005 Jun 15
3
Error using newdata argument in survfit
Dear R-helpers,
To get curves for a pseudo cohort other than the one centered at the mean of
the covariates, I have been trying to use the newdata argument to survfit
with no success. Here is my model statement, the newdata and the ensuing
error. What am I doing wrong?
> summary(fit)
Call:
coxph(formula = Surv(Start, Stop, Event, type = "counting") ~
Week + LagAOO + Prior.f +