On Jul 10, 2012, at 05:35 , Joseph Clark wrote:
>
> Thanks. I was able to get what I wanted by doing this:
>
>
>
> predxn <- function(s,d) { coef(m3)[1] + coef(m3)[2]*s + coef(m3)[3]*s^2 +
> coef(m3)[4]*d + coef(m3)[5]*d^2 }
>
>
> But it's not very elegant...
>
You didn't take Michael's
Hi Manish,
See ?arrows, e.g.,
DF <- structure(list(names = structure(c(5L, 2L, 1L, 3L, 4L), .Label =
c("cabbage",
"potato", "sukuma-wiki", "terere", "tomato"), class = "factor"),
freq = c(7, 4, 5, 8, 20)), .Names = c("names", "freq"), row.names =
c(NA,
-5L), class = "data.frame")
barplot(as.m
Hi all, I'm new with R, recently I began to use the package
"arulesSequences" but the algorithm cspade give me this error:
Error en makebin(data, file) : 'sid' invalid
when I did executed this script,
x = read_baskets("transactions.basket",sep=",",info=c( "eventID",
"sequenceID","SIZE"))
s <-
Hi,
I am working on stacked bar plot and want to add marker(arrow) in stacked
bar plot.
DF=data.frame(names=c("tomato", "potato", "cabbage", "sukuma-wiki",
"terere"), freq=c(7,4,5,8,20))
barplot(as.matrix(DF[,2]), col=heat.colors(length(DF[,2])), legend=DF[,1],
xlim=c(0,9), width=2)
http://r
Hi Peter,
Thanks for testing it and notifying. I didn't test it to other situtations.
Probably this should give similar results as Rui's
#Test 1:
x<-c(1,2,3,3,3,4,4,5)
func1<-function(x) !is.na(match(x,x[duplicated(x)]))
func1(x)
#[1] FALSE FALSE TRUE TRUE TRUE TRUE TRUE FALSE
x[!func1(x)
Dear R users
Say I wanted to read a vector into R as multi-dimensional array by row,
e.g.
a<-c(1:20)
> b<-array(a,dim=c(2,5,2))
> b
, , 1
[,1] [,2] [,3] [,4] [,5]
[1,]13579
[2,]2468 10
, , 2
[,1] [,2] [,3] [,4] [,5]
[1,] 11 13 15 17 1
I am calling quantiles as follows. I don't understand why sometimes the
columns (data values) above 95% are returned as "NULL"!! When I drop the
percentile down to 92%, I see colums appearing. Why would any quantile be
empty? I see sometimes that 95% percentile is being chosen as "1" for my
data be
Thanks, that worked!
--
View this message in context:
http://r.789695.n4.nabble.com/how-to-make-plot-lines-thicker-tp4635875p4635929.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https://stat.ethz.ch
Dear John,
Thank you very much for your help - I really appreciate it. Sorry the
questions was obviously rather basic, I did consult the ?linearHypothesis
file but haven't worked with matchCoefs() before so didn't quite see how I
could use it. Anyway, many thanks and much appreciated,
Alex
--
V
Hello everyone,
I am working with plm package and I have problem with random and within
models, which are giving errors which says "empty model". However, the model
is not empty. In the source code for plm.fit, where the error originates it
says something like (writing from the top of my head...)
Hi Jessica,
thank you for your prompt response. Yes I had deduced it had to do with the
Hessian.
However, I am not clear what "all columns having range the order of one"
actually means and what this means for my data. Does this mean removing
decimals (ie by shifting the decimal place)?
I would h
Thanks. I was able to get what I wanted by doing this:
predxn <- function(s,d) { coef(m3)[1] + coef(m3)[2]*s + coef(m3)[3]*s^2 +
coef(m3)[4]*d + coef(m3)[5]*d^2 }
But it's not very elegant...
// joseph w. clark , phd candidate
\\ usc marshall school of business
Your problem is the sum() call -- it's not vectorized (in the regular sense) so
it breaks some of the internal assumptions of outer().
Easiest way is probably to do matrix multiplication (%*%) directly here
Michael
On Jul 9, 2012, at 10:19 PM, Joseph Clark wrote:
>
> Hi there, I'm trying to
Short answer: there is a default method used here which returns a matrix. It's
defined at the C-level for speed so you don't see it with methods()
Longer: cbind() isn't a regular S3 generic since it has no UseMethod(). Look at
WRE and R-Internals (internal generics) for more info.
Best (and go
## Hi, I'm having trouble understanding how the cbind function decides what
method to apply to its arguments. Easy cut and paste code below.
>
>
>
> ## create two columns
> c1 <- c("A","A","B","B")
> c2 <- 1:4
>
> ## cbind outputs a matrix with elements that are characters, seems
reasonable
Hi there, I'm trying to prep some data for a persp() surface plot
representing the predictions from a regression with two inddependent
variables. The regression model "m3" has an intercept, 2 linear terms,
and 2 squared terms. The coefficients are given by coef(m3).
My approach to generati
Jie Tang writes:
> hi R-users
>Now I have a figure in emf or png or tiff format that have been drawn
> by other tool and I want to insert this figure into
> my new figure by R script. I wonder if is possible ?
This [1] might be relevant.
[1] http://addictedtor.free.fr/graphiques/RGraphGal
hi R-users
Now I have a figure in emf or png or tiff format that have been drawn
by other tool and I want to insert this figure into
my new figure by R script. I wonder if is possible ?
--
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China
[[al
Hi Bert,
The version of Matrix that ships with base worked for me. The cran
version of Matrix was the problem. To get it working I reinstalled R and
did NOT update Matrix.
Thanks to the package developers for their quick help on this one.
Regards,
Dr Robert Musk
Senior Forest Biometrici
Hi Bert,
The version of Matrix that ships with base worked for me. The cran
version of Matrix was the problem. To get it working I reinstalled R and
did NOT update Matrix.
Regards,
Dr Robert Musk
Senior Forest Biometrician
Management Research
Forestry Tasmania
79 Melville St Hobart Austr
Dear Jordan,
Oddly, essentially the same question was posed by someone else three days ago.
Because groups enters the model additively, the proper test for each contrast
is just the t-test for the corresponding coefficient in the summary() for the
model.
I hope this helps,
John
That's perfect! Thanks for the help. For those in the future who may have a
similar question, here's how I did it:
nf <- layout(matrix(c(1,1,2,2,3,3,0,4,4,5,5,0), 2, 6, byrow=TRUE),
respect=FALSE)
for (i in 1:5){
x = rnorm(100)
y = .5*x + rnorm(100, 0, sqrt(1-.5^2))
plot(x,y)
}
On
Take a look at ?layout
Michael
On Jul 9, 2012, at 5:15 PM, Dustin Fife wrote:
> Let me start with an example:
>
> par(mfrow=c(2,3))
> for (i in 1:5){
>x = rnorm(100)
>y = .5*x + rnorm(100, 0, sqrt(1-.5^2))
>plot(x,y)
> }
>
> Note that there's five plots and six spaces for those pl
Let me start with an example:
par(mfrow=c(2,3))
for (i in 1:5){
x = rnorm(100)
y = .5*x + rnorm(100, 0, sqrt(1-.5^2))
plot(x,y)
}
Note that there's five plots and six spaces for those plots via mfrow,
leaving one row empty. Is there a way to have the bottom two plots
centered? I th
Let me start with an example:
par(mfrow=c(2,3))
for (i in 1:5){
x = rnorm(100)
y = .5*x + rnorm(100, 0, sqrt(1-.5^2))
plot(x,y)
}
Note that there's five plots and six spaces for those plots via mfrow,
leaving one row empty. Is there a way to have the bottom two plots
centered? I think
Be sure you reply or forward your message to me to the r-help listhost. I
might not have time to review it tonight, while others might.
Jeremy
On Mon, Jul 9, 2012 at 2:38 PM, JPF [via R] <
ml-node+s789695n4635888...@n4.nabble.com> wrote:
> Please, find an example with a data set here.
>
> The d
Here is some sample code. It generates a class (list_var) that is used in
rpart. list_val is the dependant variable.
The plot shows all the values of the class, which is a mess and makes the
plot unuseable. I'd like to either suppress the list entirely or replace it
with something like "Group 1
Hello,
Try this:
meanfevs<-c(3.5,4.25,6.5)
meanfevns<-c(4.7,3.23,7.6)
pfevs<-c(1.2,2.8,3.2)
pfevns<-c(4.2,3.2,8.2)
listret<-list(a=meanfevs,b=meanfevns,c=pfevs,d=pfevns)
listret
$a
[1] 3.50 4.25 6.50
$b
[1] 4.70 3.23 7.60
$c
[1] 1.2 2.8 3.2
$d
[1] 4.2 3.2 8.2
#To access the elements store
Hello,
Thanks for getting back to me. I was of the impression that once the res. var.
is larger than the df then the data was overdispersed and as such the model was
not a best fit. Is this true?
Here is an example of the output from R:
Call:
glm(formula = y ~ log(conc), family = binomial)
Devian
I'm wondering if anyone would be able to help me out. I'm trying to use a
type II ANOVA for a model with user-specified contrasts and covariates.
I have two treatment groups and a control group. I'm comparing average
treatment to controls and also between the two treatment groups, but I'm
also loo
hi all,
I have a binary data set and am now confronted with a "separation" issue. I
have two predictors, mood (neutral and sad) and game type (fair and
non-fair). By "separation", I mean that in the non-fair game, whereas 20%
(4/20) of sad-mood participants presented a positive response (coded as
hi all,
does anyone know if R can do exact logistic regression with correlated
binary data?
Thanks!!
Yue
--
View this message in context:
http://r.789695.n4.nabble.com/exact-logistic-regression-with-correlated-data-tp4635900.html
Sent from the R help mailing list archive at Nabble.com.
__
Maybe read the help for avPlots, especially the part about the ask argument:
ask If TRUE, ask the user before drawing the next plot; if FALSE don't ask.
Sarah
On Mon, Jul 9, 2012 at 5:16 PM, Michael wrote:
> Hi all,
>
> I am using "avPlots"... and it has the following:
>
> "Hit to see next
Laura Lee laura.lee at ncdenr.gov
Mon Jul 9 22:51:40 CEST 2012
Previous message: [R] Predicted values for zero-inflated Poisson
Next message: [R] Lavaan Package - How to Extract Residuals in Data Values
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Thanks for your
Hi all,
I am using "avPlots"... and it has the following:
"Hit to see next plot:"
But I just wanted to everything to be saved into a pdf file...
How to skip these Returns?
Thanks a lot!
[[alternative HTML version deleted]]
__
R-help@r-pro
Ouch!
Rui Barradas
Em 09-07-2012 21:39, peter dalgaard escreveu:
On Jul 9, 2012, at 21:26 , Rui Barradas wrote:
Hello,
So you want to split data.frame 'dat' by the values of the first column, named
'site', and return the other columns.
lapply(split(dat, dat[[ 1 ]]), function(x) x[-1])
Thanks for your reply. I do have a copy of "Zero Inflated Models and
Generalized Linear Mixed Models with R" and have been using that as a guide.
I applied the predict function (type="count") to the dataset for which I
built the model to compare the predicted bycatch numbers to the observed to
ensu
On Jul 9, 2012, at 21:26 , Rui Barradas wrote:
> Hello,
>
> So you want to split data.frame 'dat' by the values of the first column,
> named 'site', and return the other columns.
>
>
> lapply(split(dat, dat[[ 1 ]]), function(x) x[-1])
>
Got to be easier to split(dat[-1], dat[[1]]), no?
-pd
On Jul 9, 2012, at 21:08 , Lawrence, Adaku wrote:
> Hello,
> Thanks for getting back to me. I was of the impression that once the res.
> var. is larger than the df then the data was overdispersed and as such the
> model was not a best fit. Is this true?
Not without qualification. There are var
On Mon, Jul 09, 2012 at 07:52:18AM -0500, Jim Plante wrote:
> I don't know how significant this is, but WolframAlpha's value of pi
> disagrees with R's at about the 16th decimal:
>
> Wpi->3.141592653589793238462643383279502884197169399375105
> ..^
> Rpi->3.1415926535897931159
On 2012-07-09 11:07, arun wrote:
Hi,
Try this:
#Duplicated:
x<-c(1:3,3)
x==x[duplicated(x)]
#[1] FALSE FALSE TRUE TRUE
#Unique:
x[!x==x[duplicated(x)]]
#[1] 1 2
A.K.
Try the above approach with
x <- c(1,2,3,3,3,4,4,5)
I think Rui's solution is preferable.
Peter Ehlers
- O
With base graphics, you could use par(mfrow) or par(mfcol) to define a simple
layout.
I don't know anything about heatmap.2, but I have used image() to make heatmaps
and have laid them out with par(mfrow).
Two ways to get a 2 row by 3 column layout, for example:
par(mfrow = c(3,2)) # 3
Dear UseRs,
I'm making box plots from a data set that looks like this:
Chr Start End GeneDensity ReadCount_Explant ReadCount_Callus ReadCount_Regen
1 1 1 1 107.82 1.2431.047 1.496
2 1 10001 2 202.50 0.8350.869
Thanks Prof, I needed one more step on my system:
sudo locale-gen es_ES.UTF-8
Mikkel
From: Prof Brian Ripley
Cc: R Help
Sent: Monday, July 9, 2012 7:01 AM
Subject: Re: [R] axis.Date language
On 09/07/12 01:43, Mikkel Grum wrote:
> Dear useRs
>
> I need to d
I'm using R to create a heatmap from a matrix using heatmap.2 - and i want
to group these images into one big image - What i usually use to achieve
this is layout() - but this doesn't work, as heatmap.2 uses layout, and
apparently layout does not work recursively.
Does anyone have any suggestions
Hello,
So you want to split data.frame 'dat' by the values of the first column,
named 'site', and return the other columns.
lapply(split(dat, dat[[ 1 ]]), function(x) x[-1])
Hope this helps,
Rui Barradas
Em 09-07-2012 13:27, elpape escreveu:
Dear all
I'm trying to calculate the number o
Thanks Sarah.
I realized it as well and tried to run install.packages("plyr", lib = .Library)
as root. It works now.
Thanks again.
HXD
-Original Message-
From: Sarah Goslee [mailto:sarah.gos...@gmail.com]
Sent: Monday, July 09, 2012 12:06 PM
To: Hui Du
Cc: r-help@r-project.org
Subject
Hi,
On Mon, Jul 9, 2012 at 2:30 PM, Hui Du wrote:
>
> Hi All,
>
> I have two questions regarding install.packages().
>
> Q1: may I run it in non-interactive mode, which means just install the
> packages I want rather than letting me to choose which mirror etc?
Sure. If you read ?install.package
On Jul 9, 2012, at 20:23 , Lawrence, Adaku wrote:
> Hello,
>
> I am trying to determine LD50 and LD95 using dose.p in MASS however some of
> the Residual variance is larger than the degrees of freedom. Please can
> anyone help with any advice as to how i can correct for this?
Er, in what sens
These sorts of parameters are all documented under ?par, but it's a
bit of a beast to read. The one you are looking for is lwd=
To wit
layout(1:2)
plot(1:5, type = "l")
plot(1:5, type = "l", lwd = 3)
Best,
Michael
On Mon, Jul 9, 2012 at 12:11 PM, peziza wrote:
> I am trying to make the lines t
Lee, Laura wrote
>
> Hi all-
>
> I fit a zero-inflated Poisson model to model bycatch rates using an offset
> term for effort. I need to apply the fitted model to a datasets of varying
> levels of effort to predict the associated levels of bycatch. I am seeking
> assistance as to the correct way
I think the real problem is the first data line:
2 1 1 3 27 0 6 1.200.995
Notice the two periods in the value. The previous solution was
getting rid of all the periods. If you leave out this value, you get
339.5. if you change it to 1200.995, you get 34
Hi All,
I have two questions regarding install.packages().
Q1: may I run it in non-interactive mode, which means just install the packages
I want rather than letting me to choose which mirror etc?
Q2: I ran a R code in batch mode, for example, R CMD BATCH a.r
In a.r, I have some statements li
Hello,
There must be a difference in the file you are processing and in the one
excel and I are:
> fun <- function(x){
+ dat <- read.table(x, skip=14)
+ dat[ , 8] <- as.numeric(gsub("\\.", "", dat[, 8]))
+ mean(dat[, 8])
+ }
>
> sapply(list.files(pattern="XYZ.*\\.txt"), fun)
XYZ_34.txt
3452
?par and have a look at lwd
John Kane
Kingston ON Canada
> -Original Message-
> From: jenkere...@gmail.com
> Sent: Mon, 9 Jul 2012 10:11:32 -0700 (PDT)
> To: r-help@r-project.org
> Subject: [R] how to make plot lines thicker
>
> I am trying to make the lines thicker in a graph (for a pp
Hello,
I am trying to determine LD50 and LD95 using dose.p in MASS however some of the
Residual variance is larger than the degrees of freedom. Please can anyone help
with any advice as to how i can correct for this?
Here is the model as inputted into R
y<-cbind(dead,n-dead)
model<-glm(y~lo
?":::"
-- Bert
On Mon, Jul 9, 2012 at 10:45 AM, Niels2 wrote:
> Hallo Rob,
>
> have you figured out a solution to the error? I've got the same problem.
>
> regards
> N.
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/Matrix-package-loading-problem-Error-object-kronecker-i
Hi,
Try this:
#Duplicated:
x<-c(1:3,3)
x==x[duplicated(x)]
#[1] FALSE FALSE TRUE TRUE
#Unique:
x[!x==x[duplicated(x)]]
#[1] 1 2
A.K.
- Original Message -
From: Nico902
To: r-help@r-project.org
Cc:
Sent: Monday, July 9, 2012 12:42 PM
Subject: [R] unique vs duplicate problem
Hi
I'd suggest using lines() rather than points() to add lines to a plot.
The parameter to change line width is lwd rather than cex.
e.g.
lines(x, Sobs$Chao_1_Mean, col="Gray", lwd=2)
Reading ?par can be both an enlightening and confusing experience.
Sarah
On Mon, Jul 9, 2012 at 1:11 PM, peziza w
Hi community. I'm fairly new to R and have a basic question. When I try to
install RExcel with the code:
install.packages("RExcelInstaller", "rcom", "rsproxy")
I get the message below:
Warning in install.packages("RExcelInstaller", "rcom", "rsproxy") :
'lib = "rcom"' is not writable
Error in i
Hello,
Just now I checked reading directly from .txt file instead of the one showed in
my earlier reply,
#Use skip=3 instead of 4.
dat1<-read.table("dat1.txt",sep="",skip=3,fill=TRUE,header=TRUE)
dat1<-dat1[-1,]
row.names(dat1)<-1:nrow(dat1)
dat1
variable1 Variable2 Variable3 Variable4
1
If you look at the help for install.packages:
help(install.packages)
You will see that the first argument to install.packages takes a vector of
the package names. In your case, you are passing three arguments to the
function, so R is trying to install "RExcelInstaller" package into a library
dire
In addition to the helpful guidance suggested already, you might investigate
the sas7bdat package, by Matt Shotwell.
I described it here:
http://sas-and-r.blogspot.com/2011/07/really-useful-r-package-sas7bdat.html
Ken
--
View this message in context:
http://r.789695.n4.nabble.com/How-to-import-
Dear Peter,
Thank you very much for that excellent answer to a rather stupid question :)
I did not notice that the RSS actually increased for the model with more
parameters and so in this case the F-statistic is negative and therefore a
p-value from the F-distribution is meaningless. But I guess y
Hi,
I guess you should have "fill=TRUE" in the read.table.
dat1<-read.table(text="
First line: Skip this line
Second line: skip this line
Third line: skip this line
variable1 Variable2 Variable3 Variable4
Unit1 Unit2 Unit3
10 0.1 0.01
UCLA's Advanced Technical Services' Statistical Computing website often has
very good resources for comparing analyses between R, Stata, and SAS (
http://www.ats.ucla.edu/stat ). For accelerated failure time models, I
believe that it has some examples for Stata (
http://www.ats.ucla.edu/stat/stata/
Dear all
I'm trying to calculate the number of shared species between sites.
I have a dataframe with in the first column the names of the sites; the
names of the other columns are the species names. To use the shared function
from the package RICH one needs to input different matrices. So actuall
Dear Mr. Barradas,
your solution comes very close to what I want.
But I have two questions left:
First question: If "R" computes the mean for the reaction times of test
subject 34 (the example I provided above), it says "310112.0", but if I use
the "mean"-function in Excel it says "345.210". Ap
bbolker wrote
>
> PtitBleu yahoo.fr> writes:
>
>>
>> Hello,
>>
>> I'm trying to fit experimental data with a model and nls.
>> For some experiments, I have data with x from 0 to 1.2 and the fit is
>> quite
>> good.
>> But it can happen that I have data only the [0,0.8] range (see the
>> exam
Hallo Rob,
have you figured out a solution to the error? I've got the same problem.
regards
N.
--
View this message in context:
http://r.789695.n4.nabble.com/Matrix-package-loading-problem-Error-object-kronecker-is-not-exported-by-namespace-methods-tp4632861p4635878.html
Sent from the R help m
Dear all,
For my research I want to test additive interaction for a dichotomous
dependent variable. Can anyone help me to estimate this in R?
Wacholder describes this procedure in the American Journal of Epidemiology
in 1986 (Binomial regression in GLIM: estimating risk ratios and risk
differenc
I am trying to make the lines thicker in a graph (for a ppt presentation).
Here is what I currently have:
plot(x,y,type="l", ylab="Number of OTUs", xlab="Number of Samples
Collected", col="Black", pch=1, ylim=c(0,6000))
points(x, Sobs$Chao_1_Mean, type="l", col="Gray", pch=1) (this is one of th
Hello R Community,
I am using the Lavaan package in R 2.15.0 to analyze data collected from
1200 lakes across North America. My dataset includes 3 continuous
independent variables (LOG_NTL, LOG_PTL, and LOG_SR_A_D) and 1 continuous
dependent variable (BIOVOL) . I have successfully constructed struc
I don't know how significant this is, but WolframAlpha's value of pi disagrees
with R's at about the 16th decimal:
Wpi->3.141592653589793238462643383279502884197169399375105
..^
Rpi->3.14159265358979311599796346854418516
Probably not of interest to anyone but astronomers, na
I have four files that map populations to appropriate keys: statepop.csv,
countypop.csv, zip3.csv, and zip5.csv. I'm using the TIGER/Lines shape files:
tl_2009_12_state, tl_2009_12_county tl_2009_12_zcta3, and tl_2009_12_zcta5. I
have carefully followed a number of tutorials and can reproduce t
Indeed. You do not understand lists. The behavior you expect is not how R
works. Have you read "An Introduction to R" where this is explained
(section 6.1). Also chapter 10 and 10.7 in particular for scoping in R.
See also
?with
?within
?eval
and e.g. ?lm or ?xyplot for the ubiquitous use of "dat
Hi,
No, you won't be able to simply call "a" and have that work.
R returns these in a single object with components (elements) named a,b,c,d
Here's a concrete example:
func <- function(x, y) return(list(a = x+1, b = y + 2))
out <- func(3, 5)
out[["a"]] # or out$a
out[["b"]] # or out$b
give
I am running a program which has an output containing four vectors named
meanfevs, meanfevns, pfevs, pfevns. I wish to return all four and be able
to access them later. I used the command
return(list(a=meanfevs,b=meanfevns,c=pfevs,d=pfevns))
it did give me the ouput. However the values did not get
Yes that was the problem. Thank you very much. Can anyone tell me the
meaning of
The following object(s) are masked _by_ '.GlobalEnv':
beta
i was shown this notification after the results were printed.
On Mon, Jul 9, 2012 at 1:15 PM, Uwe Ligges
wrote:
>
>
> On 09.07.2012 18:19, PRAGYA SUR wr
On 09.07.2012 18:19, PRAGYA SUR wrote:
I ran the same program in a different computer where it had run proper a
week ago. This time around in the log file in WinBUGS the program stopped
at a line which said :
save(C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/RtmpU3u46p/log.odc)
save(C:/DOCUME~1/ADMINI~1/
excellent!!! thanks a lot!!
--
View this message in context:
http://r.789695.n4.nabble.com/unique-vs-duplicate-problem-tp4635868p4635874.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https://stat.eth
Hello,
The function is
?Box.test
It has two types, Box-Pierce and Ljung-Box.
Hope this helps,
Rui Barradas
Em 09-07-2012 15:59, Sajeeka Nanayakkara escreveu:
What is the R code for Ljung-Box Test in Statistics?
Sajeeka Nanayakkara
[[alternative HTML version deleted]]
___
Hello,
Maybe this function.
fun <- function(x) x %in% x[duplicated(x)]
x <- c(1, 2, 3, 3)
fun(x)
Hope this helps,
Rui Barradas
Em 09-07-2012 17:42, Nico902 escreveu:
Hi,
Let say I have a numeric vector: x <- c(1, 2, 3, 3).
I want on one hand numbers which are not duplicated ie "1,2" a
Here is one way of doing it -- you can create your own functions:
> x <- c(1, 2, 3, 3)
>
> allDup <-
+ function (value)
+ {
+ duplicated(value) | duplicated(value, fromLast = TRUE)
+ }
>
> duped <- unique(x[allDup(x)])
> duped
[1] 3
>
> setdiff(unique(x), duped)
[1] 1 2
>
>
On Mon, Jul 9, 2
Hi,
Let say I have a numeric vector: x <- c(1, 2, 3, 3).
I want on one hand numbers which are not duplicated ie "1,2" and duplicated
"3".
so I did:
>duplicated(x)
FALSE FALSE FALSE TRUE
> unique(x)
1 2 3
which is not what I want. Is there a function in R to have the following
result:
>dupli
large (585000 rows) and has no NA, - or blank values.
>
> My script (in brief) is as follows, with results:
>
>
>> library(MASS)
>>
>> ## ADD DATA
>> Jdata<- read.delim("/Analysis/20120709 JLittle data file.txt", header=T)
>>
&g
I ran the same program in a different computer where it had run proper a
week ago. This time around in the log file in WinBUGS the program stopped
at a line which said :
save(C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/RtmpU3u46p/log.odc)
save(C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/RtmpU3u46p/log.txt)
and did n
Kai Ying iastate.edu> writes:
>
> Hi,
>I want using zero-inflated negative binomial regression model to
> classify data(a vector of data), that is I want know each observed value is
> more likely belong to the "zero" or "count" distribution(better with
> relative probability). My data is som
Hi all-
I fit a zero-inflated Poisson model to model bycatch rates using an offset term
for effort. I need to apply the fitted model to a datasets of varying levels of
effort to predict the associated levels of bycatch. I am seeking assistance as
to the correct way to code this.
Thanks in adva
On 7/9/2012 9:17 AM, Javier Palacios Fenech wrote:
Please.
After, Terry's response I guess I was expecting to hear how your
comparison between R and STATA went when you used the R function,
survreg() for your analysis.
We still don't know what your data look like. The posting guide asks
for
John,
the problem is now resolved. I changed the "PATH" environment variable. I
replaced the path leading to the old java installation by the new one and now
it works.
Thanks for your help.
Regards,
Alex
-Ursprüngliche Nachricht-
Von: Alexander Erbse
Gesendet: Montag, 9. Juli 2012 17
Hi John,
I did some further checks and noticed that the java version, which is indicated
by the settings (I used the code you sent) is version 1.5.0_12, although I
installed version 1.7.0_05 shortly. The paths as shown by parameter
"java.endorsed.dirs" are wrong. They are pointing to an older v
What is the R code for Ljung-Box Test in Statistics?
Sajeeka Nanayakkara
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-proj
On Jul 9, 2012, at 15:40 , Suresh Krishna wrote:
>
> Hello,
>
> Why does anova.lm sometimes return a p-value and at other times not ? Is it
> because it recognizes nested models from non-nested ones ?
>
>> x<-seq(1,100,1)
>> y<-3*x+rnorm(100)
>> anova(lm(y~x),lm(y~x+I(x^2)),test="F")
> Analy
Please.
find an example here. With exactly the same data set, I run two hazard
models following the instructions for each function.
aftreg(formula = Surv(sta, sto, S) ~ a + b + c + d + e + f + g
, factor(F), data = data.frame(SURV),
dist = "weibull", id = ID)
streg f1 f2 f3 f4 f5 a b c d
Indeed!! I made a spelling mistake! Correction:
Should this not be attributed to DescRtes?
Ted.
On 09-Jul-2012 13:31:03 John Kane wrote:
> ooohhh!
>
> John Kane
> Kingston ON Canada
>
>
>> -Original Message-
>> From: ted.hard...@wlandres.net
>> Sent: Sun, 08 Jul 2012 21:07:09 +0
Without more information, we can only guess what you did, or what you
are seeing on the page that is "different".
I'll make a random guess though. There are about 5 ways to paramaterize
the Weibull distribution. The standard packages that I know, however,
tend to use the one found in the Kal
Right, I see it now. Thanks.
Who knows in another 100 years I may understand regex.
John Kane
Kingston ON Canada
> -Original Message-
> From: smartpink...@yahoo.com
> Sent: Sat, 7 Jul 2012 16:19:54 -0700 (PDT)
> To: jrkrid...@inbox.com
> Subject: Re: [R] Splitting a character vector.
ooohhh!
John Kane
Kingston ON Canada
> -Original Message-
> From: ted.hard...@wlandres.net
> Sent: Sun, 08 Jul 2012 21:07:09 +0100 (BST)
> To: r-help@r-project.org
> Subject: Re: [R] a fortune?
>
> Should this not be attributed to DescaRtes?
>
> Ted.
>
> On 08-Jul-2012 18:41:17 Ac
Dear Abraham,
I must admit that I don't really follow what you want to do. Disregarding the
fact that the example you provide doesn't converge to a proper solution, the
plot that you've requested will range over all values of bid at the median
home, which is 0. You may have intended home to be
1 - 100 of 128 matches
Mail list logo