Displaying 20 results from an estimated 3000 matches similar to: "R for simple stats"
2002 Jun 30
4
modifying a vector
Hello everyone,
Thanks to all who offered suggestions after my initial query to the list.
I've been busy trying to absorb the docs as fast as possible, but this
little thing has me stumped for the moment.
I'm creating a random sample of 100 item and saving it to a vector named
'iq'. I'd like to create a second vector (iq_prime, say) by adding 20 to
each element of the
2002 Jun 30
4
modifying a vector
Hello everyone,
Thanks to all who offered suggestions after my initial query to the list.
I've been busy trying to absorb the docs as fast as possible, but this
little thing has me stumped for the moment.
I'm creating a random sample of 100 item and saving it to a vector named
'iq'. I'd like to create a second vector (iq_prime, say) by adding 20 to
each element of the
2002 Jul 03
2
operating on a subset of a dataframe
Hi everyone,
I've got a dataframe with columns of different types. A certain number
of columns in the dataframe hold the results of a series of Likert-type
items. I've got a function that will print a simple table of frequencies
and I want to apply that function to those columns of the dataframe
only. What's the best approach?
-Tim
--
Tim Wilson | Visit Sibley online: |
2002 Aug 22
1
combining output from several operations
Hi everyone,
I wonder if there's a patient soul out there who has a minute to look at
the following.
I've got a set of summary statistics I need to perform many times.
Naturally, I've looked at writing a function to automate the process as
much as possible. (These are the data I mentioned recently in my
question about weighted means.) I'm having trouble figuring out the
proper
2002 Aug 20
2
weighting means
Hi everyone,
I've got a dataframe called 'faculty'. I want to do a weighted mean on
the column called 'Q8' weighted by the contents of column 'CETP'. In
addition, I need to operate on the result of splitting 'faculty'
according to the contents of a column 'FACULTY'. For example
> lapply(split(faculty$Q8, faculty$FACULTY), mean)
$"1"
[1]
2002 Jul 26
3
Fisher r-to-z transformation
Hi everyone,
I want to use the Fisher r-to-z transformation as part of a hypothesis
test of r. I can't find an R function that can do that. Am I missing
it?
-Tim
--
Tim Wilson | Visit Sibley online: | Check out:
Henry Sibley HS | http://www.isd197.org | http://www.zope.com
W. St. Paul, MN | | http://slashdot.org
wilson at visi.com | <dtml-var
2002 Aug 07
3
Forcing integers to be nominal
Hi everyone,
I've got a problem with an analysis of variance where it appears that my
independent variable is being treated as an integer when it should be
nominal.
The data are being loaded from an SPSS file and the independent variable
'YearColl' corresponds (surprisingly enough) to a student's year in
college. :-) The integers 1-4 are used in the dataset for this purpose.
My
2002 Jul 12
1
lmtest build fails, readline problem
Hi everyone,
I've downloaded the lmtest package, but I'm having trouble building it.
Here's the output:
copland:/home/wilson/tmp# R CMD INSTALL -l /usr/lib/R/library
lmtest_0.9-0.tar.gz
* Installing *source* package 'lmtest' ...
** libs
g77 -fPIC -g -O2 -c pan.f -o pan.o
gcc -shared -o lmtest.so pan.o -L/usr/lib/gcc-lib/i386-linux/2.95.4
-lreadline -ldl -lncurses
2002 Aug 15
2
complex splits
Hi everyone,
I'm having trouble figuring out how to split a dataframe more than once.
Let's say I have a dataframe d with a certain column called splitcol
composed of four possible ordinal values. The same dataframe has
two other columns, col1 and col2, that have one of two possible values
each. I'd like to split d$splitcol based on col1 and col2 so I can report
frequencies of the
2002 Aug 03
2
smcc/ make failure/ R CMD INSTALL package
Software information:
R Version 1.5.1 (2002-06-17)
ESS 5.1.20
Emacs 21.1.1
Mozilla 1.0
Linux Mandrake 8.2
Colleagues
I am having a little trouble installing packages. Having downloaded the
gzipped tarball of a package, put it in a /tmp directory, and using this
command:
[root at localhost /]# R CMD INSTALL -l 'usr/lib/R/library/'
'/home/smc/tmp/sgeostat_1.0-18.tar.gz'
I
2002 Jul 06
1
R: one-sample binomial test
try
?power.prop.test
> -----Messaggio originale-----
> Da: Tim Wilson [mailto:wilson at visi.com]
> Inviato: sabato 6 luglio 2002 6.05
> A: R-help
> Oggetto: [R] one-sample binomial test
>
>
> Hi everyone,
>
> Here's how I solved a problem for my stats class. I'm pretty sure I
> understand what's going on, but I wonder if there's a more
>
2002 Aug 02
4
extracting data from a dataframe
Hi everyone,
Here's a question about extracting data from a dataframe:
Let's say I've got a dataframe with two vectors, TEST and GENDER. GENDER
contains a 1 for males and 2 for females. I want to separate the results
of TEST by GENDER so I can compare their means.
What's the most efficient way to do this with R?
-Tim
--
Tim Wilson | Visit Sibley online: | Check out:
2002 Aug 20
2
help page for a function
Dear R People
I have a function that I wrote. It's not part of a
library, it's just a nice function.
However, I would like to have a "Help" page for it.
How do I go about doing that please?
Thanks so much in advance!
R version 1.5.1 for Windows.
Sincerely,
Erin
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read
2002 Jul 06
3
one-sample binomial test
Hi everyone,
Here's how I solved a problem for my stats class. I'm pretty sure I
understand what's going on, but I wonder if there's a more direct way to
solve it.
Problem summary:
A recent poll indicated that Candidate A is leading B with 55% of the
vote. How many voters need to be surveyed to ensure a margin of error of
+/- 2.5% with 99% confidence.
Here's what I did:
2002 Jun 06
2
covariance analysis model
Dear list users,
I have trouble with covariance analysis.
I measured nitrate concentrations in the soil (NO3) and the percentage of
legumes (LEG, continuous), affected by 2 different CO2 concentrations (CO2,
discrete). I suspect that CO2 has an effect on LEG and NO3, but also that
LEG has an effect on NO3, so this is the formula I wrote to test this:
NO3 ~ CO2 + LEG + CO2:LEG
Will LEG be
2005 May 23
3
skewness and kurtosis in e1071 correct?
I wonder whether the functions for skewness and kurtosis in the e1071
package are based on correct formulas.
The functions in the package e1071 are:
# --------------------------------------------
skewness <- function (x, na.rm = FALSE)
{
if (na.rm)
x <- x[!is.na(x)]
sum((x - mean(x))^3)/(length(x) * sd(x)^3)
}
# --------------------------------------------
and
#
2013 Feb 13
2
e1071::skewness and psych::skew return NaN
Hello everyone,
Does anyone know what would cause the skewness() function (from
e1071), as well as skew() from psych, to return a value of NaN?
I have a vector of positively-skewed data
(https://docs.google.com/file/d/0B6-m45Jvl3ZmYzlHRVRHRURzbVk/edit?usp=sharing)
which these functions return a value for like normal:
> skewness( data ) # returns 1.400405
but when I instead give those
2004 Sep 21
2
Ever see a stata import problem like this?
Greetings Everybody:
I generated a 1.2MB dta file based on the general social survey with
Stata8 for linux. The file can be re-opened with Stata, but when I bring
it into R, it says all the values are missing for most of the variables.
This dataset is called "morgen.dta" and I dropped a copy online in case
you are interested
http://www.ku.edu/~pauljohn/R/morgen.dta
looks like this
2008 Sep 23
3
Generating series of distributions with the same skewness and different kurtosis or with same kurtosis and different skewness?
Dear R users,
I hope to explain the concepts of skewness and kurtosis by generating
series of distributions with same skewness and different kurtosis or with
same kurtosis and different skewness, but it seems that i cannot find the
right functions.
I have searched the mailing list, but no answers were found.
Is it possible to do that in R? Which function could be used?
Thanks a lot.
--
2006 Mar 11
1
Non-linear Regression : Error in eval(expr, envir, enclos)
Hi..
i have an expression of the form:
model1<-nls(y~beta1*(x1+(k1*x2)+(k1*k1*x3)+(k2*x4)+(k2*k1*x5)+(k2*k2*x6)+(k3*x7)+(k3*k4*x8)+(k3*k2*x9)+(k3*k3*x10)+ (k4*x11)+(k4*k1*x12)+(k4*k2*x13)+(k4*k3*x14)+(k4*k4*x15)+(k5*x16)+(k5*k1*x17)+(k5*k2*x18)+(k5*k3*x19)+