Displaying 20 results from an estimated 600 matches similar to: "confidence intervals for mean (GLM)"
2006 Feb 20
3
Boxplot Help for Neophyte
R helpers
I am getting to grips with R but came across a small problem today that I
could not fix by myself.
I have 3 text files, each with a single column of data. I read them in
using:
myData1<-scan("C:/Program Files/R/myData1.txt")
myData2<-scan("C:/Program Files/R/myData2.txt")
myData3<-scan("C:/Program Files/R/myData3.txt")
I wanted to produce a
2011 Feb 25
1
speed up process
Dear users,
I have a double for loop that does exactly what I want, but is quite
slow. It is not so much with this simplified example, but IRL it is slow.
Can anyone help me improve it?
The data and code for foo_reg() are available at the end of the email; I
preferred going directly into the problematic part.
Here is the code (I tried to simplify it but I cannot do it too much or
else it
2012 Jul 03
1
insert missing dates
Hello
I have dataframes.
mydata1 <-data.frame(value=c(15,20,25,30,45,50),dates=c("2005-05-25 07:00:00
","2005-05-25 19:00:00","2005-06-25 07:00:00","2005-06-25 19:00:00
","2005-07-25 07:00:00","2005-8-25 19:00:00"))
or
mydata2 <-data.frame(value=c(15,20,25,30,45,50),dates=c("2005-05-25 00:00:00
","2005-05-25
2009 Jan 06
5
Using apply for two datasets
I can run one-sample t-test on an array, for example a matrix myData1,
with the following
apply(myData1, 2, t.test)
Is there a similar fashion using apply() or something else to run
2-sample t-test with datasets from two groups, myData1 and myData2,
without looping?
TIA,
Gang
2013 May 02
0
Data in packages: save or write.table?
Hi all,
I am trying to understand Writing R Extension...
Section 1.1.5, data: I include two datasets in a package, one using 'save',
the other using 'write.table':
--- 8< ----
myData1 <- data.frame(x=1:10)
write.table(myData1,file="myData1.txt")
myData2 <- data.frame(x=2:10)
save(myData2,file="myData2.Rdata")
--- 8< ----
Then R CMD check aks me to
2011 Feb 28
0
Fwd: Re: speed up process
Dear Jim,
Here is again exactly what I did and with the output of Rprof (with this
reduced dataset and with a simpler function, it is here much faster than
in real life).
Thanks you again for your help!
## CODE ##
mydata1<- structure(list(species = structure(1:8, .Label =
c("alsen","gogor", "loalb", "mafas", "pacyn", "patro",
2006 Feb 01
1
several plots in one
Can anyone tell me how I can supply more than one graph to plotCI
(gplots) at once?
Below is what I tried, also with rbind instead of cbind.
What is the way to do this (in general, I think)?
Problem is that lines of 1-st and 2-nd series are mixed, while they have
nothing to do with each other.
I also tried calling plotCI with argument add=TRUE, which didn't seem to
work (that is actually
2008 Apr 15
2
How can I import user-defined missings from Spss?
Hi,
It works for me to import spss datasets via library(foreign) with read.spss or via library Hmisc by (spss.get).
But no matter which way I do import the data, user-defined missings from Spss are always lost.
(it makes no difference if there are a single value, a range, or any combination of them. They are always ignored).
Is there any way in R to find out if any value was user-defined missing
2010 Nov 11
2
Kolmogorov Smirnov Test
I'm using ks.test (mydata, dnorm) on my data. I know some of my
different variable samples (mydata1, mydata2, etc) must be normally
distributed but the p value is always < 2.0^-16 (the 2.0 can change
but not the exponent).
I want to test mydata against a normal distribution. What could I be
doing wrong?
I tried instead using rnorm to create a normal distribution: y = rnorm
2010 Jan 19
1
splitting a factor in an analysis of deviance table (negative binomial model)
Dears useRs,
I have 2 factors, (for the sake of explanation - A and B), with 4 levels each. I've already fitted a negative binomial generalized linear model to my data, and now I need to split the factors in two distinct analysis of deviance table:
- A within B1, A within B2, A within B3 and A within B4
- B within A1, B within A2, B within A3 and B within A4
Here is a code that illustrates
2006 Nov 30
0
problem with chiMerge
Hi, I am trying to discretize a numeric attribute of a data.frame using
chiMerge
mydata2<-chiMerge(mydata1, c(7), alpha = 0.05)
but this command never returns, and I have to forcefully STOP the
operation. Is this a bug or am I missing somthing?
Can anybody help me. please?
Thanks in advance.
2011 May 11
0
Init nnetTs (or nnet?) with a former Neural Net
I am new to R and use nnetTs - calls.
If a time series of let's say 80000 Datapoints and did call nnetTs I want
make a new net
for the old ponts plus the next 1000 points (81000 datapoints total) what
would again
cost much calculation time.
So I want to pre-init the new net with the former wonnen net to reduce the
necessary
iteration numbers.
Is thee a possibility to do that and how?
i.e.:
2011 Sep 07
1
randomForest memory footprint
Hello, I am attempting to train a random forest model using the
randomForest package on 500,000 rows and 8 columns (7 predictors, 1
response). The data set is the first block of data from the UCI
Machine Learning Repo dataset "Record Linkage Comparison Patterns"
with the slight modification that I dropped two columns with lots of
NA's and I used knn imputation to fill in other gaps.
2012 May 15
4
reading data into R
Hi I am really new using R, so this is really a beginner stuff! I
created a very small data set on excel and then converted it to .csv
file. I am able to open the data on R using the command "read.table
("mydata1.csv", sep=",", header=T)" and it just works fine. But when I
want to work on the data (e.g. calculate the mean of variable "X") R
says
2011 Jul 11
1
GLS - Plotting Graphs with 95% conf interval
Hi, I am trying to plot the original data with the line of the model using
the predict function. I want to add SE to the graph, but not sure how to
get them out as the predict function for gls does not appear to allow for
SE=TRUE argument.
Here is my code so far:
f1<-formula(MaxNASC40_50~hu3+flcmax+TidalFlag)
vf1Exp<-varExp(form=~hu3)
B1D<-gls(f1,correlation=corGaus(form=Lat~Lon,
2012 Jun 06
3
problem about set operation and computation after split
hi,
I met some problems in R, plz help me.
1. How to do a intersect operation among several groups in one list, without
a loop statement? (I think It may be a list)
create data:
myData <- data.frame(product = c(1,2,3,1,2,3,1,2,2),
year=c(2009,2009,2009,2010,2010,2010,2011,2011,2011),value=c(1104,608,606,1504,508,1312,900,1100,800))
mySplit<- split(myData,myData$year)
2013 Jan 10
1
Semi Parametric Bootstrap
Greetings to you all,
I am performing a semi parametric bootstrap in R on a Gamma Distributed
data and a Binomial distributed data. The main challenge am facing is
the fact that the residual variance depends on the mean (if I am correct).
I strongly feel that the script below may be wrong due to mean-variance
relationship
#####R code#######
fit1s
2013 Apr 01
2
Timing of SET_VECTOR_ELT
Assume a C program invoked by .Call, that returns a list.
Near the top of the program we allocate space for all the list elements. (It is my habit
to use "xyz2" for the name of the R object and "xyz" for the pointer to its contents.)
PROTECT(means2 = allocVector(REALSXP, nvar));
means = REAL(means2);
PROTECT(u2 = allocVector(REALSXP, nvar));
u =
2018 Mar 15
3
stats 'dist' euclidean distance calculation
Hello,
I am working with a matrix of multilocus genotypes for ~180 individual snail samples, with substantial missing data. I am trying to calculate the pairwise genetic distance between individuals using the stats package 'dist' function, using euclidean distance. I took a subset of this dataset (3 samples x 3 loci) to test how euclidean distance is calculated:
3x3 subset used
2006 Feb 18
1
truncated negative binomial using rnegbin
Dear R users,
I'm wanting to sample from the negative binomial distribution using the
rnegbin function from the MASS library to create artificial samples for the
purpose of doing some power calculations. However, I would like to work
with samples that come from a negative binomial distribution that includes
only values greater than or equal to 1 (a truncated negative binomial), and
I