similar to: Adaptive design code

Displaying 20 results from an estimated 100 matches similar to: "Adaptive design code"

2008 Oct 05
1
Sample mean in R
I am having issues with the following: (muhat = 1/n^2(sum of all the xi's) ) essentially if xbar = the sample mean, muhat = sample mean but square the n. Question: Use R to run a Monte Carlo simulation which compares the finite-sample performance of xbar and muhat. Specifically generate 1000 samples n=30 from a standard normal distribution. For each sample calculate xbar and muhat. I have
2016 Apr 21
0
Data reshaping with conditions
Hi sri, I think that I see what you mean. Your statements: x = Count_A_less_than_max of (Count type B) y = Count_A_higher_than_max of (Count type B). I took to mean that you wanted a logical value for x and y. Looking more closely at your initial message, I see that you wanted _all_ values of A with respect to maxB in x and y. The error with maximum values was due to a typo. Perhaps this will do
2006 Oct 04
0
One-arm survival sample estimates
A few months ago, I posted a query regarding code for a sample size estimate for a one arm survival trial. Below is some code I created to calculate such an estimate - perhaps it may be of some use. #cox.pow computes sample size for a one arm survival trial. med.0 is the null median #survival, med.a is the alternative median survival, a.time is the accrual time, and #f.time is the follow up
2011 Sep 02
5
Hessian Matrix Issue
Dear All, I am running a simulation to obtain coverage probability of Wald type confidence intervals for my parameter d in a function of two parameters (mu,d). I am optimizing it using "optim" method "L-BFGS-B" to obtain MLE. As, I want to invert the Hessian matrix to get Standard errors of the two parameter estimates. However, my Hessian matrix at times becomes
2008 Jun 25
0
Goodness-of-fit for zero-truncated poisson distribution
Hi there, I am trying to write a function to perform GOF test of data to a zero-truncated Poisson distribution. I am facing 2 problems. 1) How can I obtain a frequency table for all values within the range of observed values? For instance if the observations are obs <- c("A", "A", "A", "A", "B", "C", "C", "D",
2012 Jan 23
1
sqldf + Date class. Ordering and summary statistics appear to be incorrect.
I've been using sqldf heavily lately but have encountered problems with ordering of observations or calculating statistics such as max() and min() when the variable used is of class Date. For example, if I run the following code: =============== begin code ================= library(sqldf)
2016 Apr 21
2
Data reshaping with conditions
Hi Jim, Thanks for your time. But somehow this code did not help me to achieve my expected output. Problems: 1) x, y are coming as logical rather than values as I mentioned in my post 2) The values that I get for Max A and Max B not correct 3) It looks like a pretty big data, but I just need to concatenate the values with a comma, the final output will be a character
2005 Apr 05
2
Stats Question: Single data item versus Sample from Norma l Distribution
Here's one possibility, assuming muhat and sigmahat are estimtes of mu and sigma from N iid draws of N(mu, sigma^2): tStat <- abs(x - muhat) / sigmahat pValue <- pt(tStat, df=N, lower=TRUE) I'm not quite sure what df tStat should have (exercise for math stat), but given fairly large N, that should make little difference. Andy > From: Ross Clement > > Hi. I have a
2016 Apr 20
0
Data reshaping with conditions
Hi sri, As your problem involves a few logical steps, I found it easier to approach it in a stepwise way. Perhaps there are more elegant ways to accomplish this. svdat<-read.table(text="Count id name type 117 335 sally A 19 335 sally A 167 335 sally B 18 340 susan A 56 340 susan A 22 340 susan B 53 340 susan B 135 351 lee A 114 351 lee A 84 351 lee A 80 351 lee A 19 351 lee A 8 351 lee A
2011 Sep 21
1
Power calculation for survival analysis
useR's, I am trying to do a power calculation for a survival analysis using a logrank test and I need some help properly doing this in R. Here is the information that I know: - I have 2 groups, namely HG and LG - Retrospective analysis with subjects gathered from archival data over 20 years. No new recruitment of subjects and no estimated time to target accrual and accrual rate. - Survival
2003 Feb 24
2
"trace" argument in legend() (PR#2578)
Full_Name: Jerome Asselin Version: 1.6.2 OS: RedHat Linux 7.2 Submission from: (NULL) (142.103.173.179) Should be an easy fix... Consider the examble below: plot(0,0) legend(0,0,c("Hello!","Hi!"),pch=1:2,lty=1:2,trace=T) It gives the following trace: > plot(0,0) > legend(0,0,c("Hello!","Hi!"),pch=1:2,lty=1:2,trace=T) xchar= 0.05178 ;
2008 Apr 08
1
sample size for log-rank test with more than 2 groups
Hi everyone, I was wondering whether extension of the current spower function for Hmisc were existing? My current focus is to calculate sample size based on the log-rank test with more than 2 groups (with/without trend) Taking into account the loss of follow up and the accrual processes. A SPSS library (ART) is existing but can't find anything in R Any information is welcome ! Many
2009 Jun 09
0
RODBC sqlSave does not append the records
I am running R version 2.8.1 on Windows XP OS. recs is a one-row, eighteen-column data.frame I want to insert into a DB2 table. sqlSave(channel, recs, tablename = "testappend_slt", append = TRUE, + rownames = FALSE, colnames = FALSE, + verbose = TRUE, oldstyle = FALSE, + safer = TRUE, addPK = FALSE, + fast = FALSE, test = FALSE, nastring = NULL) Query:
2002 Aug 29
8
lme() with known level-one variances
Greetings, I have a meta-analysis problem in which I have fixed effects regression coefficients (and estimated standard errors) from identical models fit to different data sets. I would like to use these results to create pooled estimated regression coefficients and estimated standard errors for these pooled coefficients. In particular, I would like to estimate the model \beta_{i} = \mu +
2016 Apr 20
2
Data reshaping with conditions
Dear All, I am trying to reshape the data with some conditions. A small part of the data looks like below. Like this there will be more data with repeating ID. Count id name type 117 335 sally A 19 335 sally A 167 335 sally B 18 340 susan A 56 340 susan A 22 340 susan B 53 340 susan B 135 351 lee A 114 351 lee A 84 351 lee A 80 351 lee A 19 351 lee A 8 351 lee A 21 351 lee A 88 351 lee B 111 351
2008 Oct 21
2
Question about glm using R
Good morning, I am using R to try to model the proportion of burned area in Portugal. The dependent variable is the proportion. The family used is binomial and the epsilon would be binary. I am not able to find the package to be used when the proportion (%) has to be used in glm. Could someone help me? I am using normal commands of glm.. for example: glm_5<- glm(formula=p~Precipitation,
2001 Aug 27
1
colorbar legend for image()
Hi, are there any plans to add a colorbar legend to image()? Or such a possibility already implemented which I just haven't discovered yet. Anyway, I will be willing to spent some time on the implementation if there isn't anyone working on that already. Thanks Thomas -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read
2008 May 08
1
cpower and censoring
I would like to do some power estimations for a log-rank two sample test and cpower seems to fit the bill. I am getting confused though by the man page and what the arguments actually mean. I am also not sure whether cpower takes into account censoring or not. Could anyone provide a simple example of how I would get the power for a set control/non-control clinical trial where censoring occurs at
2018 Oct 18
1
What are the differences between systemd and non-systemd Linux distros?
On 10/17/18 7:55 PM, Warren Young wrote: > On Oct 17, 2018, at 3:28 PM, Mark Rousell <mark.rousell at signal100.com> wrote: >> >> On 17/10/2018 20:03, Warren Young wrote: >>> On Oct 17, 2018, at 10:03 AM, Mark Rousell <mark.rousell at signal100.com> wrote: >>>> launchd is not being forced on them as systemd is in practice >>> Try doing
2007 Oct 13
1
Error Message from R
Hi, I am trying to calculate the descretionary accruals using the bootstrapping technique with the R program, but I keep getting an error message. Previously, after typing in the command on the front sreen, R would return the output without any problems. I am now using a different dataset, and am getting the following error: Error in solve.default(t(X) %*% X) : system is