The sd function is doing *exactly* what it should.
the sd of 5 is "NA", and the sd of 7 is "NA"
try looking at "a" itself. My guess is that you didn't intend to have
two columns each with one value.
Did you instead intend to have 5 and 7 in one vector, like so:
a<-c(5,7)
sd(a)
Glen
__
This is not really the correct forum, but very briefly, and in rough order of
complexity, you can do a summary (which counts the occurences of the
categories in a factor), you could look at crosstabulations of questions
(e.g ?table, ?tabulate, ?chisq.test), and also measures of association in
tabl
I am unfamiliar with how to use coin, but it looks like it should be doable -
the vignette in coin.pdf does a Page test. The wikipedia page for Page's
test explains how this is related to the Jonckheere-Terpstra test, which
seems to suggest if it can do one it should be able to do the other. Add t
http://lmgtfy.com/?q=sort+algorithm
--
View this message in context:
http://n4.nabble.com/Help-me-with-writing-function-sort-tp1836063p1836181.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https://s
It's possible I have failed to understand your situation (it's not clearly
described).
If your model captures the dependence structure (e.g. that induced by a
common-but-unknown block effect), then in many cases it could be set up to
work. If the dependence is of some form not captured in the mod
jda wrote:
>
> I have imported data from an Excel spreadsheet. Columns in that
> spreadsheet are named "name", "x", and "y", and several sets of those
> columns appear in the worksheet. For example:
>
> name x y name x y
> test1 1 3 test2 4 4
> test1 2 2 test2 5 5
> test1 3 1 test2 6 6
Kay Cichini wrote:
>
> i need to calculate ci's for each of 4 groups within a dataset, to be able
> to infere about differences in the variable "similarity". the problem is
> that data within groups is dependent, as assigned by the blocking-factor
> "site". my guess was to use a block bootstrap
> 5000 samples, Exponential distribution (f(x), lambda=0.0005, 0<=x<=360)
If you don't need the truncation at 360 you can just use rgamma to generate
the exponentials
rgamma(5000,shape=1,rate=0.0005)
(It's not 100% clear but I assume your lambda is an inverse of a scale
parameter)
Why are y
GlenB wrote:
>
>
> R Heberto Ghezzo, Dr wrote:
>>
>> Does anybody knows anything about constructing LAN? Any books or already
>> rograms to do it?
>>
>
A list of good references is available here:
http://www.projectrho.com/nomogram/reading.html
--
View
R Heberto Ghezzo, Dr wrote:
>
> On the same topic but from a different perspective. A Nomogram or better
> a Line Aligned Nomogram is a graph with 2 or more scales, maybe linear
> where by alignig values in each scale you can read values in the other
> scale. The relationship can be linear, the
> a<-read.table(stdin(),header=TRUE)
0: id kAgeHeight
1: 23 2 23 60
2: 12 3 28 58
3: 19 4 18 55
4: 37 5 22 54
5:
> with(a,k[Age==min(Age)])
[1] 4
--
View this message in context:
http://n4.nabble.com/OUTPUT-the-row-tp1644200p
Are you referring to a truncated normal?
(http://en.wikipedia.org/wiki/Truncated_normal_distribution)
Glen
--
View this message in context:
http://n4.nabble.com/A-complex-case-of-distribution-fitting-tp1593273p1594311.html
Sent from the R help mailing list archive at Nabble.com.
Please show your attempt that didn't work.
What do you do for Z(1)?
(You could try looking at the help on filter)
--
View this message in context:
http://n4.nabble.com/Help-I-need-to-use-R-to-calculate-a-recursive-function-tp1586189p1586777.html
Sent from the R help mailing list archive at Na
Lazy and impatient? That's me!
I find it hard to say what my biggest misconceptions were.
Here's one thing:
What I realized very early on:
- many data analysis functions return a bunch of stuff, not all of which
you see when you print() it
what I *failed* to realize:
- The bunch of stuff
Note that the first set of coefficients minus the second set of coefficients
is constant (12.78262)
--
View this message in context:
http://n4.nabble.com/linear-predictors-and-survreg-function-tp1474388p1475332.html
Sent from the R help mailing list archive at Nabble.com.
__
Do you actually need the intermediate result (the vector of 1's and 0's), or
just the result - the total number of columns?
Is the number you're comparing to different for each column?
Assuming the answers are "just the result" and "comparing to the same
number"
x <- matrix(c(4,5,7,2),nc=2)
n
I have an additive model of the following form :
zmdlfit <- lm(z~ns(x,df=6)+ns(y,df=6))
I can get the fitted values and plot them against z easily enough, but I
also want to both obtain and plot the two additive components (the estimates
of the two additive terms on the RHS)
I've been looking
your problem is because f is a vector of the same length as runi
as a result, the thing you're trying to assign to z[i+1] is also a vector of
that length
--
View this message in context:
http://n4.nabble.com/Newton-method-tp1311057p1311228.html
Sent from the R help mailing list archive at Nabbl
See also ?unlist (you can unlist(strsplit(...)) for the same effect
--
View this message in context:
http://n4.nabble.com/Matching-a-character-in-a-string-tp1289795p1290011.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-pro
The output from strsplit("hello","") is not suitable as input for the second
argument for charmatch.
compare with:
charmatch("o",strsplit("hello","")[[1]])
--
View this message in context:
http://n4.nabble.com/Matching-a-character-in-a-string-tp1289795p1289976.html
Sent from the R help maili
Does *cat(v[0])* produce what you need?
--
View this message in context:
http://n4.nabble.com/Printing-RVector-tp1018770p1025909.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/m
Specifically, your setup of the data makes all the columns factors, so to
make Peter's code work you need to make the relevant columns numeric first.
--
View this message in context:
http://n4.nabble.com/Merge-and-join-data-tp1018729p1025642.html
Sent from the R help mailing list archive at Nabb
Why not just use matrix(runif(9),nrow=3) ?
--
View this message in context:
http://n4.nabble.com/Matrices-with-randomly-generated-entries-tp1018777p1024617.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org ma
What makes an outlier an outlier depends on the model. A highly discrepant
observation under one model is entirely typical under another.
Even given a model, criteria for what consititutes an outlier vary by
application area and user.
Even given all of that, exclusion is only one of many possib
I tried to use transace but it tried to call ace from acepack.
So I re-downloaded Hmisc to make sure I had the latest version
(Warning message: "package 'Hmisc' was built under R version 2.10.1" - I am
running 2.10.0, Windows version running under XP).
looking at transace, it has this:
> if (.
Thanks very much, it looks to be an implementation the same algorithm with
slightly different form of inputs and some useful extras. It should do
nicely.
Jonathan Baron wrote:
A similar function is transace from the Hmisc package:
http://finzi.psych.upenn.edu/library/Hmisc/html/transace.html
I found the old ace function (from acepack) valuable a couple of years ago
in helping to find a transformation of the response to approximate
additivity in smooth functions of the predictors.
ace used alternating conditional expectations, but I'm not overly fixated on
algorithms as long
as it wo
Jim Silverton wrote:
>
> I want to create the mixture formulation of a discrete uniform ie, say
> f(x) = 1/10, for i = 1,2,3,4,5,6,7,8,9 and 10 and
> another discrete distribution which has the same values of x, but he
> probabilities can vary. Can this be done on any package in R? an if so,
>
steve_fried...@nps.gov wrote:
>
> I am searching for a method to calculate a normal distribution.
>
> For example this equation is used to calculate the normal curve when the
> mean and standard deviation are know.
> p(x) = (1/σ*sqrt(2π)) x exp (- (x-μ)2/2σ2)
>
> However, some of the literatu
This is a result of how R treats factors.
There's more than one way to do what I think you're asking for.
I've constructed a smaller version of your data frame to illustrate one
quick way if that's all you need:
> smdat<-
> data.frame(V1=c("AB","AB.C","ABF10"),V2=rep("20091224",3),V3=rep(156.0
khazaei said:
> how can sample from f(x)~x^(a-1)*ind(0,min(b,-log(u)) in R?
> where a and b is positive constand and 0http://n4.nabble.com/how-can-sample-from-f-x-x-a-1-tp978822p979342.html
Sent from the R help mailing list archive at Nabble.com.
__
Joel Fürstenberg-Hägg said:
"Multiple linear regression [...] I would like to check every possible
combination of factors, evalute the results based for instance on their p
values, and then choose the best regression model."
By "every possible combination of factors", I assume you mean that for
And now some advice:
I'm of the opinion that one should only in very rare circumstances be doing
hypothesis testing of distributions. For example, the most common reason
people give for doing a hypothesis test of the
distribution of a sample is that they want to check the appropriateness of
the
rkevinburton wrote:
>
> If I have data that I feed into shapio.test and jarque.bera.test yet they
> seem to disagree. What do I use for a decision?
>
> For my data set I have p.value of 0.05496421 returned from the
> shapiro.test and 0.882027 returned from the jarque.bera.test. I have
> includ
34 matches
Mail list logo