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"
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.
reg1<-glm(pyea~male+edu+married+inc+relig+factor(
Dear R Gurus:
What is the difference between a Primitive and a Generic, please?
Thanks,
Edna Bell
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.
If your data.frame after importing that csv file is DF, then this will
return a list of variables with the row numbers that have missing
values for each variables:
sapply(DF, function(x) which(is.na(x)))
But the overall tenor of you question suggests that you may need to
back up a step and
thank you very much!
I definitely need more theoretical background ...
but for now;
what does that mean for this dataset?
x1 should be the intermediate variable of x2 and y1
(x2 -> x1 -> y1)
Can I test that with this kind of analysis?
or do I see know that this kind of "intermediate variabl
Martin,
hi,
I have following data and code;
cov <-
c
(1.670028
,-1.197685
,-2.931445,-1.197685,1.765646,3.883839,-2.931445,3.883839,12.050816)
cov.matrix <- matrix(cov, 3, 3, dimnames=list(c("y1","x1","x2"),
c("y1","x1","x2")))
path.model <- specify.model()
x1 -> y1, x1-y1
x2 <-> x1,
At 4:16 AM +0100 3/9/09, Martin Batholdy wrote:
hi,
this is my first time I use the sem package in R.
I made a simple path analysis.
Now I was wondering how to get the standardized solution.
How can I get the standardized estimates of the path coefficients?
?std.coef
__
hi,
I have following data and code;
cov <-
c
(1.670028
,-1.197685
,-2.931445,-1.197685,1.765646,3.883839,-2.931445,3.883839,12.050816)
cov.matrix <- matrix(cov, 3, 3, dimnames=list(c("y1","x1","x2"),
c("y1","x1","x2")))
path.model <- specify.model()
x1 -> y1,x1-y1
x2 <->
Dear All,
I have a csv file which has total 510 records and 15 variables.
I am trying to write a code which will return me for each record which
variable is missing.
For e.g.
If for record 1, variables 8 & 9 are missing, the R code should return me
that.
In similar way I need to find the missing v
hi,
this is my first time I use the sem package in R.
I made a simple path analysis.
Now I was wondering how to get the standardized solution.
How can I get the standardized estimates of the path coefficients?
__
R-help@r-project.org mailing list
ht
>> I question 1) the usefulness of the effort necessary to get the data ;
>> and 2) the very concept of data mining, which seems to be the rationale
>> for this proposed effort.
>>
>> Furthermore (but this is seriously off-topic), I seriously despise the
>> very idea of "popularity" in scientific d
Oliver,
Go and find the file named 'Rconsole' under ~/etc folder, then you can
change whatever you want, the font size, color etc. The settings will be
your default.
For your second question, you need to set it up in Rprofile.site. Refer to
the Rprofile help.
Jun
On Sun, Mar 8, 2009 at 11:20 AM
Perfect - many thanks!!!
baptiste auguie-2 wrote:
>
> The function expects a list of data.frames as a first argument but you
> provided a data.frame instead, the others are interpreted as optional
> arguments to merge_recurse(). Try this instead,
>
>> merge_recurse(list(DF1,DF2,DF3,DF4))
>
The function expects a list of data.frames as a first argument but you
provided a data.frame instead, the others are interpreted as optional
arguments to merge_recurse(). Try this instead,
merge_recurse(list(DF1,DF2,DF3,DF4))
var1x yt u d ef o
1a 1
One can "just include it in the regression", but the potential problems
for interpretation are surely greater than those indicated. Inclusion
of
X1 = T1+E1 may cause X2 to appear significant when in fact it is having
no effect at all. Or the true effect can be reversed in sign. This
happens
I tried using merge_all as shown below but I am getting an error ... can
anyone tell me what I am doing wrong? The result table below is what I am
looking for.
DF1 <- data.frame(var1 = letters[1:5], x = rnorm(5), y =2)
DF2 <- data.frame(var1 = letters[1:5], t = rnorm(5), u =2)
DF3 <- data.frame(
2009/3/8 Emmanuel Charpentier :
> I question 1) the usefulness of the effort necessary to get the data ;
> and 2) the very concept of data mining, which seems to be the rationale
> for this proposed effort.
>
> Furthermore (but this is seriously off-topic), I seriously despise the
> very idea of "
On 8 March 2009 at 23:45, Emmanuel Charpentier wrote:
| Le dimanche 08 mars 2009 13:22 -0500, Dirk Eddelbuettel a crit :
| > Once you have data, you have an option of using or discarding it. But if you
| > have no data, you have no option. How is that better?
|
| I question 1) the usefulness
Le dimanche 08 mars 2009 à 13:22 -0500, Dirk Eddelbuettel a écrit :
> On 8 March 2009 at 13:27, Duncan Murdoch wrote:
> | But we don't even have that data, since CRAN is distributed across lots
> | of mirrors.
>
> On 8 March 2009 at 19:01, Emmanuel Charpentier wrote:
> | As far as I can see (but
On 08-Mar-09 20:06:21, Rolf Turner wrote:
> On 9/03/2009, at 4:14 AM, Duncan Murdoch wrote:
>
>> ... analyzing bad data will just give bad conclusions.
>
> Fortune?
>
> cheers,
>
> Rolf Turner
Maybe ... ! (I have sometimes got very good answers from bad data,
precisely by a
On 9/03/2009, at 10:23 AM, John Fox wrote:
Dear Rolf,
Tukey put it nicely: "The combination of some data and an aching
desire for
an answer does not ensure that a reasonable answer can be extracted
from a
given body of data." Inasmuch as there are no current fortunes from
Tukey, I
nomin
Dear Rolf,
Tukey put it nicely: "The combination of some data and an aching desire for
an answer does not ensure that a reasonable answer can be extracted from a
given body of data." Inasmuch as there are no current fortunes from Tukey, I
nominate this one.
Regards,
John
> -Original Message
On 7/03/2009, at 2:59 AM, Ricardo Perrone wrote:
Hi,
i am using spatstat package for spatial data analysis and now i
have a problem to create a point pattern. The points are in file
"points.txt" (first column for Latitude and second column for
Longitude ) and I imported them and separat
Daniel, thank you very much for this posting!I felt similar "inspiration" as
you called it, to giving eclipse a try, but felt like giving it some more
time to sink before taking the plunge.
I am vary happy for your detailed document you published, for when I will
take my own leap into the system.
Rolf Turner wrote:
>
> On 9/03/2009, at 4:14 AM, Duncan Murdoch wrote:
>
>> ... analyzing bad data will just give bad conclusions.
>
> Fortune?
>
looking for fortunes? got one for you:
"A key reason that R is a good thing is because it is a language"
who/where is left as an (easy) exercise.
Thanks for posting this. I've never used Eclipse before but this
document inspired me to give it a try. Unfortunately, it's a little
out of date, but I think that I finally got it to work. In case
anyone else would like to try this, I put a PDF of my notes online at:
http://www.gofsharp.com/R/S
Hi,
Try this:
DF1 <- data.frame(var1 = letters[1:5], x = rnorm(5), y =2)
DF2 <- data.frame(var1 = letters[3:7], x = rnorm(5), y=3)
DF3 <- data.frame(var1 = letters[6:10], x = rnorm(5), y=0)
# ... DF10 if you wish
( result <- merge_all(list(DF1, DF2, DF3) ))
save( result, file ="merged.rda")
Hi R users,
Can anyone share some example code using merge_all (from the reshape
package) to merge 10 data frames into 1 file.
Thanks in advance for any help!
--
View this message in context:
http://www.nabble.com/Merge-10-data-frames-with-3-id-columns-that-are-common-to-all-data-frames-tp2240
On 9/03/2009, at 8:42 AM, BowlesMcCann wrote:
Suppose a house is cleaned by three people in succession. The time
it takes
each cleaner in hours is an Exp(0.5). Assume that the time required
for each
cleaner is independent. How would I use simulation in R to estimate
the
probability that
On 8/03/2009, at 3:54 AM, David Freedman wrote:
Hi - I'd like to construct and plot the percents by year in a small
data set
(d) that has values between 1988 and 2007. I'd like to have a
breakpoint
(buy no discontinuity) at 1996. Is there a better way to do this
than in
the code below
On 9/03/2009, at 4:14 AM, Duncan Murdoch wrote:
... analyzing bad data will just give bad conclusions.
Fortune?
cheers,
Rolf Turner
##
Attention:\ This e-mail message is privileged and confid...{{dr
Suppose a house is cleaned by three people in succession. The time it takes
each cleaner in hours is an Exp(0.5). Assume that the time required for each
cleaner is independent. How would I use simulation in R to estimate the
probability that it takes longer than a total of 5 hours for the house t
Dirk Eddelbuettel wrote:
On 8 March 2009 at 13:27, Duncan Murdoch wrote:
| But we don't even have that data, since CRAN is distributed across lots
| of mirrors.
On 8 March 2009 at 19:01, Emmanuel Charpentier wrote:
| As far as I can see (but I might be nearsighted), I see no model linking
| pa
1Rnwb wrote:
since the estimation is not done pairwise so i cannot use pairwise.t.test,
how do i apply tukeyHSD
Note correct capitalization: TukeyHSD and follow the examples on the
help page:
?TukeyHSD
You may also contact a statistics textbook. In addition I send you some
links off list.
since the estimation is not done pairwise so i cannot use pairwise.t.test,
how do i apply tukeyHSD
Thomas Petzoldt-4 wrote:
>
> 1Rnwb schrieb:
>> Thanks for the help, but ANOVA will give me a single pvalue, then how i
>> can
>> make sure which group is showing the significant differences.
>
> H
If you prefer to do it with base functions, you could start by
thinking about one column at a time, for which the tapply function is
a logical choice:
> tapply(d[,"A"], e, sum)
r s
3 6
Then wrap that in an apply call that handles each column sequentially:
> apply(d, 2, function (x) tapply(x,
I think R and survival took a look at what you provided for a formula
to survreg and rejected it because it had no lh-rh separator, "~", and
thus no rh terms. Turns out that it also expects a dataframe even if
both terms for the Surv function are already given and there is
nothing further t
1Rnwb schrieb:
Thanks for the help, but ANOVA will give me a single pvalue, then how i can
make sure which group is showing the significant differences.
Hi,
ANOVA is fine and please have a look on ?TukeyHSD and don't forget to
consult your statistics textbook about post-hoc testing. If you in
On 8 March 2009 at 13:27, Duncan Murdoch wrote:
| But we don't even have that data, since CRAN is distributed across lots
| of mirrors.
On 8 March 2009 at 19:01, Emmanuel Charpentier wrote:
| As far as I can see (but I might be nearsighted), I see no model linking
| package download to package u
On 08-Mar-09 17:44:18, Douglas Bates wrote:
> On Sun, Mar 8, 2009 at 7:08 AM, Michael Dewey
> wrote:
>> At 08:47 05/03/2009, herrdittm...@yahoo.co.uk wrote:
>>> Dear useRs,
>>> With the rise of netbooks and 'lifestyle laptops" I am tempted
>>> to get one of these to mainly run R on it. Processor p
David1234 wrote:
Hi everyone,
Im quite new to R an I have the following Question:
I would like to define Variables which I can add and multiply etc. and that
R can simplyfy the terms.
The variables should stand for integers.
For example I would like to have an entry in an array with variab
Robert Biddle schrieb:
Hi:
I am looking for "style guides" for larger R programs,
and would like suggestions of web pages or documents to look at.
I am particularly interested in guidelines for how to structure programs,
and such issues as managing scope, passing data around, data hiding,
and s
Dear Barry,
As far as I understand, you're telling us that having a bit of data
mining does not harm whatever the data. Your example of pop music charts
might support your point (although my ears disagree ...) but I think it
is bad policy to indulge in white-noise analysis without a well-reasoned
Hey all,
I am trying to use the survreg function in R to estimate the mean and
standard deviation to come up with the MLE of alpha and lambda for the
weibull distribution. I am doing the following:
times<-c(10,13,18,19,23,30,36,38,54,56,59,75,93,97,104,107,107,107)
censor<-c(1,0,0,1,0,1,1,0,0,0,1
Thanks for the help, but ANOVA will give me a single pvalue, then how i can
make sure which group is showing the significant differences.
Tal Galili wrote:
>
> Hello friend.
>
> I believe anova might be a better solution for you.
> You might have a look here:
> http://www.personality-project.or
On Sun, Mar 8, 2009 at 7:08 AM, Michael Dewey wrote:
> At 08:47 05/03/2009, herrdittm...@yahoo.co.uk wrote:
>>
>> Dear useRs,
>>
>> With the rise of netbooks and 'lifestyle laptops" I am tempted to get one
>> of these to mainly run R on it. Processor power and hard disk space seem to
>> be ok. Wha
On 08/03/2009 12:08 PM, Barry Rowlingson wrote:
I think the situation is worse than messy. If a client comes in with data
that doesn't address the question they're interested in, I think they are
better served to be told that, than to be given an answer that is not
actually valid. They should a
Hi,
You could use the reshape package:
d$e <- e
recast(d, variable~e, fun=sum)
The doBy package is another option.
baptiste
On 8 Mar 2009, at 17:14, soeren.vo...@eawag.ch wrote:
A dataframe holds 3 vars, each checked true or false (1, 0). Another
var holds the grouping, r and s:
### s
A dataframe holds 3 vars, each checked true or false (1, 0). Another
var holds the grouping, r and s:
### start:example
set.seed(20)
d <- data.frame(sample(c(0, 1), 20, replace=T), sample(c(0, 1), 20,
replace=T), sample(c(0, 1), 20, replace=T))
names(d) <- c("A", "B", "C")
e <- rep(c("r", "s
Hi,
Try:
polygon(c(x1, rev(x2)), c(y1, rev(y2)), col="grey")
In general you might need to make sure the data is well ordered.
Hope this helps,
baptiste
On 8 Mar 2009, at 16:52, Martin Batholdy wrote:
hi,
the code below produces me two curved lines.
Now I want to fill the space betwe
hi,
the code below produces me two curved lines.
Now I want to fill the space between these curves with a color and I
don't have any idea how to do that with R.
I tried it with the polygon() function but it didn't worked out.
Can someone her give me a hint on that?
thanks!
x1 <- c(0.
Is this another discussion of what data might be collected and
analyzed, and what could and could not be said if we only had such data?
Has anyone but me produced any actual data? If so, I missed it.
Hadly mentioned the 'fortunes' package. My earlier methodology,
"RSiteSearch('lib
Hi Ted,
Coming to think about your direction - another idea came to mind:
The next time a major release is made (there is one scheduled quite soon
actually), the core team could add a "survey" on the downloading page of the
R base package asking for just one question
"please click here if this is
hi, all
I have two questions on using R console effectively (this is on Mac,
not sure if it applies to win platform):
First, I'd like to make the console font bigger, the default is too
small for my screen. There is a "Show Fonts" from Format menu where
you can adjust it, but it seems only for cu
On 08-Mar-09 15:14:03, Duncan Murdoch wrote:
> On 08/03/2009 10:49 AM, hadley wickham wrote:
>>> More seriously : I don't think relative numbers of package downloads
>>> can be interpreted in any reasonable way, because reasons for
>>> package download have a very wide range from curiosity ("what's
> I think the situation is worse than messy. If a client comes in with data
> that doesn't address the question they're interested in, I think they are
> better served to be told that, than to be given an answer that is not
> actually valid. They should also be told how to design a study that
> a
This works fine.
Thank you for the quick response,
Jim
David Winsemius wrote:
>
> ?quit # ,save="no"
>
> --
> DW
>
> On Mar 8, 2009, at 11:19 AM, Jim_S wrote:
>
>>
>> Dear R-user,
>>
>> I'm running a certain R script in DOS batch mode. Is there a way to
>> prevent
>> R from saving the
This works fine.
Thank you for the quick response,
Jim
David Winsemius wrote:
>
> ?quit # ,save="no"
>
> --
> DW
>
> On Mar 8, 2009, at 11:19 AM, Jim_S wrote:
>
>>
>> Dear R-user,
>>
>> I'm running a certain R script in DOS batch mode. Is there a way to
>> prevent
>> R from saving the
Hi:
I am looking for "style guides" for larger R programs,
and would like suggestions of web pages or documents to look at.
I am particularly interested in guidelines for how to structure programs,
and such issues as managing scope, passing data around, data hiding,
and so forth.
I do have some
?quit # ,save="no"
--
DW
On Mar 8, 2009, at 11:19 AM, Jim_S wrote:
Dear R-user,
I'm running a certain R script in DOS batch mode. Is there a way to
prevent
R from saving the workspace once this script is finished? I'm asking
this
because the resulting .RData file has the size of >70
http://stat.ethz.ch/R-manual/R-patched/library/utils/html/BATCH.html
HTH, Jim
Nash-16 wrote:
>
>
> Dear all,
>
> Have a complete document about the Batch Execution of R
>
> or nice website?
>
>
> --
> Nash - morri...@ibms.sinica.edu.tw
>
> _
Hi,
I have been using this site (
http://www.stat.pitt.edu/stoffer/tsa2/Rissues.htm) to help me with some
ARIMA modelling in R.
Unfortunately the methods mentioned do not appear to work with second order
differencing; arima(*, 2, *).
I have used some dummy data to illustrate my point.
When I us
Dear R-user,
I'm running a certain R script in DOS batch mode. Is there a way to prevent
R from saving the workspace once this script is finished? I'm asking this
because the resulting .RData file has the size of >70MB. I don't need this
file since my script already writes the required output and
Dear all,
Have a complete document about the Batch Execution of R
or nice website?
--
Nash - morri...@ibms.sinica.edu.tw
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www
On 08/03/2009 10:49 AM, hadley wickham wrote:
More seriously : I don't think relative numbers of package downloads can
be interpreted in any reasonable way, because reasons for package
download have a very wide range from curiosity ("what's this ?"), fun
(think "fortunes"...), to vital need tthin
Dear Agustin & the Listers,
Noncentred PCA is an old and establishes method. It is rarely used,
but still (methinks) it is used more often than it should be used.
There is nothing wrong in having noncentred PCA in R, and it is a real
PCA. Details will follow.
On 08/03/2009, at 11:07 AM, A
On Sun, Mar 8, 2009 at 10:49 AM, hadley wickham wrote:
>> More seriously : I don't think relative numbers of package downloads can
>> be interpreted in any reasonable way, because reasons for package
>> download have a very wide range from curiosity ("what's this ?"), fun
>> (think "fortunes"...),
Hi Christian,
I would try and do the same with the "reshape" package using "cast" (after
turning one of the vars names into "value")
On Sun, Mar 8, 2009 at 4:25 PM, Christian Pilger
wrote:
>
> Dear R-experts,
>
> I have the following "long" data frame:
>
> ID <-
>
> c("ID001","ID001","I
> More seriously : I don't think relative numbers of package downloads can
> be interpreted in any reasonable way, because reasons for package
> download have a very wide range from curiosity ("what's this ?"), fun
> (think "fortunes"...), to vital need tthink lme4 if/when a consensus on
> denomina
Hi all,
i have a SpatialPixelsDataFrame object, which is a result of kriging in R.
What i would like to do is to convert this object to image (geoTiff) so that
i could use it in Gis application. I have tried using this image2Grid
function but it doesen't work. Here is the code :
im<-image(pCir)
Dear R-experts,
I have the following "long" data frame:
ID <-
c("ID001","ID001","ID001","ID001","ID001","ID001","ID001","ID001","ID001","ID001","ID001","ID002","ID002","ID002","ID002","ID002","ID002","ID002")
Var <-
c("Var001","Var001","Var001","Var001","Var001","Var002","Var002","Var
Thanks for all the answers, they were really helpful. I noticed the
inflation of the variance, and that seems to be the problem indeed (thank
you, Thomas). When looking at the tables again (thank you Ted), I noticed
that this is actually a classical case of (quasi-)complete separation. Hence
the in
Hi Agus,
>> But the rotation made with the eigenvectors of prcomp(X,center=F) yields
>> axes that are correlated. Therefore, prcomp(X,center=F) is not really a
>> PCA.
cor() is not an appropriate test of whether two vectors are orthogonal. The
definition that two vectors (in an inner product sp
Google for RPy2 and RSpython.
On Sun, Mar 8, 2009 at 8:38 AM, wrote:
> Dear R users,
>
> Is it possible to run a R script under a python script ?
> And if yes ... how to do that ?
>
> Thanks a lot,
>
> Arnaud
>
> [[alternative HTML version deleted]]
>
> ___
Dear R users,
Is it possible to run a R script under a python script ?
And if yes ... how to do that ?
Thanks a lot,
Arnaud
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
Dear list,
I'd like to ask for some advice in creating a wrapper function for
this C code,
http://www.fourmilab.ch/documents/specrend/
http://www.fourmilab.ch/documents/specrend/specrend.c
I could probably port it in R, but I've been hoping to use compiled
code for a while and this looks
At 08:47 05/03/2009, herrdittm...@yahoo.co.uk wrote:
Dear useRs,
With the rise of netbooks and 'lifestyle laptops" I am tempted to
get one of these to mainly run R on it. Processor power and hard
disk space seem to be ok. What I wonder is the handling and feel
with respect to R.
Has anyone
I do not understand, from a PCA point of view, the option center=F
of prcomp()
According to the help page, the calculation in prcomp() "is done by a
singular value decomposition of the (centered and possibly scaled) data
matrix, not by using eigen on the covariance matrix" (as it's done by
p
On Sat, 07 Mar 2009 18:04:24 -0500, David Winsemius wrote :
[ Snip ... ]
> Nonetheless, I do think the relative numbers of package downloads might
> be interpretable, or at the very least, the basis for discussions over
> beer.
*Anything* might be the basis for discussions over beer (obvious
cor
Steven Lubitz yahoo.com> writes:
> Thank you - this is very helpful. However I realized that with my real data
sets (not the example I have here),
> I also have different numbers of columns in each data frame. rbind doesn't
seem to like this. Here's a
> modified example:
>
> x <- data.frame(item
AR gmail.com> writes:
> I want to control the plots in the output of the xyplot(). It is
> easier to explain it through an example:
>
.. modified example see below
>
> The output of the xyplot() is sorted by the alphabetical order of
> months (First Apr, then Aug so on). I need to output such t
Hi Anand,
>> The output of the xyplot() is sorted by the alphabetical order of
>> months (First Apr, then Aug so on). I need to output such that the
>> order of the months is maintained, i.e. plot of Jan first, then Feb, Mar
>> ... so on.
Because the levels of your factor are sorted this way:
Hi list,
has anyone succeeded in using pgmm() on any dataset besides
Arellano/Bond's EmplUK, as shown in the vignette?
Whatever I try, I eventually get a runtime error because of a singular
matrix at various points in pgmm.diff() (which gets called by pgmm()).
For example, when estimating a "dyna
Ravi Varadhan jhmi.edu> writes:
> Try the package "Rdonlp2", which can handle general, nonlinear, equality and
inequality constraints for
> smooth optimization problems.
But be aware of the licencing.
Dieter
__
R-help@r-project.org mailing list
htt
Hi,
I want to control the plots in the output of the xyplot(). It is
easier to explain it through an example:
#-
library(lattice);
# months
months <- c("Jan", "Feb", "Mar",
"Apr", "May", "Jun",
"Jul", "Aug", "Sep",
85 matches
Mail list logo