search for: tvar

Displaying 20 results from an estimated 22 matches for "tvar".

Did you mean: tar
2004 Dec 13
3
Advice on parsing formulae
Dear list I would like to be able to group terms in a formula using a function that I will call tvar(), eg. the formula Y ~ 1 + tvar(x:A) + tvar(z) + u + tvar(B) + tvar(poly(v,3)) where x,u and v are numeric and A and B are factors - binary, say. As output, I want the model.matrix as if tvar had not been there at all. In addition, I would like to have information on the grouping, as a vector as...
2000 Jul 19
1
How to use tcltk?
...her examples showing Tcl/Tk package in action. Therefore my question: Is there a pool of well designed applications of tk functions? / Have you created a beautiful example? Here is one of my problems: To print the position of the mouse cursor the following lines of code will work: label .l2 -textvariable tvar pack .l2 bind . <Motion> { set tvar "position %x %y" } bind . <Leave> { set tvar "mouse outside" } However, I have not been able to implement this by tk* functions of the R package. Any idea? Peter Wolf (system: hppa2.0, hpux10.20, maj...
2007 Nov 13
2
Plot segments with different colors
Hello Everybody, I'm trying to plot(x,y) using different colors. I have to cut (x,y) into sub intervals. And I want to plot this sub intervals using colors. But infortunally I don't know how to do this with R. Can any body help me please? My code is looking like : x<-c(tvar[1:t0],tvar[t0:(ts)],tvar[ts:n]) F<-c(var[1:t0],var[t0:(ts)],var[ts:n]) plot(x,F,xlab="Zeit [s]",ylab="Variation [%]",col = "red",type="l") Thanks -- View this message in context: http://www.nabble.com/Plot-segments-with-different-colors-tf4796466.html#a...
2008 Jul 04
2
create a zero matrix & fill
...uble.default(x) :Object cannot be transformed in double) > plot(Variation[1],Variation[2]) Fehler in as.double.default(x) : (list) Objekt kann nicht nach 'double' umgewandelt werden Any suggestion? Hier is the function: #Computing variation of the power VAR<-function(power,length){ tvar=pmean=pmin=pmax=varmax=varmin<-matrix(data=0,ncol=(length-tml0)) for(i in tml0:length){ tvar[i]=i pmean[i]=mean(power[i:(i+deltat)]) pmin[i]=min(power[i:(i+deltat)]) pmax[i]=max(power[i:(i+deltat)]) varmax[i]=100*(pmax[i]-pmean[i])/pmean[i] varmin[i]=100*(pmean[i]-pmin[i])/pmean[i] Results=list(...
2009 Jul 26
0
Version 0.7 of package tsDyn, nonlinear time series
...ded possibilty to have two thresolds and hence three regimes in setar and selectSETAR (arg nthresh) -new functions for unit roots tests: KapShinTest() and BBCTest() -new functions for estimating VAR and VECM: lineVar -new function for estimating TVECM: function TVECM() -new function for estimating TVAR: function TVAR() -new function to test for setar: function setarTest() -new function to test for TVAR: function TVAR.LRtest() -new function to test for TVECM: functions TVECM.SeoTest() and HanSeo_TVECM() -new function to simulate/bootstrap a TVAR: function TVAR.sim() -new function to simulate/boot...
2009 Jul 26
0
Version 0.7 of package tsDyn, nonlinear time series
...ded possibilty to have two thresolds and hence three regimes in setar and selectSETAR (arg nthresh) -new functions for unit roots tests: KapShinTest() and BBCTest() -new functions for estimating VAR and VECM: lineVar -new function for estimating TVECM: function TVECM() -new function for estimating TVAR: function TVAR() -new function to test for setar: function setarTest() -new function to test for TVAR: function TVAR.LRtest() -new function to test for TVECM: functions TVECM.SeoTest() and HanSeo_TVECM() -new function to simulate/bootstrap a TVAR: function TVAR.sim() -new function to simulate/boot...
2008 Jul 04
1
initialize a matrix
Dear R users, I'm trying to write a function which returns minimum,maximum,mean of a vector(power) I've done the following : VAR<-function(power,length){ for(i in tml:length)){ tvar[i]<-i pmean[i]<-mean(power[i:i+deltat]) pmin[i]<-min(power[i:i+deltat]) pmax[i]<-max(power[i:i+deltat]) varmax[i]<-100*(pmax[i]-pmean[i])/pmean[i] varmin[i]<-100*(pmean[i]-pmin[i])/pmean[i] Resulats<-list(tvar,pmin,pmax,pmean,varmin,varmax) }} p.s. tml is a variable which is g...
2017 Jul 11
2
Extracting sentences with combinations of target words/terms from cancer patient text medical records
...## Non-working code #### sampletxt <- structure( list( PTNO = c(1, 2, 2, 2), DATE = structure(c(16436, 16436, 16832, 16845), class = "Date"), TYPE = c("Progress note", "CAT scan", "Progress note", "Progress note"), TVAR = c( "This sentence contains the word metastatic. This sentence contains the term stage IV.", "This sentence contains no target words. This sentence also contains no target words.", "This sentence contains the word metastatic and the word breast. Thi...
2008 Mar 03
3
Plot using colors
Dear R users, I have a problem since I try to plot my datas with different colors. plot(tvar, var, xlab="zeit [s]",ylab="Variation [%]", col = ifelse(var <= varstability, 'green','red')) this works well! But since I add a type="l" to my plot, it will color all the plot with green!!! Is there any solution? I avoid to use teachingDemos. Tha...
2017 Jul 12
0
Extracting sentences with combinations of target words/terms from cancer patient text medical records
...gt;sampletxt <- > structure( > list( > PTNO = c(1, 2, 2, 2), > DATE = structure(c(16436, 16436, 16832, 16845), class = "Date"), > TYPE = c("Progress note", "CAT scan", "Progress note", "Progress note"), > TVAR = c( > "This sentence contains the word metastatic. This sentence contains the term stage IV.", > "This sentence contains no target words. This sentence also contains no target words.", > "This sentence contains the word metastatic and the word...
2017 Jul 12
2
Extracting sentences with combinations of target words/terms from cancer patient text medical records
...gt;sampletxt <- > structure( > list( > PTNO = c(1, 2, 2, 2), > DATE = structure(c(16436, 16436, 16832, 16845), class = "Date"), > TYPE = c("Progress note", "CAT scan", "Progress note", "Progress note"), > TVAR = c( > "This sentence contains the word metastatic. This sentence contains the term stage IV.", > "This sentence contains no target words. This sentence also contains no target words.", > "This sentence contains the word metastatic and the word...
2017 Jul 13
1
Extracting sentences with combinations of target words/terms from cancer patient text medical records
...uot;) sentence_match } sampletxt <- structure( list( PTNO = c(1, 2, 2, 2), DATE = structure(c(16436, 16436, 16832, 16845), class = "Date"), TYPE = c("Progress note", "CAT scan", "Progress note", "Progress note"), TVAR = c( "This sentence contains the word metastatic. This sentence contains the term stage IV.", "This sentence contains no target words. This sentence also contains no target words.", "This sentence contains the word metastatic and the word breast. Thi...
2008 Jul 04
0
RES: initialize a matrix
...a em: sexta-feira, 4 de julho de 2008 11:22 Para: r-help em r-project.org Assunto: [R] initialize a matrix Dear R users, I'm trying to write a function which returns minimum,maximum,mean of a vector(power) I've done the following : VAR<-function(power,length){ for(i in tml:length)){ tvar[i]<-i pmean[i]<-mean(power[i:i+deltat]) pmin[i]<-min(power[i:i+deltat]) pmax[i]<-max(power[i:i+deltat]) varmax[i]<-100*(pmax[i]-pmean[i])/pmean[i] varmin[i]<-100*(pmean[i]-pmin[i])/pmean[i] Resulats<-list(tvar,pmin,pmax,pmean,varmin,varmax) }} p.s. tml is a variable which is g...
2017 Jul 11
0
Extracting sentences with combinations of target words/terms from cancer patient text medical records
...t <- > structure( > list( > PTNO = c(1, 2, 2, 2), > DATE = structure(c(16436, 16436, 16832, 16845), class = "Date"), > TYPE = c("Progress note", "CAT scan", "Progress note", "Progress > note"), > TVAR = c( > "This sentence contains the word metastatic. This sentence > contains the term stage IV.", > "This sentence contains no target words. This sentence also > contains no target words.", > "This sentence contains the word metastatic...
2017 Jul 13
0
Extracting sentences with combinations of target words/terms from cancer patient text medical records
...uot;) sentence_match } sampletxt <- structure( list( PTNO = c(1, 2, 2, 2), DATE = structure(c(16436, 16436, 16832, 16845), class = "Date"), TYPE = c("Progress note", "CAT scan", "Progress note", "Progress note"), TVAR = c( "This sentence contains the word metastatic. This sentence contains the term stage IV.", "This sentence contains no target words. This sentence also contains no target words.", "This sentence contains the word metastatic and the word breast. Thi...
2011 May 24
2
Apply or Tapply to Build Set of Tables
Dear R Helpers, First, I apologize for asking for help on the first of my topics. I have been looking at the posts and pages for apply, tapply etc, and I know that the solution to this must be ridiculously easy, but I just can't seem to get my brain around it. If I want to produce a set of tables for all the variables in my data, how can I do that without having to type them into the table
2008 Aug 12
1
Threshold vector error correction models
Hi, is anyone aware of estimation functions for threshold vector error correction / threshold cointegration models? I didn't find anything for R using RSeek or Google. Thanks a lot for any pointers, Werner __________________________________________________ Do You Yahoo!? hutz gegen Massenmails. http://mail.yahoo.com
2010 Mar 01
0
MASS::loglm - exploring a collection of models with add1, drop1
...ot;5", "6", "7" ), Sex = c("Male", "Female")), .Names = c("Status", "Rank", "Occupation", "Sex")), class = c("xtabs", "table"), call = xtabs(formula = as.formula(paste("freq ~", paste(tvars, collapse = "+"))), data = table)) > str(Hoyt1) xtabs [1:2, 1:3, 1:7, 1:2] 87 125 216 136 256 65 72 233 159 269 ... - attr(*, "dimnames")=List of 4 ..$ Status : chr [1:2] "College" "Non-College" ..$ Rank : chr [1:3] "Low" "Middle" &qu...
2002 Apr 24
1
pooling categories in a contingency table
...Here's what I tried: collapse.table <- function(table, ...) { nargs <- length(args <- list(...)) if (!nargs) return(table) if (inherits(table, "table")) { table <- as.data.frame.table(table) freq <- table[,"Freq"] tvars <- dimnames(table) } names <- names(args) print(cat("names: ", names, "\n")) for (i in 1:nargs) { vals <- args[[i]] nm <- names[[i]] print(cat("vals: ", vals, "\n")) print(cat("nm: ",...
2009 May 29
0
possible bug in "sspir" package?
...subsequent functions (eg, "kfs") want to work on a Nx2 matrix instead. For example, the following lines should produce an estimated state vector of length=20, but the result is length=2: >y <- ts(cbind(rpois(20,20), rpois(20,100)), start=1, freq=1) >ssm.fit <- ssm(t(y) ~ tvar(1), family=binomial(link="logit"), fit=FALSE) >ssm.ex1.fit <- extended(ssm.ex1$ss) >ssm.ex1.fit$m Time Series: Start = 1 End = 2 Frequency = 1 Series 1 [1,] -0.0498745 [2,] -0.1357787 If I try to trick the code and pass in the transpose of y, I get this error: >y...