similar to: How to write a function?

Displaying 20 results from an estimated 2000 matches similar to: "How to write a function?"

2010 Jul 07
1
SAM program and R mirror - which port to open?
To whom this may concern, I am having issues installing a program called "SAM" (Statistical Analysis of Microarrays) which is an excel add in and requires the use of R. Due to the firewall at my hospital, R cannot connect to a mirror and therefore cannot install necessary files for the complete installation of SAM. The IT department has asked me which "port" needs to be opened
2003 Jun 16
2
(no subject)
hi, do somebody tell me, where i could find information about samba restrictions compared with Windows Server. I' m trying to write a small paper for school, which describe a comarison between samba and Windows Server. I heard for example, that 1-Samba is not adapted for great nets? 2-Samba has not a "system management server" like windows? 3-Remote Procedure Calls (RPCs) has been
2009 Jun 16
2
no sdp or contact replacement using externip
Hi all! Do anybody has a full working environment using externip on an asterisk box behind a nat? I tried with two diferent boxes (Elastix-1.4.24 e Trixbox-1.4.22-3)and the asterisk do not replace neither contact, neither sdp headers info with the externip informed on sip.conf general parameters. I used these two statements: externip=XXX.XXX.XXX.XXX localnet=192.168.200.0/255.255.255.0 Do
2009 Mar 28
1
stratified variables in a cox regression
>Hello, I am hoping for assistance in regards to examining the contribution of stratified variables in a cox regression. A previous post by Terry Therneau noted that "That is the point of a strata; you are declaring a variable to NOT be proportional hazards, and thus there is no single "hazard ratio" that describes it". Given this purpose of stratification, in the
2012 Jun 01
1
Stratified Sampling with randomForest Regression
Hi All, I'm using R's randomForest package (and it's quite awesome!) but I'd really like to do some stratified sampling with a regression problem. However, it appears that the package was designed to only accommodate stratified sampling for classification purposes (see https://stat.ethz.ch/pipermail/r-help/2006-November/117477.html). As Andy suggests in the link just
2013 Apr 24
2
Regression on stratified count data
Hi all: For stratified count data,how to perform regression analysis? My data: age case oc count 1 1 1 21 1 1 2 26 1 2 1 17 1 2 2 59 2 1 1 18 2 1 2 88 2 2 1 7 2 2 2 95 age: 1:<40y 2:>40y case: 1:patient 2:health oc: 1:use drug 2:not use drug My purpose: Anaysis whether case and
2010 Apr 27
1
Randomization for block random clinical trials
Hi, I’m new to R (just installed today) and I’m trying to figure out how to do stratified randomisation using it. My google search expedition has lead me to believe that blockrand package will most probably be the answer to it. I’ve played around with blockrand for awhile and tried the sample code: library(blockrand) ##stratified by sex male <- blockrand(n=100,
2006 Apr 10
3
SE estimates for treatment groups from nlme
I am wondering how to obtain SE estimates for fixed effects from a nonlinear mixed effects model? I have fixed effects corresponding to three factors A, B and C with 2, 3 and 3 levels respectively. I have fit a model of the following general form: nlme1<-nlme(y~ SasympOrig(x, Asym, lrc), data=df, fixed=list(Asym~A*B*C, lrc~A*B*C), start=c(fixef(ETR.nlme)[1], rep(0,17), fixef(ETR.nlme)[2],
2011 Mar 10
1
ANOVA for stratified cox regression
This is a follow-up to a query that was posted regarding some problems that emerge when running anova analyses for cox models, posted by Mathias Gondan: Matthias Gondan wrote: >* Dear List,*>**>* I have tried a stratified Cox Regression, it is working fine, except for*>* the "Anova"-Tests:*>**>* Here the commands (should work out of the box):*>**>*
2009 Apr 25
3
Nomogram with stratified cph in Design package
Hello, I am using Dr. Harrell's design package to make a nomogram. I was able to make a beautiful one without stratifying, however, I will need to stratify to meet PH assumptions. This is where I go wrong, but I'm not sure where. Non-Stratified Nomogram:
2010 Apr 04
2
calculating an interaction statistic from stratified data
Dear R community, I have data on beta&standard error (for the main effect of variable x), stratified by sex for my dataset. I wish to calculate the sex-interaction effect (as beta&se) from these two stratified datasets. Is there a package to do this? If not, any advice how to do it manually? Thank you very much and best regards, Georg. ************************ Georg Ehret, JHU,
2007 Aug 31
3
"pipe() failed: Too many open files"
I am getting random disconnects from my imap session, dificulties to revconnect, very sluggish behaviour when changing between mail folders also frequent and rapidly repititive messages on te client "mailserver x.x.x.x is not a imap4 server" I am running dovecot 1.0.rc2 from ports on OpenBSD 4.0 on a PIII, 500MHz 512MB My set up is very small - a webserver with a single imap account on
2009 Dec 16
2
rcart - classification and regression trees (CART)
Hi, I am trying to use CART to find an ideal cut-off value for a simple diagnostic test (ie when the test score is above x, diagnose the condition). When I put in the model fit=rpart(outcome ~ predictor1(TB144), method="class", data=data8) sometimes it gives me a tree with multiple nodes for the same predictor (see below for example of tree with 1 or multiple nodes). Is there a way
2012 Oct 13
4
Problems with coxph and survfit in a stratified model with interactions
I?m trying to set up proportional hazard model that is stratified with respect to covariate 1 and has an interaction between covariate 1 and another variable, covariate 2. Both variables are categorical. In the following, I try to illustrate the two problems that I?ve encountered, using the lung dataset. The first problem is the warning: To me, it seems that there are too many dummies
2005 Jul 18
1
read large amount of data
Hi, I have a dataset with 2194651x135, in which all the numbers are 0,1,2, and is bar-delimited. I used the following approach which can handle 100,000 lines: t<-scan('fv', sep='|', nlines=100000) t1<-matrix(t, nrow=135, ncol=100000) t2<-t(t1) t3<-as.data.frame(t2) I changed my plan into using stratified sampling with replacement (col 2 is my class variable: 1 or 2).
2011 Jun 01
4
subsetting with condition
Dear R Team, I am a new R user and I am currently trying to subset my data under a special condition. I have went through several pages of the subsetting section here on the forum, but I was not able to find an answer. My data is as follows: ID NAME MS Pol. Party 1 John x F 2 Mary s S
1999 Dec 23
1
data.frame(I(matrix)) ? (PR#388)
I observe dificulties with using data.frame(I(matrix)) > mat <- matrix(letters, 2, 2) > dimnames(mat) <- list(c(1:2), c("x","y")) > mat x y 1 "a" "c" 2 "b" "d" > dd <- data.frame(I(mat)) > ddd I.mat..x I.mat..y 1 a a 2 b b 3 c c doesn't look too bad, but, has
2008 Dec 11
1
How to generate a prediction equation for a stratified survival model that was fitted by cph() in Design package
Dear all, I used cph() function from Frank harrell's Design package to create a survival model, then used functions 'Function' and 'sascode' to generate prediction equation based on the saved survival model. But it failed. I included a stratified variable in the model. If I removed the stratification, they were working well. Does that mean that function 'Function'
2013 Jan 10
1
SRS, Stratified, and Cluster sampling
Hi, Has anyone done (or know of) any nice R activities that help introductory students ( and teachers :) ) better understand the concepts of simple vs stratified vs cluster sampling? Any links? David -- View this message in context: http://r.789695.n4.nabble.com/SRS-Stratified-and-Cluster-sampling-tp4655099.html Sent from the R help mailing list archive at Nabble.com.
2008 Jan 15
1
Anova for stratified Cox regression
Dear List, I have tried a stratified Cox Regression, it is working fine, except for the "Anova"-Tests: Here the commands (should work out of the box): library(survival) d = colon[colon$etype==2, ] m = coxph(Surv(time, status) ~ strata(sex) + rx, data=d) summary(m) # Printout ok anova(m, test='Chisq') This is the output of the anova command: > Analysis of Deviance Table