similar to: MCMCpack: Selecting a better model using BayesFactor

Displaying 20 results from an estimated 300 matches similar to: "MCMCpack: Selecting a better model using BayesFactor"

2003 Apr 18
1
MCMCpack gelman.plot and gelman.diag
Hi, A question. When I run gelman.diag and gelman.plot with mcmc lists obtained from MCMCregress, the results are following. > post.R <- MCMCregress(Size~Age+Status, data = data, burnin = 5000, mcmc = 100000, + thin = 10, verbose = FALSE, beta.start = NA, sigma2.start = NA, + b0 = 0, B0 = 0, nu = 0.001, delta = 0.001) > post1.R <- MCMCregress(Size~Age+Status, data
2015 Jul 21
2
glm com etiquetas en las variables
Hola: Si aún hay alguien que no está de vacaciones, igual me pueden ayudar. Quiero ajustar unos modelos: REG_LOG <- glm (low ~ X, family = "binomial", data = DATOS) Ejemplo: library(MASS) data(birthwt, package="MASS") birthwt$low <- factor(birthwt$low) birthwt$race <- factor(birthwt$smoke) REG_LOG <- glm (low ~ smoke, family =
2008 Oct 18
1
Fehler in x$terms : $ operator is invalid for atomic vectors
Dear All I try to use your R package MCMCpack and I have encountered the following problem: The following code works fine: library(MCMCpack) line <- list(X = c(-2,-1,0,1,2), Y = c(1,3,3,3,5)) posterior1 <- MCMCregress(X~Y, data=line) summary(posterior1) But as long as I try the following lines library(MCMCpack) line <- list(X = c(-2,-1,0,1,2), Y = c(1,3,3,3,5))
2010 Oct 12
1
Help with function writing
Hello all I have what seems like a simple question but have not been able to find an answer on the forum. I'm trying to define a function which involves regression models and a large number of covariates. I would like the function to accept any number of covariates and, ideally, I would like to be able to enter the covariates in a group (e.g. as a list) rather than individually. Is there any
2011 Aug 10
2
function runif in for loop
Hello, I'd like to perform a regression using MCMCregress (MCMCpack). One variable therefore should be a function rather than a variable: I want to use X as an input and X should be defined as a random number between to values. Therefore I want to use the function runif like: X <-(1, Xa, Xb) but it seems that runif doesn't allow to use vectors. So I think I've to calculate the new
1999 Jan 07
2
errores
Happy New Year to all, I am using RW0631 and WIN98. 1. The command DATA only works for the base library. 2. The following code on page 312 of Venables and Ripley 1997 sitka.lme <- lme(size~treat*ordered(Time),random=~1,cluster=~tree,data=Sitka, serial.structure="ar1.continuous",serial.covariate=~Time) produced the following error message Error in lme(size ~ treat *
2015 Jul 27
2
Error sql en función
Hola Carlos: Gracias por responder! Ayer caí en esta página al buscar el problema con google, pero no conseguir entender y implementar lo que sugiere. Sin entender nada, lo que hice fue: ======================== > library(MASS) > library (sqldf) # Per SQL > data(Aids2, package="MASS") > SQL_PROVA = function (XDADES, XWHE) + { + XDADES_SQL = sqldf ("select * from
2015 Jul 14
4
Conservar el nombre de la variable entre varias funciones: ejemplos de resultados
Hola Carlos: Te adjunto un ejemplo de aplicación: las funciones (he borrado los path de las funciones y las ordenes "source()" que las carga ) y un ejemplo para ejecutarlas para las opciones que tengo implementadas con la tabla de datos birthwt del paquete"MASS": - Descriptiva de todas las variables de una tabla. - Análisis univariado de todas las variables de una tabla
2000 Dec 12
1
smoothing binary data
I'm trying to figure out a good way to smooth binary data. The ideal approach appears to be the "sm.logit" function in library "sm", but I haven't had success with it. Below, is some code illustrating what I've come up with so far, but I'm hoping there is a better approach. I'm using R 1.2 (development) under Windows 98. -Bill library(MASS) data(birthwt)
2015 Jul 27
2
Error sql en función
Hola: No consigo que la función sqldf () funcione dentro de una función. Alguien puede echarme una mano. En resumen, el problema es que cuando lo ejecuto fuera de una función no tengo ningún problema: ========================== > # install.packages("sqldf") > library(MASS) > library (sqldf) > data(Aids2, package="MASS") > options(digits=3) > table
2006 Aug 03
1
how to use the EV AND condEV from BMA's results?
Dear friends, In R, the help of "bic.glm" tells the difference between postmean(the posterior mean of each coefficient from model averaging) and condpostmean(the posterior mean of each coefficient conditional on the variable being included in the model), But it's still unclear about the results explanations, and the artile of Rnews in 2005 on BMA still don't give more detail on
2011 Aug 15
2
MCMC regress, using runif()
Hello, just to follow up a question from last week. Here what I've done so far (here an example): library(MCMCpack) Y=c(15,14,23,18,19,9,19,13) X1=c(0.2,0.6,0.45,0.27,0.6,0.14,0.1,0.52) X2a=c(17,22,21,18,19,25,8,19) X2b=c(22,22,29,34,19,26,17,22) X2 <- function()runif(length(X2a), X2a, X2b) model1 <- MCMCregress(Y~X1+X2()) summary(model1) but I am not sure if my X2-function is
2006 May 11
3
Now another question regarding the Foreign package
Hi, Because I'm new to R and trying to move off of SPSS, I have another question. I downloaded the "Foreign" package which I understand reads in various datasets from programs such as SPSS and SAS. There isn't much documentation that I can find regarding the specifics of this in the online docs, but I assume that it is like read.table. So, here is what I wrote and here is
2009 Aug 10
1
(sin asunto)
Tengo un problema que me dice: La libreria MASS de R contiene el fichero birthwt.Trabajando sobre estos datos: 1.-Recodifica las variables tal y como aparece en la ayuda sobre este fichero en R. 2.-Analiza e interpreta la posible asociacion estadistica entre las variables low y smoke. ¿Alguien me podria explicar como hacerlo? Ademas, si alguien puede, no entiendo la validacion cruzada, ni la
2003 May 05
1
Error in library(MASS) : package/namespace load failed
Dear all, I have installed 1.7.0 on my Win XP and want to use MASS. But I get this error message: > library(MASS) Error in namespaceExport(ns, exports) : undefined exports: abbey, accdeaths, Aids2, Animals, anorexia, austres, bacteria, beav1, beav2, biopsy, birthwt, ... Error in library(MASS) : package/namespace load failed I therefore again downloaded VR.zip. When I extracted the files I
2012 Dec 11
0
Bayes weighted regression?
Dear List, Just wondering, is there a Bayesian version of weighted regression available in the literature (to handle survey weights, say)? If yes, could you suggest me a reference? Does MCMCregress handle weights? cheers, Ehsan
2005 Sep 02
1
source package linking problem under linux
I'm having some problems in installing some source packages under linux. As an example, MCMCpack. An error is raised when linking: > install.packages("MCMCpack") [...] * Installing *source* package 'MCMCpack' ... checking for C++ compiler default output file name... a.out checking whether the C++ compiler works... yes checking whether we are cross compiling... no checking
2010 Feb 12
1
validate (rms package) using step instead of fastbw
Dear All, For logistic regression models: is it possible to use validate (rms package) to compute bias-corrected AUC, but have variable selection with AIC use step (or stepAIC, from MASS), instead of fastbw? More details: I've been using the validate function (in the rms package, by Frank Harrell) to obtain, among other things, bootstrap bias-corrected estimates of the AUC, when variable
2008 Dec 19
0
"parm" argument in confint.multinom () nnet package
Dear R users, The nnet package includes the multinom method for the confint function. The R Help file (?confint) for the generic function in the stats package and the help files for the glm and nls methods in the MASS package indicate that one can use the "parm" argument as "a specification of which parameters are to be given confidence intervals, either a vector of numbers or
2003 May 03
1
expand.grid
I recently posted a question concerning an inconsistency of expand.grid in defining the reference level of the factors. > > expand.grid(x = c("b", "a"), y = c(1, 2))$x > [1] b a b a > Levels: b a # reference level is b > > expand.grid(x = c("b", "a"))$x > [1] b a > Levels: a b # reference level is a Thank you