similar to: How to calculate Hightest Posterior Density (HPD) of coeficients in a simple regression (lm) in R?

Displaying 20 results from an estimated 900 matches similar to: "How to calculate Hightest Posterior Density (HPD) of coeficients in a simple regression (lm) in R?"

2011 Aug 23
1
pMCMC and HPD in MCMCglmm
Dear R users, I?d like to pose aquestion about pMCMC and HDP. I have performed a mixed logistic regression by MCMCglmm (a very good package) obtaining the following results: Iterations = 250001:799901 Thinning interval = 100 Sample size = 5500 DIC: 10.17416 G-structure: ~ID_an post.mean l-95% CI u-95% CIeff.samp ID_an 0.7023 0.0001367 3.678 2126 R-structure: ~units post.mean l-95%
2012 Oct 04
1
Coda, HPDinterval and multiple chains
Dear all, I'm not 100% sure if this question is best directed at the r-list, or a mailing list concerned with Bayesian analysis, so please accept my apologies if another audience may be more appropriate. I have been using the rjags package to run Jags models with multiple chains and store the results in a Coda based mcmc list. For instance, having created a jags model and done initial
2007 Jan 03
1
mcmcsamp and variance ratios
Hi folks, I have assumed that ratios of variance components (Fst and Qst in population genetics) could be estimated using the output of mcmcsamp (the series on mcmc sample estimates of variance components). What I have started to do is to use the matrix output that included the log(variances), exponentiate, calculate the relevant ratio, and apply either quantile or or HPDinterval to get
2006 Aug 08
1
fixed effects following lmer and mcmcsamp - which to present?
Dear all, I am running a mixed model using lmer. In order to obtain CI of individual coefficients I use mcmcsamp. However, I need advice which values that are most appropriate to present in result section of a paper. I have not used mixed models and lmer so much before so my question is probably very naive. However, to avoid to much problems with journal editors and referees addicted to
2011 Jun 19
1
Multivariate HPD credible volume -- is it computable in R?
Hi all, I'm new to the list and am hoping to get some advice. I have a set of multivariate data and would like to find the densest part of the data cloud containing 95% of the data, like a 95% HPD credible volume. Is there any R code available to compute that? Thank you very much! Your help and patience are much appreciated. G.S. [[alternative HTML version deleted]]
2013 Apr 11
1
Calculating std errors of marginal effects in interactions
Hi! I've been looking for a way to calculate std errors of marginal effects when I use interaction terms, but with no success. I pretty much have two cases: continuous variable * continuous variable, and continuous variable * binary variable. In both cases, I know how to calculate the marginal effects, even with simulation. But I still can't figure out how to calculate the std errors of
2013 May 26
2
Commit "drm: run the hpd irq event code directly" causes stutter from repeated EDID retrievals
On Sun, May 26, 2013 at 5:38 PM, Gard Spreemann <gspreemann at gmail.com> wrote: > Hi, > > If I should contact a list instead of you directly, I sincerely apologize! You should have cc'ed relevant lists at least ;-) Fixed up. > After a recent kernel upgrade, I found that my system (using Nouveau) would > stutter whenever eDP-1 was turned off. That display being turned
2004 Nov 08
1
plotting lm coeficients with their means
I am trying to write a function that will run a linear model and plot the regression coeficients with their corresponding means. I am having two problems. I can get the plot with the function below, but I am having trouble labeling the points. function(y,x1,x2,x3,x4){ outlm<-lm(y~x1+x2+x3+x4) imp<-as.data.frame(outlm$coef[-1]) meanvec<-c(mean(x1),mean(x2),mean(x3),mean(x4))
2017 Dec 06
2
Coeficients estimation in a repeated measures linear model
Dear Users, I am trying to understand the inner workings of a repeated measures linear model. Take for example a situation with 6 individuals sampled twice for two conditions (control and treated). set.seed(12) ctrl <- rnorm(n = 6, mean = 2) ttd <- rnorm(n = 6, mean = 10) dat <- data.frame(vals = c(ctrl, ttd), group = c(rep("ctrl", 6), rep("ttd",
2003 Jun 25
2
within group variance of the coeficients in LME
Dear listers, I can't find the variance or se of the coefficients in a multilevel model using lme. I want to calculate a Chi square test statistics for the variability of the coefficients across levels. I have a simple 2-level problem, where I want to check weather a certain covariate varies across level 2 units. Pinheiro Bates suggest just looking at the intervals or doing a rather
2018 Aug 02
1
[PATCH v4 8/8] drm/nouveau: Call pm_runtime_get_noresume() from hpd handlers
On Wed, Aug 01, 2018 at 05:14:58PM -0400, Lyude Paul wrote: > We can't and don't need to try resuming the device from our hotplug > handlers, but hotplug events are generally something we'd like to keep > the device awake for whenever possible. So, grab a PM ref safely in our > hotplug handlers using pm_runtime_get_noresume() and mark the device as > busy once we're
2008 Jul 07
5
question on lm or glm matrix of coeficients X test data terms
Hi, is there an easy way to get the calculated weights in a regression equation? for e.g. if my model has 2 variables 1 and 2 with coefficient .05 and .6 how can I get the computed values for a test dataset for each coefficient? data var1,var2 10,100 so I want to get .5, 60 back in a vector. This is a one row example but I would want to get a matrix of multiplied out coefficients
2013 Mar 05
2
Issues when using interaction term with a lagged variable
Hi there! Today I tried to estimate models using both plm and pgmm functions, with an interaction between X1 and lag(X2, 1). And I notice two issues. Let "Y=b_1 * X_1 + b_2 * X_2 + b_3 * X_1 * x_2 + e" be our model. 1) When using plm, I got different results when I coded the interaction term with I(X1 * lag(X2, 1)) and when I just saved this multiplication X1 * lag(X2, 1) in a
2007 Apr 03
2
HPDinterval problem
Hi, Can anyone tell me why I am not getting the correct intervals for fixed effect terms for the following generalized linear mixed model from HPDinterval: > sessionInfo() R version 2.4.1 (2006-12-18) i386-pc-mingw32 locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252
2009 Mar 12
1
zooreg and lmrob problem (bug?)
Hi all and thanks for your time in advance, I can't figure out why summary.lmrob complains when lmrob is used on a zooreg object. If the zooreg object is converted to vector before calling lmrob, no problems appear. Let me clarify this with an example: >library(robustbase) >library(zoo) >dad<-c(801.4625,527.2062,545.2250,608.2313,633.8875,575.9500,797.0500,706.4188,
2008 Jun 30
1
Coda not providing summary on mcmc object
The object is a mcmc sample from lmer. I am using R v2.7.1. Please let me know what additional information I can provide, hopefully I am just making a simple mistake. Thanks in advance! > data(ratdrink, package = 'faraway') > rd.er <- lmer(wt ~ weeks*treat + (1 | subject), data = ratdrink) > rd.mc <- mcmcsamp(rd.er, 10000) > library(coda) Loading required package:
2013 Aug 23
1
How to view the source of code?
Hi all R mailing listers: I am using the coda package. I tried to view the source of HPDinterval code by typing fix(HPDinterval), it dispalys as follows: function (obj, prob = 0.95, ...) UseMethod("HPDinterval") Then I search the answers about this case (see below), it still failed. Thank you in advance! David > getAnywhere('HPDinterval')2 differing objects matching
2010 Jan 31
2
lmer, mcmcsamp, coda, HPDinterval
Hi, I've got a linear mixed model created using lmer: A6mlm <- lmer(Score ~ division + (1|school), data=Age6m) (To those of you to whom this model looks familiar, thanks for your patience with this & my other questions.) Anyway, I was trying this to look at the significance of my fixed effects: A6post <- mcmcsamp(A6mlm, 50000) library(coda) HPDinterval(A6post) ..but I got this
2010 Dec 13
1
Wrong contrast matrix for nested factors in lm(), rlm(), and lmRob()
This message also reports wrong estimates produced by lmRob.fit.compute() for nested factors when using the correct contrast matrix. And in these respects, I have found that S-Plus behaves the same way as R. Using the three available contrast types (sum, treatment, helmert) with lm() or lm.fit(), but just contr.sum with rlm() and lmRob(), and small examples, I generated contrast matrices for
2018 Mar 03
2
lmrob gives NA coefficients
Dear list members, I want to perform an MM-regression. This seems an easy task using the function lmrob(), however, this function provides me with NA coefficients. My data generating process is as follows: rho <- 0.15 # low interdependency Sigma <- matrix(rho, d, d); diag(Sigma) <- 1 x.clean <- mvrnorm(n, rep(0,d), Sigma) beta <- c(1.0, 2.0, 3.0, 4.0) error <- rnorm(n = n,