[R] simple on point bisserial correlation

2010-05-05 Thread Dmitry Gospodaryov

Dear developers of R-project,
I have such data
height of male persons
181, 178, 182, 160, 187, 193, 184, 184,
175, 178, 184, 184, 174, 185, 175
height of female persons
164, 165, 160, 174, 167, 161, 164, 165,
169, 175, 165, 155, 172, 164, 172, 166,
160, 159, 158, 173
I want to determine if height is dependent on
gender, and I need to find, as I understand, point
biserial correlation. I had tried to use package ltm,
and obtained coefficient which is about 0.74. I also
had tried to calculate it manually (with some MS Excel help
for simple calculations), using equation given in Internet
(e.g., in Wikipedia; this equation is also given in some
copy-books) and obtained coefficient is about 0.77.
ltm provides somewhat other equation with pi-numbers.
So, the questions are following:
1). Do exist packages in R-project, except of polycor and
ltm, which provide calculation of point biserial correlation?
1a). Why ltm use non-traditional equation for
bisserial coefficient? Which is significance of this difference?
2). Can I also calculate significance of the biserial correlation
coefficient (p  ???; using, probably, t-test) by means of
R-project?

Thank You for advance.
With regard,
Dmitry Gospodaryov.

__
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.html
and provide commented, minimal, self-contained, reproducible code.


[R] histogram

2009-10-13 Thread Dmitry Gospodaryov

Dear R developers,How I can build a histogram from matrix:

0 0.5 1

0.25 34 43 65
1 23 35 54
4 22 29 42
10 21 22 29
20 15 17 20

(first string is represented names of columns,
first column is represented names of rows)
where names of columns should be x-axis labels; respectively
to this, I want to have three groups of bars (5 bars in each group)?
Y values should be represented by values given in the core of
matrix. Names of the rows should be in a legend, and should
represent the each of 5 bars (in group) name.
I would also try to build filled contour, however, i can't
ask the program to consider column and rownames like
true values, not only like labels. So, column names should
be the y-values, while row names should be the x-values.
Values placed in the core of matrix should be z-values.

With regard, Dmitry.

__
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.html
and provide commented, minimal, self-contained, reproducible code.


[R] response surface designs

2009-10-13 Thread Dmitry Gospodaryov

How I can obtain graphics for response surface design,
basing on data:
x: 0.25, 1, 4, 10, 20.
y: 0, 0.5, 1
z1 (for y = 0): 45, 35, 25, 15, 10.
z2 (for y = 0.5): 50, 45, 36, 21, 17.
z3 (for y = 1): 37, 34, 22, 17, 11?
z-values should be scaled in colour (e. g. from red to blue).
I consider to use packages rsm and graphics
(with grDevices). I suggest to use Box-Behnken design
in rsm and filled.contour in graphics. However,
I do not know how I can combain these two opportunities.
I am not familiar in response surface analysis, and able
to be wrong in the selection of the model. Thank you
for any reply. With regard, Dmitry.

__
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.html
and provide commented, minimal, self-contained, reproducible code.


[R] some simple questions regarding survival analysis

2009-09-29 Thread Dmitry Gospodaryov

I have two types of survival data for Drosophila
cohort. For example:

uncensored


age - c (0, 2, 4, 6, 8, 10)
alive1 - c(10, 9, 6, 3, 1, 0)
alive 2 - c(10, 9, 4, 1, 1, 0)


and censored


age - c(0, 2, 4, 6, 8, 10)
alive1 - c(10, 8, 3, 1, 1, 0)
escaped1 - c(0, 1, 1, 0, 0, 0)
alive2 - c(10, 7, 2, 1, 1, 0)
escaped2 - c(0, 1, 2, 0, 0, 0)


1) What statistical tests is the most apropriate for the correct
comparison of uncensored data (alive1 and 2) and censored
ones?
2) What package and function I can use in R for the above
mentioned comparison?
3) Should I rearrange the data in the example tables for the
correct calculations using R functions?
With regard, Dmitry.

__
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.html
and provide commented, minimal, self-contained, reproducible code.


[R] Tool for solving equations

2009-09-28 Thread Dmitry Gospodaryov
Does exist any tool in R to solve equations, especially complex 
exponential equations?

For example:
y = 100*exp(b*(1-exp(c*x))/c)
If it is so, then what is the package i have to
use and what is algorythm for this solving?
Thank you for advance.
With regard, Dmitry.

__
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.html
and provide commented, minimal, self-contained, reproducible code.


[R] Difficulties with the simpest table

2009-06-10 Thread Dmitry Gospodaryov

I have the data arranged in table (in Excel, or Notepad):

x   y

0   100
2   100
4   80
6   40
8   0

I need to transfer these data in R file and then going to
operate with x and y as with variables. I should note, that I have
2.8.1 version. Thank you for advance.

  With regard, Dmitry.

__
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.html
and provide commented, minimal, self-contained, reproducible code.


[R] curve fitting

2009-05-12 Thread Dmitry Gospodaryov

I have the data:
for x: 2, 8, 14, 20, 26, 32, 38, 44, 50, 56, 62, 68, 74,
for y: 100, 99, 99, 98, 97, 94, 82, 66, 48, 38, 22, 10, 1.
y depends on x by equation: y = 100*exp(b*(1-exp(c*x))/c),
where b and c are coefficients. I need to find coefficients in this
equation for given data. How can I do that by means of R?
Thank you for advance. With regard, Dmitry.

__
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.html
and provide commented, minimal, self-contained, reproducible code.