te3[,2]))
print(x) # Need to be able to stack the x's to produce one matrix
}
Thanks
Anamika
On Wed, Jul 27, 2016 at 2:46 AM, David Winsemius <dwinsem...@comcast.net>
wrote:
>
> > On Jul 26, 2016, at 8:07 PM, Anamika Chaudhuri <canam...@gmail.com>
> wrote:
> >
> >
I have 100 datasets with 20 rows and 2 columns in each dataset.
I am looking for help to produce x and y below as 1000 X 20 matrix and then
repeat that across 100 datasets using R
library(MASS)
library(car)
set.seed(1234)
library(mixtools)
library(sp)
Hi All:
I am trying to use the dwish function in the MCMCpack in R
dwish(W, v, S) where
Arguments
W-Positive definite matrix W
v-Degrees of freedom (scalar).
S-Inverse scale matrix
How do I determine W, the positive definite matrix. The matrix provided in
the documentation doesnot help.
I put in the matrix at which I want the density as S. I was wondering what
is W then?
Thanks
Anamika
On Thu, Sep 3, 2015 at 12:28 PM, Duncan Murdoch <murdoch.dun...@gmail.com>
wrote:
> On 03/09/2015 9:29 AM, Anamika Chaudhuri wrote:
> > Hi All:
> >
> > I am tryin
Hi,
I am trying to create a bivariate ellipse to see if the true values fall
within the 95% confidence ellipse. I am getting subscript out of bounds
error in R with following code. Not sure what is causing it. When I use the
kde2d function with n=30 I get the error but not for n=25 and below.
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]]
21, 2013 12:24 AM, Anamika Chaudhuri
canam...@gmail.com wrote:
Hi:
I am looking for some help to manipulate data in R. I have two csv files.
datasetY1
V1 V2 V3 V4
1 4 0 20 17
2 4 0 15 17
3 2 0 13 21
datasetY2
V1 V2 V3 V4
1 20 52 15 18
2 18 54 14 21
3 18 51 13 21
I want to be able
Hi:
I am looking for some help to manipulate data in R. I have two csv files.
datasetY1
V1 V2 V3 V4
1 4 0 20 17
2 4 0 15 17
3 2 0 13 21
datasetY2
V1 V2 V3 V4
1 20 52 15 18
2 18 54 14 21
3 18 51 13 21
I want to be able to create separate csv files by taking the corresponding
rows of
Hi:
I have a question related to the R Code which calls BUGS. I have run the
model in WinBUGS and it runs fine giving me the expected results. Below is
the automation code used when I had single outcome or univariate data for
Ys. Now I want to use it for multiple outcomes. So the trial.data
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
Hi All:
I am getting some warnings trying to run the following code and I am not
sure what they mean.
set.seed(111)
k-63
n-60
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(k,min,max))
for(i in 1:k)
+
Hi All:
I am getting an error (highlighted) from running R2WinBUGS in R.
To be able to replicate the situation heres the code:
.#Set working directory
setwd(H://AChaudhuri/Testing/CSVS)
matrix=NULL
csvs - paste(MVN, 1:2, .csv, sep=)
for(i in 1:length(csvs)){
matrix[[i]] - read.csv(file=csvs[i],
Hi All:
How would you find out the probability that a point lies within an ellipse?
For eg if I was plotting (x,y) for 300 datasets in an 95% ellipsoid region,
how do I calculate how many times out of 300 will my points fall inside the
ellipse?
Heres the code I am using
library(MASS)
seed-1234
Hi:
I apologize for posting in the R listserv. But I am trying to do the
following in R.
I am trying to construct Bivariate 95% Approximate Confidence interval for
the mean vector p=(p1,p2) similar to what we have in the univariate case.
[image: \hat p \pm z_{1 - \frac{1}{2}\alpha}
Hi:
To test the situation below I am creating 2 datasets
.#Set working directory
setwd(C://Tina/USB_Backup_042213/Testing/CSV)
matrix=NULL
csvs - paste(MVN, 1:2, .csv, sep=)
for(i in 1:length(csvs)){
matrix[[i]] - read.csv(file=csvs[i], header=T)
print(matrix[[i]])
}
So now I have read in 2
Hi:
I am trying to generate Beta-Binomial random variables and then
calculate Binomial exact confidence intervals to the rate..I was
wondering if I needed to add a constraint such that x=n to it, how do
I go about it. The reason is I am getting data where xn which is
giving a rate1. Heres my
Hi All:
Not sure why my previous question never got posted. Here I am seeking some
help on my code. I am using the following code to run MCMC simulation on
the following data using the model below:
# Data
matrix-NULL
csvs-paste(MVN, 1:2,.csv,sep=)
for (i in 1:length(csvs)){
+ matrix[[i]]-
Hi All:
I am running R2WinBUGS so that I could automate the running of my
Multivariate Logit Normal model on 300 simulated datasets. The problem I
have is I am not able to read in the data correctly and then code it in the
automation part.
*Heres my model:*
model
{
for (j in 1 : Nf)
{
p1[j,
Winsemius dwinsem...@comcast.netwrote:
On May 12, 2013, at 4:44 PM, Anamika Chaudhuri wrote:
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
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 headacheAbdominal
Hi All:
I am trying to generate Beta-Binomial data with regressors using R. I have
used the following code to generate Beta-Binomial data. Now I want to add
a covariate to the equation. I would then like to use the simulated data to
run the Beta-Binomial model with covariates on it. Appreciate
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
, Anamika Chaudhuri wrote:
HI All:
Does anyone know the code behind the qbeta function in R?
Well, yes, but don't you think it would be wise to question whether your
code might be the problem rather than the R code?
I am using it to calculate exact confidence intervals and I am getting
'NaN
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
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
Trevor,
Thanks for your reply.
That doesnot help
Any other suggestions?
Anamika
On Tue, Aug 10, 2010 at 11:58 AM, Trevor Davies tdav...@mathstat.dal.cawrote:
I think you need to load is R2WinBUGS again.
require(R2WinBUGS)
Trevor
Hi All:
I am getting an error while trying to plot in
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]]
I have been using the following random intercept model with non-informative
prior:
model {
for (i in 1:n.samples) {
vomit[i] ~ dbern(p[i])
logit(p[i]) - beta0 + alpha[siteid[i]]
}
for (j in 1:n.sites) {
alpha[j]~dnorm(0,tau)
}
beta0 ~ dnorm(0.0,1.0E-6)
tau ~ dgamma(0.01,0.01)
}
the BUGS interpreter. Hence wrong mailing list.
Best wishes,
Uwe Ligges
Anamika Chaudhuri wrote:
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
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)
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)
them?
On Sat, Dec 6, 2008 at 10:42 PM, Anamika Chaudhuri [EMAIL PROTECTED]
wrote:
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
, 2008, 10:27 AM
In your sample data, the first 9 lines do not have the same number of
elements as the rest. What are they supposed to represent? How do
you intend to read them in and use them?
On Sat, Dec 6, 2008 at 10:42 PM, Anamika Chaudhuri [EMAIL PROTECTED]
wrote:
Hi:
I am using
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)
34 matches
Mail list logo