I have a puzzle
When I include an interaction in the model, many predicted probabilities are
above 1. Is that a problem with my model? I thought the predicted prob can't be
bigger than 1...
Any help would be really appreciated! Thanks!
K.
There is a bug in your code: Try
reg2-predict.glm(reg1, se.fit=T, data.frame(male=1, edu=1,
married=1,inc=1, relig=1, YEAR=seq(1,33,1)), type=response)
You put type=response into your newdata frame, so it wasn't visible to
predict.glm. So predict.glm assumed the default type, which is link.
Hello,
I am trying to estimate an arfima model with R.
fracdiff(rdu, nar = 2, nma = 2, ar = rep(NA, max(nar, 1)), ma = rep(NA,
max(nma, 1)), dtol = NULL, drange = c(0, 0.5), h, M = 100).
The procedure give the message:
Error in ar[is.na(ar)] - 0 : object nar not found
What can I do?
With
mgcv 1.5-0 is now on CRAN. Main changes are:
* REML and ML smoothness selection are now available.
* A Tweedie family has been added.
* `gam.method' has been replaced (see arguments `method' and `optimizer'
for `gam')
For other changes see the changeLog.
Simon
--
Simon Wood,
I would like to estimate the sigma matrix of multinormal distribution
through ML.
But I don't know how to optimize the parameter sigma.
Could any one help me?
Thank you so much~
Yen Lee
__
R-help@r-project.org mailing list
Hi everyone,
Using a simulation, I have to find what are the probabilities that, in a square
region, the convex hull is a triangle, using the chull function. However, I
have a hard time with the chull function, i did not see many examples in which
the chull function is used. I searched a
Hey Marc,
Your code was very helpful. You should make a new R function out of it.
Actually it looks like adding margins may be a little bit tricky if I
only want sums of the counts, not the percentages. If I add margins
after I rbind, then R will sum together the counts with the
nitin kumar wrote:
Hello Everyone,
I am trying to excess the inbuit .Fortran and .C codes of R. Can any one
help me in that. For example in kmeans clustering the algorithms are written
in .Fortran I want to access them and see the .Fortran syntax of the codes.
Can any one help me how can I do
Edna Bell wrote:
Dear R Gurus:
What is the difference between a Primitive and a Generic, please?
They are talking about different things (though both look like
functions): generic talks about the user interface, primitive talks
about the internal implementation.
A generic is a
Hi,
the predict-function is not very good in guessing names from a given new
dataset. So if you want to predict x1 from some new x2 values, your
newdata argument should contain some x2 - values.
predict(model, newdata=data.frame(x2=seq(0,4)), interval =
c(confidence), level =
Hello
Is there somebody who have code for estimation of time homogeneity and
local change procedure based on the papers of Spokoiny and Mercurio ?
Thanks a lot in advance!
Olivier
[[alternative HTML version deleted]]
__
Isn't the single example enough in help(chull)?
In your case I think you are finding the probability of length(chull(x)) == 3.
Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086
Mobile: +86-15810805877
Homepage: http://www.yihui.name
School of
I am trying to excess the inbuit .Fortran and .C codes of R. Can any one
help me in that. For example in kmeans clustering the algorithms are
written
in .Fortran I want to access them and see the .Fortran syntax of the
codes.
Can any one help me how can I do that?
Download the R source
Hi,
I am using the methods developped in the packages statDA and
mvoutliers to detect multivariate outliers.
I used the plotmvoutlier to detect the outliers.
The only thing I don't understand is that the results given by
the vector w from arw and o from plotmvoutlier are not the
same (i.e.
See ?optim
See ?mle (stats4 package)
or help.search(MLE)
Justin BEM
BP 1917 Yaoundé
Tél (237) 99597295
(237) 22040246
De : b88207...@ntu.edu.tw b88207...@ntu.edu.tw
À : r-help@r-project.org
Envoyé le : Lundi, 9 Mars 2009, 6h55mn 20s
Objet : [R] How to
Dear all,
I got one problem here and hoping someone can help me on this. Say I have a
50 by 2 matrix and I don't know how to randomly select:
1. a pair of observations from the last 10th of the 50 observation from the
matrix.
2. how to select randomly an observation from the first 5
Hi
r-help-boun...@r-project.org napsal dne 09.03.2009 11:29:41:
Dear all,
I got one problem here and hoping someone can help me on this. Say I
have a
50 by 2 matrix and I don't know how to randomly select:
1. a pair of observations from the last 10th of the 50 observation from
the
hi,
I plot path diagrams with the path.diagram() function of the sem
package in combination with the graphviz application.
Now I want the graphviz code for a path-plot with the actual
standardized coefficients on the arrows (not the names).
I tried to add edge.labels=values as an argument
Hi,
I have some time-series data and wish to plot a normal probability plot in
R. How do I go about this?
Thanks.
W.
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE
I know it only causes a shift and scale transformation of the
distribution, but it always gets my goat when I see people using the
sum as a statistic of interest when the mean has a more general
application (i.e. some other researcher obtains a different number of
observations per subject) and a
WXE83 wrote:
Dear all,
I got one problem here and hoping someone can help me on this. Say I have a
50 by 2 matrix and I don't know how to randomly select:
data - matrix(1:25, 50, 2)
1. a pair of observations from the last 10th of the 50 observation from the
matrix.
data[sample(41:50,
http://lmgtfy.com/?q=Parallel+R
First entry provides an article that notes the various solutions thus
far (rmpi, snow, pnmath).
On Wed, Mar 4, 2009 at 7:06 AM, Enrico Giorgi giorgi_enr...@hotmail.it wrote:
Dear Sir or Madam,
I've been using R for one year and I really appreciate it.
I
Another possibility is buy an U3 smartdrive (U3). And then you can use de
UltraEdit Portable.
It’s a good text editor with some level of support for R.
Atenciosamente,
Leandro Lins Marino
Centro de Avaliação
Fundação CESGRANRIO
Rua Santa Alexandrina, 1011 - 2º andar
Rio de Janeiro, RJ - CEP:
I have some time-series data and wish to plot a normal probability plot
in
R. How do I go about this?
In R, they are known as quantile-quantile plots. Check out ?qqplot and
?qqnorm.
Regards,
Richie.
Mathematical Sciences Unit
HSL
Hello,
I am having a problem specifying the correlation structure in lme which
leads to the error: Error in getCovariate.corSpatial(object, data =
data) : Cannot have zero distances in corSpatial. I have specified a
grouping variable which is the only fix I could find by searching this
Why do I get different sign of the coefficients of covariates when I run the
semi-parametric proportional hazard model (coxph) compared to the parametric
proportional hazard model (survreg)?
Anyone with experience in extracting information form survreg to make
predictions are free to contact
PJ,
If I use odfweave, the odfweave function produces an output file, but the
for loop produces no tables. If I use R2HTML with similar code, I just get
the last table the for loop produces. Here is a look at the code of
odfweave, which seems to be correct with syntax but doesn't produce any
Enrico,
I've been using R for one year and I really appreciate it.
I would like to know if a version performing parallel computations on
multicore computers and computer clusters exists.
There is a high-performance computing SIG (special interests group) for R. See:
Dear Martin,
It helps if you spell the name of the argument correctly,
edge.labels=values. BTW, this will give you the unstandardized, not
standardized, coefficients.
John
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
On
Behalf Of Martin
Thierry and Jim:
Thank you both for your reply. I remain a bit baffled over something.
Here is the sample data generated by jim and code by Thierry, which
works exactly as expected.
x - cbind(sample(326397, 800967, TRUE), sample(20, 800967, TRUE))
x - data.frame(x)
names(x)[1:2] -
I think I might be able to answer my own question here. It turns out in
the step
tab - table(dats3$student_unique_id, dats3$teacher_unique_id)
The dimensions of this table in my data are significantly larger than
the simulated data, thus consuming more memory. So, I know that the lme4
package
Dear r-helpers!
I want to classify my vegetation data with hierachical cluster analysis.
My Dataset consist of Abundance-Values (Braun-Blanquet ordinal scale; ranked)
for each plant species and relevé.
I found a lot of r-packages dealing with cluster analysis, but none of them is
able to
Dear all,
I'm stuck with the following problem:
I generate graphs using both the grid system (with lattice) and the base
system. I'd like to be able to identify these graphs later on with a bit of
identifying text (e.g. a date and some comments). Adding text to these
graphs cannot be done using
Thanks, it works..
Regards,
Siti
Domenico Vistocco wrote:
WXE83 wrote:
Dear all,
I got one problem here and hoping someone can help me on this. Say I have
a
50 by 2 matrix and I don't know how to randomly select:
data - matrix(1:25, 50, 2)
1. a pair of observations from the last
Dear R-helpers:
I am an R newbie and have a question related to writing functions that
accept unlimited number of input arguments.
(I tried to peek into functions such as paste and cbind, but failed, I
cannot see their codes..)
Can someone kindly show me through a summation example?
Say, we have
I generate graphs using both the grid system (with lattice) and the base
system. I'd like to be able to identify these graphs later on with a bit
of
identifying text (e.g. a date and some comments). Adding text to these
graphs cannot be done using a common system if you want to save them as
I looked at the help page for rcorr.cens and was surprised that
function, designed for censored data and taking input as a Surv
object, was being considered for that purpose. This posting to r-help
may be of interest. John Baron offers a simple implementation that
takes its input as
Dear colegues
I am trying to analyze growth data on mice. To do this I attempted to fit
logistic curve using nlme package. However, the dataset I use is large (in
total ca 20 000 measures on ca 3 000 individuals) with relatively complicated
structure (several explanatory variables with
Hi,
On 9 Mar 2009, at 15:32, Sean Zhang wrote:
Dear R-helpers:
I am an R newbie and have a question related to writing functions that
accept unlimited number of input arguments.
it's usually through the ... argument, e.g in paste(...).
(I tried to peek into functions such as paste and
Hello,
I know, this list is for R, not for mathematics,
but because of this problem in question, which may
be interesting for others too, I ask it here.
I want to correct a signal (timeseries).
There is a jump up, and later a jump down.
This error signal (must be an error, because
the normal
Dear Richie,
Unfortunately that doesn't help because it requires you to know beforehand
what sort of graph you're generating. I want to be able to generate a graph
(irrespective of the type) and then use a common process to label them so I
don't have to think about which way I generated the graph
On 9 Mar 2009, at 16:04, Sean Zhang wrote:
Dear Baptiste:
Many thanks for your help!
Using the Reduce way, it works almost perfectly.
I ran into this problem when thinking of appending vectors.
Is it possible to not use list() within add()
so add(vec1,vec2,vec3) below can work?
add -
Big thanks for your help and suggestion for email communication.
-s
On Mon, Mar 9, 2009 at 12:18 PM, baptiste auguie ba...@exeter.ac.uk wrote:
On 9 Mar 2009, at 16:04, Sean Zhang wrote:
Dear Baptiste:
Many thanks for your help!
Using the Reduce way, it works almost perfectly.
I ran
It's important to identify the distribution of a dataset before do analysis
and inference. Is there any method to identify the distribution of a given
dataset? For example, I want to identify a dataset belong to normal of
poisson distribution, how can I do that?
--
View this message in context:
Dear Richard,
although I am co-author of some (other) parts of 'plm', my understanding
of GMM methods is still rudimentary. Yet I have tried a quick exercise
replicating Example 18.5 in Greene's Econometric Analysis (5th ed.)
like this
## retrieve data from the book's site here
Rik Schoemaker RikSchoemaker at zonnet.nl writes:
Unfortunately that doesn't help because it requires you to know beforehand
what sort of graph you're generating. I want to be able to generate a graph
(irrespective of the type) and then use a common process to label them so I
don't have to
I am having trouble updating packages for R 2.8.1 in Windows XP. Note that I
*am* able to update packages for R 2.7.0 (see bottom of posting) so this is
not an Internet proxy problem. The steps I took were to
(a) Copy over packages from my existing (2.7.0) library subdiretory to the R
2.8.1
jakub kreisinger jakubkreisinger at seznam.cz writes:
I am trying to analyze growth data on mice. To do this I attempted to fit
logistic curve using nlme package.
However, the dataset I use is large (in total ca 20 000 measures on ca 3 000
individuals) with relatively
complicated structure
Marcus, Jeffrey wrote:
I am having trouble updating packages for R 2.8.1 in Windows XP. Note that I *am* able to update packages for R 2.7.0 (see bottom of posting) so this is not an Internet proxy problem. The steps I took were to
(a) Copy over packages from my existing (2.7.0) library
dear useRs,
i'm working with a mean reverting model of the following specification:
y = mu + beta(x - mu) + errorterm, where mu is a constant
currently I estimate just y = x (with lm()) to get beta and then
calculate mu = estimated intercept / (1-beta).
but I'd like to estimate mu and beta
Dear all,
I would like to know how to calculate the median follow-up time from using
function prodlim. By using reverse=TRUE i should get correct estimates when
there are ties involved and I want to know how to get the median follow-up
times from a Kaplan-meier survival function stratified by
Dieter Menne dieter.menne at menne-biomed.de writes:
4) Use C for the core function. This is very effective, and there is at least
on example coming with nlme (was it SSlogist?).
I correct: it is phenoModel, calling nlme_one_comp_first in nlme.c
Dieter
Are you using Microsoft OneCare? I had a similar problem accessing CRAN
(actually setting a CRAN mirror) several weeks ago with R2.8.1 while R2.6.2
could access CRAN with no difficulties. Even running R as Administrator
wouldn't work.
The problem proved to be that OneCare had asked for my
Hello,
is there a function, that creates a moving histogram?
I need a moving histogram analogical to a moving average.
Is there such a thing in R?
Ciao,
Oliver
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
Dear R-users,
How can I detect a NULL in a recursive list?
For a regular list I could use lapply:
lapply(list(x=NULL), is.null)
$x
[1] TRUE
However that doesn't work for structures like list(list(x=NULL)). I tried
rapply but it treats NULL as a list and discards them:
rapply(list(a=1,
David Winsemius wrote:
I looked at the help page for rcorr.cens and was surprised that
function, designed for censored data and taking input as a Surv object,
was being considered for that purpose. This posting to r-help may be of
interest. John Baron offers a simple implementation that takes
DeaR all,
I'd like to know how to create an Excel file with multiple spreadsheets from
R. I searched the help files and found [1] but it is not what I want to do.
Let's say I have a data frame called DF as in the following code
# Some data
set.seed(123)
ID-sample(5,100,replace=TRUE)
The sparse xtabs solution is good. It avoids the overhead
of a long list of small vectors that tapply can require.
Here is another approach, perhaps more like what
a SAS programmer might do. It can run quickly
and use little memory but also can be tricky to set up.
Sort the data into groups (by
After much research I've listed a couple of ways to do repeated measures
anova here:
http://gribblelab.org/2009/03/09/repeated-measures-anova-using-r/
including univariate and multivariate methods, post-hoc tests, sphericity
test, etc.
It appears to me that the most useful way is a multivariate
On Mon, 09-Mar-2009 at 02:34PM -0400, Jorge Ivan Velez wrote:
| DeaR all,
|
| I'd like to know how to create an Excel file with multiple
| spreadsheets from R. I searched the help files and found [1] but it
| is not what I want to do.
I use the Perl script from Marc Schwartz in that list.
I also work with very large datasets, and currently am using an early
2008 MacPro 2x3GHz Quad-Cpre Intel Xeon with 32 GB RAM. This works
very well, although (I'm ashamed to say, since it's partly a
reflection of my programming skills) I still run out of RAM
occasionally! But this system works well
Below. Brief summary is: You **need** to consult a statistician. You know
far too little statistics to do statistical analysis on your own.
-- Bert
Bert Gunter
Genentech Nonclinical Biostatistics
650-467-7374
-Original Message-
From: r-help-boun...@r-project.org
Hi Paul,
Note that in your example subject/myfactor is conflated with the error
term. The error thrown when you use intervals on the lme object is a
result:
am2 - lme(dv ~ myfactor, random = ~1|subject/myfactor, data=mydata)
intervals(am2)
Error in intervals.lme(am2) :
Cannot get confidence
I believe you are stuck with what the error says -- i.e. you 'Cannot
have zero distances in corSpatial'.
If you recorded locations for observations within transects then you
should be able to model the spatial autocorrelation, either within
transects or across the study area (although the latter
if you don't find the solution you need, I have a package that uses
Apache POI to do this, but you will need to compile it yourself.
contact me if you want to go this route.
-Whit
On Mon, Mar 9, 2009 at 3:34 PM, Patrick Connolly
p_conno...@slingshot.co.nz wrote:
On Mon, 09-Mar-2009 at 02:34PM
Mean reverting model = autoregression? If so, then search for
?ar
or
?arima
to fit a time series.
On Mar 10, 4:36 am, Josuah Rechtsteiner rechtstei...@bgki.net wrote:
dear useRs,
i'm working with a mean reverting model of the following specification:
y = mu + beta(x - mu) + errorterm,
I think I am overlooking a call or concept in R to help me easily and quickly
restructure my data.frame:
Sometimes the data I receive looks like:
VariableName, Run1, Run2, Run3, Location
temp, 15.0, 16.0, 17.0, There
And other times it looks like:
VariableName, Run, Location
On Mon, Mar 9, 2009 at 12:13 PM, Dieter Menne
dieter.me...@menne-biomed.de wrote:
jakub kreisinger jakubkreisinger at seznam.cz writes:
I am trying to analyze growth data on mice. To do this I attempted to fit
logistic curve using nlme package.
However, the dataset I use is large (in total ca
Just wondering -- the referenced thread at
[1] http://tinyurl.com/aurprr
included a comment from Gabor (I think) that some day the gdata package
might include a 'write.xls' based on M Schwartz' perl script.
Any progress there?
Carl
__
Try this:
sum.test - function(...) sum(c(...))
More commonly one uses the list(...) construct.
On Mon, Mar 9, 2009 at 11:32 AM, Sean Zhang seane...@gmail.com wrote:
Dear R-helpers:
I am an R newbie and have a question related to writing functions that
accept unlimited number of input
It was from Greg, not me.
On Mon, Mar 9, 2009 at 5:53 PM, Carl Witthoft c...@witthoft.com wrote:
Just wondering -- the referenced thread at
[1] http://tinyurl.com/aurprr
included a comment from Gabor (I think) that some day the gdata package
might include a 'write.xls' based on M
I just installed R 2.8.1 on Windows XP. When I ran the source command,
I got the error:
Error in capabilities(iconv) :
1 argument passed to .Internal(capabilities) which requires 0
I looked at the code for source and it indeed has a call to
capabilities(iconv)
if (capabilities(iconv)) {
hi andrew,
the problem is that I don't know what kind of model this exactly is...
I only know that I have to do it this way and how the model is
structured.
Mean reverting model = autoregression? If so, then search for
?ar
or
?arima
to fit a time series.
On Mar 10, 4:36 am, Josuah
I am running an lme model with the main effects of four fixed variables (3
continuous and one categorical see below) and one random variable. The
data describe the densities of a mite species awsm in relation to four
variables: adh31 (temperature related), apsm (another plant feeding mite)
I do not believe that anything formal has been done.
Calling the perl script within an R function call would not be overly
difficult, the key would be to package the perl modules required by
the script, otherwise the user would have to install these manually
from CPAN or via an OS specific
The xlsReadWrite package provides write.xls for Windows,
while the dataframes2xls package provides write.xls for
non-Windows systems.
- Phil Spector
Statistical Computing Facility
Hi,
I am trying to use MLearn in MLInterfaces package to do randomforest,
clustering, knn etc. How do I predict on a test set for which I do not know the
classes? My training set has two classes.
Thanks,
Tulgan
Read section 2.4.2 of Pinheiro and Bates again. It describes the
differences between the 4 methods of inference you tried (marginal
t-test, sequential F-tests, LRTs and CIs) and makes some
recommendations. There are some tricky issues involved in drawing
inferences from mixed models, and
Autoregression is just X(n+1) = a X(n) + b + error. The mean
reverting model is when |a| 1. Estimation is carried out using
x_ar - ar(x)
summary(x_ar)
standard error is found in the square root of the diagonal of the x_ar
$asy.var.coef matrix.
please read the documentation found at ?ar to
On Mon, 9 Mar 2009, Vadim Ogranovich wrote:
Dear R-users,
How can I detect a NULL in a recursive list?
For a regular list I could use lapply:
lapply(list(x=NULL), is.null)
$x
[1] TRUE
However that doesn't work for structures like list(list(x=NULL)). I tried
rapply but it treats NULL as
i think there's confusion here between a time series that reverts to its
long term mean
and an ornstein uhlenbeck type of mean reversion. they're not the same
thing and
I don't want to go into the difference because I would probably just add
to the confusion.
you might be better off sending
library(help=zoo)
make your time series into a zoo object
then you can probably get something out of,
rollapply(yourdata.zoo, FUN=hist, ...)
but you must program the plotting yourself.
Kjetil
On Mon, Mar 9, 2009 at 3:18 PM, Oliver Bandel oli...@first.in-berlin.dewrote:
Hello,
is there a
below is one link for an explanation of the equivalence between AR(1)
and OU so I was wrong about needing an AR(2). at a quick glance, i think
OU's that can always be written as AR(1)'s
( with a correct mapping of parameters ) but not every AR(1) can be
written as an OU ?
Autoregression is more general than the (discretized) Ornstein
Uhlenbeck process. For a start, a discretized version of the Ornstein-
Uhlenbeck is just an AR(1) process X(n+1) = X(n) + a (X(n) - mu) +
error(n+1), but with the coefficient a restricted to 0 a 1. This
restriction is necessary as
Given we are talking about statistical software, one bibliometric measure
of relative package popularity is scientific citations. Web of Science is
not too useful where the citation has been to a website or computer
package, but Google Scholar for lme4: Linear mixed-effects models using
S4
look at package reshape there is a cool little function input that
once you get the hang of is handy.
On Mon, Mar 9, 2009 at 5:50 PM, Jason Rupert jasonkrup...@yahoo.com wrote:
I think I am overlooking a call or concept in R to help me easily and quickly
restructure my data.frame:
Sometimes
On 10-Mar-09 01:07:54, David Duffy wrote:
Given we are talking about statistical software, one bibliometric
measure of relative package popularity is scientific citations.
Web of Science is not too useful where the citation has been to a
website or computer package, but Google Scholar for
Hi all,
Put me in the camp that says more information is better than less
information - even if imperfect. Interpretation can be left to those
using the data.
Also, popular can mean many things. An alternative to number of
times a package is downloaded would be a ratings system, where R users
There was a discussion on this a while back in which Bill Venables
said: To me a much more urgent initiative [than rating responders on
R listserves] is some kind of user online review system for packages,
even something as simple as that used by Amazon.com has for customer
review of books. I
Stephen - Thanks a bunch for the suggestion to use reshape. Thank is exactly
what I needed. Here is the test code that I put together so far. I can
probably get rid of the time and id columns from the resulting
reshaped_test_data data.frame, but this is will allow me to move forward.
R-Forge already has this but I don't think its used much. R-Forge
does allow authors to opt out which seems sensible lest it deter
potential authors from submitting packages.
I think objective quality metrics are better than ratings, e.g. does package
have a vignette, has package had a release
Hello,
I'm using the rmeta package to perform a meta analysis using summary statistics
rather than raw data, and would like to analyze the effects in three different
subgroups of my data. Furthermore, I'd like to plot this on one forest plot,
with corresponding summary weighted averages of the
Hi all,
I have a problem with concatinating strings while taking as a path here the
problem is
i have to take path as
FPATH-D:\\Kiran
and file name as
Fname-FINDINGS.CSV
and while I am reading this table I have to take path with using these two
strings because in FPATH there is many
Does this do what you want?
paste(FPATH, Fname, sep=\\)
Simon.
On Tue, 2009-03-10 at 10:48 +0530, venkata kirankumar wrote:
Hi all,
I have a problem with concatinating strings while taking as a path here the
problem is
i have to take path as
FPATH-D:\\Kiran
and file name as
94 matches
Mail list logo