I believe lrm has a criterion appropriate to single-precision calculations
(as S-PLUS used to use). Try reducing 'tol' from its default of 1e-7.
But your design matrix *is* near singular
kappa(cbind(1,x))
[1] 557390.5
so try centring/scaling your variables.
On Sun, 12 Oct 2008, Gad
On Sat, 11 Oct 2008, Alexy Khrabrov wrote:
Is there a way to select a subset of a dataframe consisting of all those rows
with rownames *except* from a subset of rownames to be excluded? Example:
Yes: DF[is.na(match(row.names(DF), exclude_me)), ]
a - data.frame(x=1:10,y=10:1)
a -
You need to use substitute() on the call. Something like
sapply(1:5,function(i)
eval(substitute(svm(person_oid ~ ., data=zrr[1:N,]), list(N=100*i))
)
On Sun, 12 Oct 2008, Alexy Khrabrov wrote:
I want to train svm models on increasingly large training data subsets of
some zrr as
On Sun, 12 Oct 2008, Murray Jorgensen wrote:
The birth weight example from ?stepAIC in package MASS runs well as
indeed it should.
However when I change stepAIC() calls to step() calls I get warning
messages that I don't understand, although the output is similar.
Why would you do this?
I am encoutering s similar problem to the one described before in
specifying a function in nls.
I defined a function plot_it2 in the following way:
plot_it2-function(SOA,t1weight, t2weight, d1weight, d2weight){
sapply(SOA,plot_it,t1weight, t2weight, d1weight, d2weight)
}
fit should
On Oct 12, 2008, at 2:26 AM, Prof Brian Ripley wrote:
You need to use substitute() on the call. Something like
sapply(1:5,function(i)
eval(substitute(svm(person_oid ~ ., data=zrr[1:N,]),
list(N=100*i))
)
Thanks!
On Sun, 12 Oct 2008, Alexy Khrabrov wrote:
I want to train
Dear R users,
I realise a scatterplot by
plot(x,y)
and I add the labels by
text(x,y,labels,pos=1).
How can I avoid, automatically, that labels overlap, like happen in SPSS?
Thank you.
Nicola Sturaro
__
R-help@r-project.org mailing list
cls59 sharpsteen at mac.com writes:
The final piece is a good TeX-aware editor, for windows I prefer WinEdt:
I would like to add Tinn-R.
However, if you are running something like an optimization
routine which takes five minutes, you will be waiting five minutes every
time you typeset the
Dear R-users,
I have come across some difficulties using the offset argument in a model.
There is not much information in ?offset, ?lm, ?glm and therefore have resorted
to post here.
Offset appears to work in the models I run becuase I get the expected
coefficients when comparing offset and
Dear All,
I am working with a generalized linear mixed-effects model with poisson error
using the lme4 package in R. I created a model with the lmer function including
some main effects, three two way interactions and two random effects.
The model works well, but I have troubles when removing
Prof Brian Ripley wrote:
On Sun, 12 Oct 2008, Murray Jorgensen wrote:
The birth weight example from ?stepAIC in package MASS runs well as
indeed it should.
However when I change stepAIC() calls to step() calls I get warning
messages that I don't understand, although the output is similar.
On 12-Oct-08 11:32:31, Barry Rowlingson wrote:
2008/10/12 Ted Harding [EMAIL PROTECTED]:
Hi Folks,
I'm wondering if there's a secret trick to achieve the following.
I have some big code for analysis related to a named variable,
which will be one of several in the columns of a dataframe, and
Nicola Sturaro Sommacal wrote:
Dear R users,
I realise a scatterplot by
plot(x,y)
and I add the labels by
text(x,y,labels,pos=1).
How can I avoid, automatically, that labels overlap, like happen in SPSS?
Hi Nicola,
thigmophobe.labels in the plotrix package tries to avoid label crashes,
and
Hello,
I don't understand the description / help-text for the
numericDeriv() function.
Why is there a new environment used?
And what is meant with an environment here?
Is it similar or the same as a local workspace,
like an environment in functional languages?
And why is it needed here?
2008/10/12 Jim Lemon [EMAIL PROTECTED]:
Nicola Sturaro Sommacal wrote:
Dear R users,
I realise a scatterplot by
plot(x,y)
and I add the labels by
text(x,y,labels,pos=1).
How can I avoid, automatically, that labels overlap, like happen in SPSS?
Hi Nicola,
thigmophobe.labels in the
2008/10/12 Ted Harding [EMAIL PROTECTED]:
Hi Folks,
I'm wondering if there's a secret trick to achieve the following.
I have some big code for analysis related to a named variable,
which will be one of several in the columns of a dataframe, and
I would like to be able to choose between a run
On Sun, Oct 12, 2008 at 1:39 AM, Felipe Carrillo
[EMAIL PROTECTED] wrote:
Does LATEX have to be installed on your computer? How does the xtable package
and Sweave work together? How can I make the code below create a table as pdf
file?
Please check the documentation of RcmdrPlugin.Export
On Sun, 12 Oct 2008, Jim Lemon wrote:
Darja Poklukar wrote:
I just want to ask how to enlarge the resolution of my plots in R. For ex.
for publising I would like a picture of resolution minimal 500 dpi, all I
managed was picture of dim 5,28 X 5,83 with 118 pixels/cm.
Hi Darja,
The usual
Brian,
I use:
R version 2.7.2 (2008-08-25)
i386-apple-darwin8.11.1
locale:
C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] plotrix_2.4-7RdbiPgSQL_1.14.0 Rdbi_1.14.0
I didn't think of it as a Mac specific issue,
On Sun, Oct 12, 2008 at 7:32 AM, Barry Rowlingson
[EMAIL PROTECTED] wrote:
2008/10/12 Ted Harding [EMAIL PROTECTED]:
Hi Folks,
I'm wondering if there's a secret trick to achieve the following.
I have some big code for analysis related to a named variable,
which will be one of several in the
Darja Poklukar wrote:
I just want to ask how to enlarge the resolution of my plots in R. For ex. for
publising I would like a picture of resolution minimal 500 dpi, all I managed
was picture of dim 5,28 X 5,83 with 118 pixels/cm.
Hi Darja,
The usual answer is to increase the size of the
Dear All,
I am working with linear mixed-effects models using the lme4 package in R. I
created a model using the lmer function including some main effects, a
three-way interaction and a random effect.
Because I work with a binomial and poisson distribution, I want to know whether
there is
On Sun, Oct 12, 2008 at 7:24 AM, Oliver Bandel
[EMAIL PROTECTED] wrote:
Hello,
I don't understand the description / help-text for the
numericDeriv() function.
Why is there a new environment used?
And what is meant with an environment here?
?environment
or
Hello,
The function qt returns NaN for degrees of freedom 1. For example:
qt(0.5,0.5)
[1] NaN
Warning message:
In qt(p, df, lower.tail, log.p) : NaNs produced
But qt(0.5,0.5) should be 0, since the distribution is symmetric.
pt(0,0.5)
[1] 0.5
It actually fails with any value, as long as
Hi,
I found a problem dealing with repeated measures anova post hoc. I'm
desperate in finding how to use it in R.
The problem is that an Error term in aov() creates class of aovlist and
that's why I cannot use TukeyHSD() which needs aov class.
I really appreciate your help.
Migle
Sorry about the html-formatted message. Here it is again in plain text.
Hello,
The function qt returns NaN for degrees of freedom 1. For example:
qt(0.5,0.5)
[1] NaN
Warning message:
In qt(p, df, lower.tail, log.p) : NaNs produced
But qt(0.5,0.5) should be 0, since the distribution is
Zitat von Gabor Grothendieck [EMAIL PROTECTED]:
On Sun, Oct 12, 2008 at 7:24 AM, Oliver Bandel
[EMAIL PROTECTED] wrote:
[...]
The input to numericDeriv is not values but an expression.
See the Examples section at the end of ?numericDeriv
The expression given as the first arg
ultimately
If you simply want successive differences use diff:
x - seq(4)^2
diff(x)
tx - ts(x)
diff(tx)
On Sun, Oct 12, 2008 at 9:19 AM, Oliver Bandel
[EMAIL PROTECTED] wrote:
Zitat von Gabor Grothendieck [EMAIL PROTECTED]:
On Sun, Oct 12, 2008 at 7:24 AM, Oliver Bandel
[EMAIL PROTECTED] wrote:
[...]
Please do RTFM, for the help says
df: degrees of freedom ( 0, maybe non-integer). 'df = Inf' is
allowed. For 'qt' only values of at least one are currently
supported.
On Sun, 12 Oct 2008, Enrico Rossi wrote:
Sorry about the html-formatted message. Here it is again
Zitat von Gabor Grothendieck [EMAIL PROTECTED]:
If you simply want successive differences use diff:
x - seq(4)^2
diff(x)
tx - ts(x)
diff(tx)
[...]
Oh, cool, thanks.
But what about diff / delta_t ?
Do I have to calculate it by my own, or is there
already a function for making a
?deltat
On Sun, Oct 12, 2008 at 9:45 AM, Oliver Bandel
[EMAIL PROTECTED] wrote:
Zitat von Gabor Grothendieck [EMAIL PROTECTED]:
If you simply want successive differences use diff:
x - seq(4)^2
diff(x)
tx - ts(x)
diff(tx)
[...]
Oh, cool, thanks.
But what about diff / delta_t ?
Do
Following up on Barry's suggestion led on to a more straightforward
approach:
VarNames - NULL
# VarNames - c(VarNames, Var1)
# VarNames - c(VarNames, Var2)
# VarNames - c(VarNames, Var3)
# [...]
for(i in (1:length(VarNames))){
VarName - VarNames[i]
[...]
Then any one or some of those
Prof Brian Ripley wrote:
Please do RTFM, for the help says
df: degrees of freedom ( 0, maybe non-integer). 'df = Inf' is
allowed. For 'qt' only values of at least one are currently
supported.
On Sun, 12 Oct 2008, Enrico Rossi wrote:
Sorry about the html-formatted
Dennis Fisher wrote:
Colleagues,
Using R2.7.0 in OS X, I am having trouble understanding the command
textConnection. My situation is as follows:
1. I am trying to read a lengthy file (45000 lines) that has headers
~ every 1000 lines. read.table (or its variants) fail because of the
Try one of these:
Lines - readLines(myfile.dat)
Lines - Lines[-grep(whatever, Lines)]
DF - read.table(textConnection(Lines), ...other.args...)
or
# use findstr /v instead of grep -v if you are on Windows
DF - read.table(pipe(grep -v whatever myfile.dat), ...other.args...)
On Sun, Oct 12,
On 10/11/2008 3:31 PM, Ted Harding wrote:
Hi Folks,
I'm comparing some output from R with output from SPSS.
The coefficients of the independent variables (which are
all factors, each at 2 levels) are identical.
However, R's Intercept (using default contr.treatment)
differs from SPSS's
On Oct 10, 2008, at 6:32 PM, Verschuere Benjamin wrote:
Hi,
I was wondering if there is a function in R which performs
bivariate non parametric smoothing
which allows for the possibility of including some weights in the
smoothing (for each data points
in my grid I have some predefined
Looks like the contrast matrix for indicator is contr.SAS(n),
for deviation is contr.sum(n) and for simple is:
(diag(n) - 1/n)[, -1]
That works at least for the n = 3 example in the link.
Perhaps the others could be checked against SPSS
for a variety of values of n to be sure.
On Sun, Oct 12,
The formula should be (diag(n) - 1/n)[, -n]
On Sun, Oct 12, 2008 at 1:36 PM, Gabor Grothendieck
[EMAIL PROTECTED] wrote:
Looks like the contrast matrix for indicator is contr.SAS(n),
for deviation is contr.sum(n) and for simple is:
(diag(n) - 1/n)[, -1]
That works at least for the n = 3
I found this link:
http://webs.edinboro.edu/EDocs/SPSS/SPSS%20Regression%20Models%2013.0.pdf
which indicates that the contrast in SPSS that is used
depends not only on the contrast selected but also on the
reference category selected and the two can be chosen
independently. Thus one could have
On Sun, Oct 12, 2008 at 12:23 PM, Liviu Andronic [EMAIL PROTECTED] wrote:
Please check the documentation of RcmdrPlugin.Export [1]; it contains
several suggestions on using LyX, a cross-platform LaTeX GUI, together
with Sweave.
I've just stumbled on another LyX Sweave-related link, this time
Very many thanks, Chuck and Gabor, for the comments and the
references to on-line explanations. It is beginning to become
clear!
Most grateful.
Ted.
On 12-Oct-08 18:03:53, Gabor Grothendieck wrote:
I found this link:
http://webs.edinboro.edu/EDocs/SPSS/SPSS%20Regression%20Models%2013.0.pd
f
A safer way is:
for (i in seq_along(VarNames)){
What happens when VarNames is length zero:
x - NULL
1:length(x)
[1] 1 0
seq_along(x)
integer(0)
On Sun, Oct 12, 2008 at 11:00 AM, Ted Harding
[EMAIL PROTECTED] wrote:
Following up on Barry's suggestion led on to a more straightforward
Liviu Andronic wrote:
I risk to fall far from answering your question, but this may be of interest.
On Sun, Oct 12, 2008 at 10:53 PM, cls59 [EMAIL PROTECTED] wrote:
Basically, I would like to start with just a plain vanilla R session running
inside a Qt widget. Any suggestions?
From the old
cls59 wrote:
On a related note... does anyone know good resources for binding a C++
program to the R library?
I am thinking of writing an R GUI in Qt. I use a Mac and have looked at the
Coca GUI source which binds Objective C to R. However, there is a lot of
extra stuff going on- tab
I have thought about wxWidgets, and I will definitely check that manual out.
My interest in Qt stems from heavy use of GIS and Fortran in my field of
study. As an Environmental Engineering student, I routinely solve simulation
and optimization problems which take as their input spatially
Am 12.10.2008 um 01:39 schrieb Felipe Carrillo:
Does LATEX have to be installed on your computer?
Not necessarily, but you'd have to have a graphic imagination to get an
idea of how your document will look printed on paper. The general idea
is that you don't have to (separation of content
Hi Miltinho,
There is a brief review on issues about and a new method for modelling
presence-only data in DOI 10.1007/s10531-007-9270-7. Hope it is useful.
Cheers,
Jin
Jin Li, PhD
Spatial Modeller/
Computational Statistician
Marine Coastal
Hi Folks,
Quick question. I have the following line in an R code file
which runs fine on Linux:
if(PNG) png(GraphName,width=12,height=15,units=cm,res=200)
I learn that, when the same code was run on a Windows machine,
there was the following error:
Error in
Seem to work fine on my R 2.7.2 version of Windows:
png(file=myplot.png, bg=transparent, units='cm', width=12,height=15,
res=200)
plot(1:10)
rect(1, 5, 3, 7, col=white)
dev.off()
Did you check the version they are using.
On Sun, Oct 12, 2008 at 6:02 PM, Ted Harding
[EMAIL PROTECTED]
Hello Felipe,
On Mon, Oct 13, 2008 at 12:55 AM, Felipe Carrillo
[EMAIL PROTECTED] wrote:
Liviu: I installed RcmdrPlugin.Export but couldn't figure out how to make it
work. What do I need to do with the Export objects using xtable command? Do
I need to have pdflatex in order to create pdf'f
Prof Brian Ripley wrote:
I believe lrm has a criterion appropriate to single-precision
calculations (as S-PLUS used to use). Try reducing 'tol' from its
default of 1e-7.
But your design matrix *is* near singular
kappa(cbind(1,x))
[1] 557390.5
so try centring/scaling your variables.
Attention conservation notice: a digression on Fisher's iris data, related
only tangentially to R.
The package announcement for hwriter points to a webpage created with the
package, http://www.ebi.ac.uk/~gpau/hwriter/
based on the Fisher/Anderson iris data, including pictures.
Ricardo,
I forgot to mention to you the web site: www.rpad.org. You can view that site
to see how well Rpad will look using your configuration. I only have Windows
and I recall that under Firefox my page didn't work quite as well as it did
with IE, but I don't know if that was my limited
Two follow-up questions:
A) I get an error message when using Harrell's describe() function on
one of my variable, telling me that sum() is not meaningful for a
difftime object. Why should sum() not be meaningful for a collection
of interval lengths?
describe(pref900)
Error in
On 12 October 2008 at 12:53, cls59 wrote:
| On a related note... does anyone know good resources for binding a C++
| program to the R library?
RCpp, at http://rcpp.r-forge.r-project.org, formerly known as RCppTemplate,
is pretty mature and testing having been around since 2004 or 2005.
I think the problem is that difftime objects have a units attribute so
when converting to plain numbers you need to supply a unit
with respect to which it is to be converted:
d - Sys.Date() + 1:10
dd - diff(d)
sum(as.double(dd, units = days))
On Sun, Oct 12, 2008 at 7:46 PM, David Winsemius
Have you considered using glm() with family = quasipoisson or
family = quasibinomial ? I know from experience that the quasipoisson
choice reports an index of dispersion.
?family
--
David Winsemius
On Oct 12, 2008, at 4:55 AM, Fucikova, Eva wrote:
Dear All,
I am working with linear
Hi everyone-
I have a dataset that I created using the aggregate command:
Hour LevelC2
1 1 1 -3.517117e+00
2 2 1 -2.536083e+00
3 3 1 -1.429000e+00
4 4 1 -1.148667e-01
5 5 1 1.345333e+00
6 6 1
Dear Sherri,
If your data set is called mydata, you can separate it by Levels with
something like
# Separating the data by Level -- new.data is a list
new.data=split(mydata,mydata[,2])
new.data
# or
level1 = mydata[mydata$Level==1,]
level2 = mydata[mydata$Level==2,]
Now, if you want to plot
Thanks for your response, Dieter.
I realize these limitations. However, I know that my actual dataset is
reasonably well behaved in the range I want to predict, and I'm not using
the predicted values for any further analysis, only for schematic purposes
in the plot.
I'm still curious if this
Hi
Hi I am working on credit scoring model using logistic regression. I havd main
sample of 42500 clentes and based on their status as regards to defaulted / non
- defaulted, I have genereted the probability of default.
I have a hold out sample of 5000 clients. I have calculated (1) No of
i have tried the code.
The first function (which computes the Oja median) has a slight problem:
If you try four points that create a square centred at (2,2)
oja.median(cbind(c(1,3,1,3),c(1,1,3,3)))
gives (-2,-2) instead of (2,2). Probably just a sign switch somewhere.
The second function
locfit can extrapolate:
library(locfit)
X - seq(min(time(Nile)), max(time(Nile))+50)
plot(range(X), range(Nile), type = n)
lines(Nile)
fit - locfit(Nile ~ time(Nile))
lines(X, predict(fit, new = X), col = red)
On Fri, Oct 10, 2008 at 4:42 PM, Alex Karner [EMAIL PROTECTED] wrote:
Hi R
64 matches
Mail list logo