Displaying 20 results from an estimated 2000 matches similar to: "Beta-Binomial Regression in R"
2008 Dec 08
1
Reading txt file in R to run Random Intercept Model
I am using a random intercept model with SITEID as random and NAUSEA as
outcome.
Thanks.
Anamika
I tried using a dataset without missing values and changed my model
statement accordingly but still get the same error. Follwoing in an excerpt.
> anal.data <- read.table("nausea.txt", header=T, sep="\t")
> list(names(anal.data))
[[1]]
[1] "SITEID"
2012 Mar 09
2
qbeta function in R
HI All:
Does anyone know the code behind the qbeta function in R?
I am using it to calculate exact confidence intervals and I am getting
'NaN' at places I shouldnt be. Heres the simple code I am using:
k<-3
> x<-NULL
> p<-rbeta(k,3,3)# so that the mean nausea rate is alpha/(alpha+beta)
> min<-10
> max<-60
> n<-as.integer(runif(3,min,max))
> for(i in
2008 Dec 09
1
expected variable name error pos 98349 WInBUGS in R
> I am using a random intercept model with SITEID as random and NAUSEA as
> outcome.
>
> I tried using a dataset without missing values and changed my model
> statement accordingly but still get the same error. Follwoing in an excerpt.
> > anal.data <- read.table("nausea.txt", header=T, sep="\t")
> > list(names(anal.data))
> [[1]]
> [1]
2013 May 12
1
Multinomial-Dirichlet using R
Hi:
I have asked this question on Cross-Validated. So it might be a cross
posting but havent received any responses to it.
I am trying to see which distribution will best fit the data I am working
on. The dataset is as following:
Site Nausea headache Abdominal Distension
1 17 5 10
2 12
2008 Dec 07
1
Reading txt file in R
Hi:
I am using the following code to read a data set in txt in R and using the follwoing model. But it seems to give me an error ' expected variable name error pos 134022'. Any help is greatly appreciated.
Code:
anal.data <- read.table("nausea.txt", header=T, sep="\t")
list(names(anal.data))
attach(anal.data)
n.samples <- dim(anal.data) [1] # number of data
2010 Aug 16
1
Specify decimal places for parameters in BUGS output
Hi All:
I had a basic question to ask. I am running R2WinBUGS so that I could
automate the running of my model using 1000 simulated datasets. Below is the
code I am using. The only problem I am having is the bugs output that comes
out shows my parameters as nos with 1 decimal place after. I would want to
have the parameters with 5 places after decimal. How would I specify that in
my code for
2013 Sep 15
1
DataEllipse versus Ellipse Function in R
Hi:
Does Ellipse and dataellipse function in R produce the same ellipse? I
wanted to see how the radius for the Ellipse function in R calculated. Also
what is the var-covariance matrix, if any, assumed for the dataellipse
function? Heres an example of the code where I am generating Multivariate
normal data and creating ellipse using the 2 functions:
library(car)
library(mvtnorm)
mu =
2010 Apr 13
1
WinBUGS Question
Hi:
Is there a way we can set up WINBUGS to run 100 simulated datasets on the
same model and output results? Or do we have to call in each dataset at a
time and repeat the process 100 times manually?
Thanks
Anamika
[[alternative HTML version deleted]]
2006 Apr 25
4
Help needed
Hi,
I am trying to change a SAS macro to R.
here is my code. I get an error at the last line.
attach(fram)
dset1<-cbind(AGE,BMI,DEATH)
> BMIGRP<-cut(BMI,breaks=3,right=TRUE)
> AGEGRP<-floor(AGE/10)-2
> dset<-cbind(AGEGRP,BMIGRP,DEATH)
> maxage<-max(dset[,1])
> minage<-min(dset[,1])
> #maxcls<-dset[,2]
> #mincls<-dset[,2]
>
2012 Mar 07
2
, Exact Confidence Interval
>
> Hi All:
>
> I am using R to calculate exact 95% confidence interval using Clopper
> Pearson method. I am using the following code but it seems to get into a
> loop and not get out of it, it goes on forever although I am looping it
> only 10 times across 63 sites with 10 observations per site. I was hoping
> to get some help.
>
> Thanks
>
Anamika
>
2013 Oct 25
1
Equation of an Ellipse in R
Hi All:
I was looking for some help to code the equation of an ellipse in R, given
I have a Bivariate Normal distribution (X,Y) with mean (m1,m2) and
var-covariance matrix (var1,cov12,cov12,var2).
Thanks
Anamika
[[alternative HTML version deleted]]
2010 Aug 10
0
[BUGS] [R-BUGS] error while plotting
Trevor,
Thanks for your reply.
That doesnot help
Any other suggestions?
Anamika
On Tue, Aug 10, 2010 at 11:58 AM, Trevor Davies <tdavies@mathstat.dal.ca>wrote:
> I think you need to load is R2WinBUGS again.
>
> require(R2WinBUGS)
>
> Trevor
>
> > Hi All:
> >
> > I am getting an error while trying to plot in R2Winbugs
> >
> > *Error in
2006 Apr 26
2
help in R
Hi,
I cant understand where I am going wrong.Below is my code.I would really appreciate your help.
Thanks.
> genfile<-read.table("c:/tina/phd/bs871/hw/genfile.txt",skip=1)
>
> #read in SNP data
> snp.dat <- as.matrix(genfile)
> snp.name <- scan("c:/tina/phd/bs871/hw/genfile.txt",nline=1,what="character")
Read 100 items
2007 Mar 09
1
MCMC logit
Hi,
I have a dataset with the binary outcome Y(0,1) and 4 covariates (X1,X@,X#,X$). I am trying to use MCMClogit to model logistic regression using MCMC. I am getting an error where it doesnt identify the covariates ,although its reading in correctly. The dataset is a sample of actual dataset. Below is my code:
> #######################
>
>
> #retreive data
> # considering four
2013 Feb 04
2
reshape help
Dear R users -
I have a list of patient identifiers and diagnoses from inpatient
admissions. I would like to reorganize the list, presently in a long
format to a wide format in reshape, but in the absence of a "time" element,
I am uncertain how to do this - any help greatly appreciated.
ID Dx
A nausea
A diabetes
A kidney failure
A heart attack
A fever
B fever
B
2007 May 03
1
Bayesian logistic regression with a beta prior (MCMClogit)
Dear all,
I am trying to use the logistic regression with MCMClogit (package:
MCMCpack/Coda) and I want to put a beta prior on the parameters, but it's
giving me error message (please see output below) no matter what shape 1 or
2 I use. It works perfect with the cauchy or normal priors. Do you know if
there is a catch there somewhere? Thanks
logpriorfun <- function(beta,shape1,shape2){
2012 Aug 27
3
How to generate a matrix of Beta or Binomial distribution
Hi folks,
I have a question about how to efficiently produce random numbers from Beta
and Binomial distributions.
For Beta distribution, suppose we have two shape vectors shape1 and shape2.
I hope to generate a 10000 x 2 matrix X whose i th rwo is a sample from
reta(2,shape1[i]mshape2[i]). Of course this can be done via loops:
for(i in 1:10000)
{
X[i,]=rbeta(2,shape1[i],shape2[i])
}
However,
2006 Apr 17
7
help
Hi, I am trying to runn a age-period-cohort model, but here is what I am
having problem with, hope you can help me!
This is what I am trying to do:
sumzero_a<-((A-min(A))/5+1) - mean((A-min(A))/5+1) where A is my age
variable (numeric, the mid-point of a five-year age group), but I got the
following error:
Error in min(..., na.rm = na.rm) : invalid 'mode' of argument
I am pretty
2007 Jan 07
1
Partial proportional odds logistic regression
R-experts:
I would like to explore the partial proportional odds models of Peterson
and Harrell (Applied Statistics 1990, 39(2): 205-217) for a dataset that
I am analyzing. I have not been able to locate a R package that
implements these models. Is anyone aware of existing R functions,
packages, etc... that might be used to implement the partial
proportional odds models?
Brant Inman
2008 Jul 02
1
Extracting regression coef. and p-values in JRClient
Hi there,
I am using JRClient to build logistic regression model in the
following manner :
Rconnection c = new Rconnection();
c.eval("KSN<-read.table(\"/Users/amine/Documents/Research/
Tools/R/D2R1.txt\",header=T,sep=\",\")");
c.eval("result <- glm(Nausea ~ Kaletra*Sustiva, family =
binomial(link = logit), data =KSN)");