Displaying 20 results from an estimated 110 matches similar to: "Linear model predictions, differences in class"
2002 Jun 19
2
solve() doesn`t work
Hi,
I tried to inverse a matrix but it doesn`t work. I hope somebody can help
me. This is what I did.
> kurse <- read.table("kurse.txt", header=T, dec=",")
> x <- cbind(1,kurse[,-c(1)])
> y <- kurse$index
> t(x) %*% x
Error in t(x) %*% x : requires numeric matrix/vector arguments
> x <- as.matrix(x)
> xtxi <- solve(t(x) %*% x)
Error in
2006 Nov 30
4
Quicker way of combining vectors into a data.frame
Hi,
In a function, I compute 10 (un-named) vectors of reasonable length
(4471 in the particular example I have to hand) that I want to combine
into a data frame object, that the function will return.
This is very slow, so *I'm* doing something wrong if I want it to be
quick and efficient, though I'm not sure what the best way to do this
would be.
I know it is the combining into data
2012 Oct 12
1
Problem with which function
Hej,
i need the which() funktion to find the positions of an entry in a matrix.
the entries i'm looking for are : seq(begin,end,0.01) and there are no
empty spaces
i'm searching in the right range.
so i was looking for the results R can find and i recieved this answer.
for (l in
2009 Jan 02
0
Parallel computing with snow
I've been using parApply() in snow package for parallel computing with
the following lines in R 2.8.1:
library(snow)
nNodes <- 4
cl <- makeCluster(nNodes, type = "SOCK")
fm <- parApply(cl, myData, c(1,2), func1, ...)
Since I have a Mac OS X (version 10.4.11) with two dual-core
processors, I thought that I could run 4 simultaneous clusters.
However with the 1st job
2005 Oct 25
1
performance of nchar
Hi,
Is nchar function knowingly slow in R? I'm doing some string
formatting that requires multiple call to nchar, and nchar seems to be
very slow.
Experiment 1, pass nchar inside sprintf, and it takes 0.7 seconds
> system.time(for (i in 1:10000)
+ str = sprintf('0005%020d', nchar(op))
+ )[3]
[1] 0.7
Experiment 2, get the length of op separately using nchar, and then pass
2004 Jun 29
0
discrete hazard rate analysis
Dear R users,
I have more of a statistical/econometric question than straight R one.
I have a data set with the discrete hazard rate of small firms survival on
400 counties over a period of 9 years. This data was generated using census
information from the VAT registration number of each one of these business.
I would like to analyze the effect of regional factors (deprivation index,
real
2012 Apr 19
0
Thanks-solved:RE: problem extracting data from a set of list vectors
Thanks Don and Jim,
"Get" did the trick! That command is new to me, and is exactly what this problem needed. The syntax that worked is actually slightly simpler than what was suggested. This is what worked:
all.comps <- ls(pattern="^res")
for(i in all.comps){
obj = get(i);
...
Thanks again.
--Kelly V.
-----Original Message-----
From: MacQueen, Don [mailto:macqueen1 at
2018 Mar 12
1
Help on Aggregation
Dear All,
1.I have been trying to aggregate my data but I have not been getting it
correctly. In the data I want to convert hourly data into daily averages.
Here is a sample of the data:
Neph_no Date Time Temp_C Pressure_kPa RH
9 2014/03/28 10:00:00 38.4 95.9 29.7
9 2014/03/28 11:00:00 37.8 95.8 29.2
9 2014/03/28 12:00:00 36.7 95.8 35.1
9 2014/03/28 13:00:00 35.4 95.8 38.9
9
2013 Mar 27
1
Averaging Out many rows from a column AND funtion to string
Dear all,
1) I have a very large matrix of
str(keep)
num [1:153899, 1:3415] -98.6 -95.8 -96.4 -95.8 -98 ...
that I would like to reduce its size to something like
str(keep)
num [1:1000, 1:3415] -98.6 -95.8 -96.4 -95.8 -98 ...
or anything similar in size as this is a matrix that needs plotting (so is ok if it is 1000 row, 995, or 1123)
I think what I need here is a way of selecting
2009 Jan 21
1
Two similar zoo objects with different structures, how to get same structure?
Dear all,
I have a zoo object that has following structure:
> str(bldata)
zoo [1:5219, 1:12] 91.9 91.8 91.7 91.8 91.7 ...
- attr(*, "index")=Classes 'dates', 'times' atomic [1:5219] 7305
7306 7307 7308 7309 ...
.. ..- attr(*, "format")= chr "m/d/y"
.. ..- attr(*, "origin")= Named num [1:3] 1 1 1970
.. .. ..- attr(*,
2010 Aug 18
13
Poor creat/delete files performance
Hi,
We did some performance test and found the create/delete files performance
of btrfs is very poor.
The test is that we create 50000 files and measure the file-create time
first, and then delete these 50000 files and measure the file-delete time.
(The attached file is the reproduce program)
The result is following:
(Unit: second)
Create file performance
BtrFS Ext4
Total times:
2006 Jul 16
3
bug in 1.0RC2?
Hello,
I have a small problem with dovecot 1.0RC2. This didn't happen with
former versions. There are imap processes that are left open a long
while after the client disconnected. I am running dovecot on OpenBSD
3.8. Below is the output of a process list. As you can see, there are
many imap processes for the same login running.
simon 11593 0.0 0.1 924 1140 ?? I 12:21PM
2004 Aug 06
4
Icecast / liveice quandry
I've been running classic icecast + liveice for some time now (several years)
without problems. A couple days ago, the station manager (NPR affiliate) came
to me and asked if we could 'inject' a static file into the stream. Basically
what he wants is for the client to first receive a static file (requesting
donations of course) and then on to the live stream (*not* intermittently).
2006 Jul 21
2
glm cannot find valid starting values
glm(S ~ -1 + Mdif, family=quasipoisson(link=identity), start=strt, sdat)
gives error:
> Error in glm.fit(x = X, y = Y, weights = weights, start = start, etastart
> =
> etastart, :
> cannot find valid starting values: please specify some
strt is set to be the coefficient for a similar fit
glm(S ~ -1 + I(Mdif + 1),...
i.e. (Mdif + 1) is a vector similar to Mdif.
The error
2010 Oct 29
1
Tukey post hoc comparison (glht?) after 3factorial mixed model (lmer)
Hello, dear R-community.
This is a question about TukeyHSD between factor combinations of a Three-Way
ANOVA, which is - since it is a multi measure ANOVA - not a simple ANOVA but
a Generalised Linear Mixed Model (GLMM), calculated with "lmer".
> growth <-
groupedData(length~meas|box_id,outer=~spec*comp*water,data=all.spec)
> model <-
2013 Mar 25
2
Plot Matrix with Data
Hi ,
I would like to use ggplot2 to plot a matrix as an image.
You can copy paste the following
Data<-matrix(data=rnorm(900,80,20),nrow=30,ncol=30)
lengthOut<-5
Lengths<- 15
library(reshape2)
library(ggplot2)
tdm <- melt(Data)
ggplot(tdm, aes(x = Var2, y = Var1, fill = factor(value)),levels=seq(0,1,by=0.1)) +
labs(x = "MHz", y =
2004 Aug 06
0
Icecast / liveice quandry
i know with icecast2/ices , karl heyes has some example config files for
mixing live/static content ( if i recall correctly ) .
however, what i had done in the past is add the static file to the .pls
prior to the live mount . if you generate the .pls files on demand , this
would work . ALSO , i'm quite sure that both icecast1/2 support
intro/outtro files , etc .. this may achieve the same
2012 Jul 06
4
differences between survival models between STATA and R
Dear Community,
I have been using two types of survival programs to analyse a data set.
The first one is an R function called aftreg. The second one an STATA
function called streg.
Both of them include the same analyisis with a weibull distribution. Yet,
results are very different.
Shouldn't the results be the same?
Kind regards,
J
--
View this message in context:
2011 Feb 24
1
Boxplot not doing what I think it should
My box plot below is drawing its upper whisker all the way to the last point, instead of showing the point as an outlier. Am I misunderstanding, or is it a bug?
Help(boxplot) states for the parameter ?range? that ?this determines how far the plot whiskers extend out from the box. If range is positive, the whiskers extend to the most extreme data point which is no more than range times the
2013 Feb 16
1
odd behavior within R2HTML
Dear R People:
I'm using R2HTML but having a strange result.
Here is the original data:
resp trt block
90.3 A I
89.2 A II
98.2 A III
93.9 A IV
87.4 A V
97.9 A VI
92.5 B I
89.5 B II
90.6 B III
94.7 B IV
87.0 B V
95.8 B VI
85.5 C I
90.8 C II
89.6 C III
86.2 C IV
88.0 C V
93.4 C VI
82.5 D I
89.5 D II
85.6 D III
87.4 D IV
78.9 D V
90.7 D VI
And here are the commands:
> resin1.df <-