Hi Raz
Keep your responses to the rhelp list.
Did you try residuals function?
DNase1 <- subset(DNase, Run == 1)
DNase1[12,3]<-0.1
fm1DNase1 <- nls(density ~ SSlogis(log(conc), Asym, xmid, scal), DNase1)
resid(fm1DNase1)
[1] -3.273213e-02 -3.173213e-02 -7.798226e-03 -4.798226e-03 -7.665433e-05
[6
Hi Farnoosh,
Despite my deep suspicion that this answer will solve a useless
problem, try this:
last_subject<-0
keep_deps<-c("B","D","F")
keep_rows<-NULL
for(rowindex in 1:dim(df)[1]) {
if(df[rowindex,"Subject"] != last_subject) {
last_subject<-df[rowindex,"Subject"]
start_keeping<-0
}
if(d
# your code
Subject<- c("2", "2", "2", "3", "3", "3", "4", "4", "5", "5", "5", "5")
dates <- seq(as.Date('2011-01-01'),as.Date('2011-01-12'), by = 1)
deps <- c("A", "B", "C", "C", "D", "A", "F", "G", "A", "F", "A", "D")
df <- data.frame(Subject, dates, deps)
df
final<-c("2 2011-01-02B","2 2011
Hi Jennifer,
see below.
On 2016-03-29 22:47, Jennifer Wu, Miss wrote:
Hi,
I am currently using R v3.2.3 and on Windows 10 OS 64Bit.
I am having convergence issues when I use coxph with a interaction
term (glarg*bca_py) and interaction term with the restricted cubic
spline (glarg*bca_time_ns).
> On 30 Mar 2016, at 02:53, Marine Regis wrote:
>
> Hello,
>
> I would like to build a Lorenz curve and calculate a Gini coefficient in
> order to find how much parasites does the top 20% most infected hosts support.
>
> Here is my data set:
>
> Number of parasites per host:
> parasites = c(
On Wed, 30 Mar 2016, Erich Neuwirth wrote:
On 30 Mar 2016, at 02:53, Marine Regis wrote:
Hello,
I would like to build a Lorenz curve and calculate a Gini coefficient in order
to find how much parasites does the top 20% most infected hosts support.
Here is my data set:
Number of parasites
Failure to converge in a coxph model is very rare. If the program does not make it in 20
iterations it likely will never converge, so your control argument will do little.
Without the data set I have no way to guess what is happening. My first question,
however, is to ask how many events you
Hello,
I have a time series that represents data sampled every 15-minutes. The
data currently run from November through February, 8623 total readings.
There are definitely daily periodic trends and non-stationary long-term
trends. I would love to decompose this using basic time series analysis.
H
Code please.
Reproducible example?(e.g. 1st 100 values)
"PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code."
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticki
I "think" the problem is that you failed to set the "frequency"
attribute of your time series, so it defaults to 1. A time series with
one observation per period cannot be decomposed, since the error term
is confounded with the "seasonality", which is essentially your error
message.
Again, a guess
To All,
Thanks for your help.
I uninstalled R, the 3.2 library and R Studio. Reinstalled R and R Studio.
Now the temp files move the newly installed packages into the
R-.23.2.4revised library.
> .libPaths()
[1] "C:/Users/james_henson/Desktop/Documents/R/win-library/3.2"
[2] "C:/Program Files/R/R
On Wed, Mar 30, 2016 at 10:29 AM, Bert Gunter wrote:
> I "think" the problem is that you failed to set the "frequency"
> attribute of your time series, so it defaults to 1. A time series with
> one observation per period cannot be decomposed, since the error term
> is confounded with the "seasonal
Sorry about not providing code; I didn't think to just simulate dummy code.
Here's a situation where I have <1 year of data, hourly time sampling, and
the error that I get using my actual data:
###
X=as.data.frame(1:6000)
X[2]=seq.POSIXt(ISOdate(2015,11,1),by='hour',length.out=6000)
X[3]=sample(
Dear R group memberI tried couple of hours to figure out the solution of
following.match function behaves strange from value 0.7 and 1.7
> periodlimint<-seq(from=0.1, to=50, by=0.1)> indexAtest<-match( .6,
> periodlimint)> indexAtest[1] 6> periodlimint<-seq(from=0.1, to=50, by=0.1)>
> indexAte
I am having problems with the MICE package in R, particularity with pooling the
imputed data sets.
I am running a multilevel binomial logistic regression, with Level1 - topic
(participant response to 10 questions on different topics, e.g. T_Darkness,
T_Day) nested within Level2 - individuals.
T
Dear r-helpers,
I want to run a multinomial mixed effects model with the glmmADMB package
of R. I have read the available information of the programm but i couldn't
find which family or link has to be used for multinomial data. In the
examples are only shown models with Poisson, negative binomial
Took me a few days to get a reply from the student. The code he is running is:
library(ripa)
img<-readJPEG( "arthurs-seat.jpg" )
hist(fftImg(img))
I see the same error as the student on many systems. When I run
require(ripa) on the machine I mentioned before:
> require('ripa')
Loading required
On 29/03/2016 3:42 PM, Marc Girondot via R-help wrote:
Two different sizes of R logo are shown in Rstudio in the Help at the
package level.
For example, numderiv shows a nice discreet logo located at (in MacosX):
/Library/Frameworks/R.framework/Versions/3.3/Resources/doc/html/logo.jpg
whereas pa
You said you specified frequency=96 when you constructed the time
series, but when I do that the decomposition looks reasonable:
> time <- seq(0,9,by=1/96) # 15-minute intervals, assuming time unit is day
> measurement <- sqrt(time) + 1/(1.2+sin(time*2*pi)) +
rnorm(length(time),0,.3)
> plot(decomp
FAQ 7.31 I think. Here are a couple things you can try.
close_enough <- function(x, y) isTRUE(all.equal(x, y))
periodlimint<-seq(from=0.1, to=50, by=0.1)
indexAtest <- which(sapply(periodlimint, close_enough, y = 0.7))
match( as.character(.7), periodlimint)
Best,
Ista
On Wed, Mar 30, 2016 at
Duncun, thank you for your reply. My encoding is:
> Sys.getlocale('LC_CTYPE')
[1] "Czech_Czech Republic.1250"
In RStudio I use UTF-8. I tried also other recommended encodings but some
characters are still misrepresented.
I've found solution to this. To correctly display strings in RStudio I have
Hello
here is the code implements bagging that I copied from net (
http://www.r-bloggers.com/improve-predictive-performance-in-r-with-bagging/)
:
set.seed(10)
y<-c(1:1000)
x1<-c(1:1000)*runif(1000,min=0,max=2)
x2<-c(1:1000)*runif(1000,min=0,max=2)
x3<-c(1:1000)*runif(1000,min=0,max=2)
lm_fit<-l
> On Mar 29, 2016, at 1:47 PM, Jennifer Wu, Miss
> wrote:
>
> Hi,
>
> I am currently using R v3.2.3 and on Windows 10 OS 64Bit.
>
> I am having convergence issues when I use coxph with a interaction term
> (glarg*bca_py) and interaction term with the restricted cubic spline
> (glarg*bca_tim
Hello
I am new to R , Is there any code to run Adaboost.R2 in r ?!
I wrote a code from example of gbm package, but I can not have prediction
interval would you help me ?!
library(gbm)
mm <- read.table("E:/bagg.txt",TRUE)
xnam <- paste("x", 1:50, sep="")
fmla <- as.formula(paste("y ~ ", paste(xna
https://cran.r-project.org/web/views/MachineLearning.html
What do you mean by Prediction Interval? I doubt that this has clear
meaning in the boosting context. You might want to follow up this
statistical question on a statistical or machine learning list like
stats.stackexchange.com .
Bert Gun
On 2016-03-30 23:06, David Winsemius wrote:
On Mar 29, 2016, at 1:47 PM, Jennifer Wu, Miss
wrote:
Hi,
I am currently using R v3.2.3 and on Windows 10 OS 64Bit.
I am having convergence issues when I use coxph with a interaction
term (glarg*bca_py) and interaction term with the restricted c
Bill, Josh, and Bert,
Thanks for your responses. I still can't quite get this when I use actual
dates. Here's an example of what is going wrong:
X=as.data.frame(1:6000)
X[2]=seq.POSIXt(ISOdate(2015,11,1),by='hour',length.out=6000)
X[3]=sample(100,size=6000,replace=T)
Y=xts(X[,3],order.by=X[,2])
Hi team
I am new to R so please help me to do this task.
Please find the attached data sample. But in the original data frame I
have 350 features and 40 observations.
I need to carryout these tasks.
1. How to Identify features (names) that have all zeros?
2. How to remove features that ha
> On Mar 30, 2016, at 3:56 PM, Norman Pat wrote:
>
> Hi team
>
> I am new to R so please help me to do this task.
>
> Please find the attached data sample.
No. Nothing attached. Please read the Rhelp Info page and the Posting Guide.
> But in the original data frame I
> have 350 features and
I strongly suggest checking out some R tutorials. Most of these tasks are
basic data management that are likely covered in just about any tutorial.
I'm afraid that this isn't the appropriate forum for such basics.
On Mar 30, 2016 9:14 PM, "Norman Pat" wrote:
> Hi team
>
> I am new to R so please
Hi Norman,
To check whether all values of an object (say "x") fulfill a certain
condition (==0):
all(x==0)
If your object (X) is indeed a data frame, you can only do this by
column, so if you want to get the results:
X<-data.frame(A=c(0,1:10),B=c(0,2:10,9),
C=c(0,-1,3:11),D=rep(0,11))
all_z
decompose wants frequency(Y) to be more than 1 - it really wants an integer
frequency
so it can return a vector of that length containing the repeating pattern
(the "figure").
frequency(Y) is 1/3600 so you get the error (which might be better worded):
> plot(decompose(Y))
Error in decompose(Y
How about:
# if a data frame
names(X)[which_cols]
# and if you have rownames:
rownames(X)[which_rows]
My note about hackles was that packages generally don't know what
values are "abnormal" unless you specify them. Just like us. So you
have to specify what the range of "normal" values are, or wh
Hi David,
> Please find the attached data sample.
No. Nothing attached. Please read the Rhelp Info page and the Posting Guide.
*I attached it. Anyway I have attached it again (sample train.xlsx).*
Who is assigning you this task? Homework? (Read the Posting Guide.)
*This is my new job role so I
Hi Jim,
Thanks for your reply. I know these basic stuffs in R.
But I want to know let say you have a data frame X with 300 features.
>From that 300 features I need to pullout the names of each feature
that has zero values for all the observations in that sample.
Here I am looking for a packag
> On Mar 30, 2016, at 6:39 PM, Norman Pat wrote:
>
> Hi David,
>
> > Please find the attached data sample.
>
> No. Nothing attached. Please read the Rhelp Info page and the Posting Guide.
> I attached it. Anyway I have attached it again (sample train.xlsx).
I didn't say you didn't attach it.
Perhaps if you go back to the example that I sent, you will notice
that those vectors of logical values (which_cols, which_rows) were
among the results. Have you tried:
names(X)[which_cols]
to see whether it is what you want?
Jim
On Thu, Mar 31, 2016 at 2:42 PM, Norman Pat wrote:
> Hi Jim,
>
>
37 matches
Mail list logo