similar to: reshape help

Displaying 20 results from an estimated 500 matches similar to: "reshape help"

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]
2010 Jun 02
2
building time series/zoo/its from a data frame
Dear R People: I have the following data frame: > x.df date cond freq 1 04/01/09 Fever 12 2 04/02/09 Fever 11 3 04/03/09 Fever 10 4 04/04/09 Fever 13 5 04/05/09 Fever 6 6 04/01/09 Rash 6 7 04/02/09 Rash 10 8 04/03/09 Rash 9 9 04/04/09 Rash 10 10 04/05/09 Rash 8 11 04/01/09
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
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"
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){
2010 Aug 20
3
rollmean help (or similar function)
I am working on a simple pilot project comparing the capability of SQL, SAS and R to perform a rolling mean per the following instructions. I have completed the SQL and SAS analysis, so now it's R's turn. Calculate mean values of x (x=count) for each date in the dataset where mean = the average count of days [t-9] through day [t-3] for each date/illness combination. Dataset aggpilot
2007 Jul 02
1
gam function & time trend splines
I've been doing a simple time-series analysis looking at the relationship between daily pneumonia hospitalizations and daily temperature. To mimic some of the literature, I've been including a time-trend to try to account for normal cyclical trends in hospitalization. So I've been using a function that looks something like this: gam(pneucount ~ temp_f +
2012 Jul 28
2
Beta-Binomial Regression in R
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 any help. set.seed(111) k<-20 n<-60 x<-NULL p<-rbeta(k,3,3)# so that the mean nausea rate
2002 Nov 21
1
more than one level of grouping in xyplot
Dear listers, Let use say that I want to display the Pixel dataset (in the NLME library) xyplot(pixel~day|Dog, groups=Side, data=Pixel, panel=panel.superpose, panel.groups=panel.xyplot, type="b", pch=16) (I know, there are better examples, ...) Now, how could I change the colours of the symbols accordingly to another factor changing within subject and side form time to time? (let us
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
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
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)");
2010 Aug 19
4
Aggregate Help
Please let me know if this is or is not the right place to ask these types of questions. Warning: I am new to R by two days. I have a simple dataset. I have loaded the dataset successfully using the following code: Filepath=(C:\temp\\pilot\dataset1.txt") Pilot=read.table(filepath, header=TRUE) Dataset1.txt is delimited and looks like this: Date illness count 2006/01/01 derm 17 2006/01/01
2017 Oct 11
3
TargetRegistry and MC object ownership.
Hi All, While trying to put together an MC-based assembler the other day, I again encountered MC's non-obvious memory ownership rules. The most egregious example of these is MCObjectStreamer's destructor: MCObjectStreamer::~MCObjectStreamer() { delete &Assembler->getBackend(); delete &Assembler->getEmitter(); delete &Assembler->getWriter(); delete Assembler;
2012 May 09
0
Survival data with time dependent covariate
http://r.789695.n4.nabble.com/file/n4619765/survival_file.png Hi everyone, This is what my data looks like, I haven't included the covariates, the example would get too large. uid id date feverstart dumfever 130 75 346465 2011-04-11 <NA> 0 131 75 360287 2011-04-18 <NA> 0 132 75
2007 Oct 03
0
can you help me with empirical probability
I found you online....... Can you help with empirical probability? Hi Partha. I really liked your email that you sent me, it really inspired me. I have been breezing through the chapters, and doing quite well, You should be a teacher. After all the time my college instructor spent with the class on the slopes etc.... There were very few of us who really understood it. However, after reading
2006 Jul 07
3
Mongrel & irbrc
Why does mongrel_rails insist on loading ~/.irbrc with each request? a) I''m curious why it loads it at all (I assume there''s no way of getting an inline breakpointer??) b) Why re-load it? It causes problems with any constants that are used in .irbrc... (alternatively, how do I avoid re-assigning to a constant?) Jon -------------- next part -------------- A non-text
2007 Mar 14
0
Logistic regression for drugs Interactions
I have the model below, for which I run a logistic regression including the interaction term (NSAID*Diuretic) ------------------------ fit1=glm(resp ~ nsaid+diuretic+I(nsaid*diuretic), family= binomial,data=w) NSAID Diuretic Present Absent 0 0 185 6527 0 1 53 1444 1 0 42 1293 1 1 25 253 Coefficients Std. Error z value Pr(>|z|) (Intercept) -3.56335 0.07456 -47.794 < 2e-16 ***