r statistics

  1. M

    Multivariate analysis for Medicine Thesis

    Hi, I am writing my thesis for medicine about postoperative complications of a disease (IBD). The dependent variable in this case is whether the patients had a post-operative complication or not (binary) within 30 days of their operation. The sample size for my study is n = 62. I have...
  2. L

    Is there a R package for analyzing twins raised together and apart?

    I have data from a clinical study on samples of twins raised together and apart. I have not found much resources for this type of analysis. Can anyone point me in the direction of these type of information or R package? CHEERS
  3. L

    Details on missing data in R

    Hello all, Say I have data as shown below. I want to generate a report in R like this: Missing 0 tests: 1 Missing 1 test: 2 Missing 2 tests: 2 Missing 3 tests: 1 I then want to generate a report that says the combination of missing values. For example, 1/3 of respondents who were...
  4. L

    extract first value from multiple columns

    i am trying to do this in R. it is equivalent to the stata command rowfirst suppose i have four columns as shown below (T1, T2, T3, T4). I want to create a new column (TX) which contains for each row the first element in columns T1:T4. ID T1 T2 T3 T4 A 0 2 4 5 B . . 6 5 C . 8...
  5. F

    How to write an easy for loop for my function in RStudio? (R script below)

    I received an R script from my prof., it can convert an input adjacency matrix to a network format output. It works properly. I'd like to write a for loop to make the file converting faster. My input files are in .csv format: ["a (1).csv", ..., "a (128).csv"]. This is my code: for(x in...
  6. K

    Trying to replicate SAS Proc Logistic Code in SPSS or R

    I am an inexperienced user on R and mostly use SPSS for any statistical analysis. Recently I have been working at trying to replicate work done using the SAS PROC LOGISTIC command to create a mortality indicator model. I have tried all the logistic models available in SPSS but cannot get the...
  7. A

    Quantmod OHLC currency data

    Hi all, I am trying to back test a forex trading strategy but have been unable to get all the data I need. Using the R quantmod package and the getSymbols function I have got the daily Close prices of the GBPUSD over the last 5 years. However I really want the Open, High, Low and Close prices...
  8. M

    How to calculate inter-observer/ inter-rater reliability of ordinal data in R?

    Hello, I have the question which measurement to use in order to calculate the inter-observer reliability in R once for an ordinal and once for a nominal data set. Part1) Ordinal data set 2 observers gave scores on a scale from 1.0 to 5.0 with steps of 0.25 Example of data: observ1...
  9. S

    problems with Analysis Of Variance of unbalanced non parametric data

    Hello fellow R users :wave: I hope someone can help me solve this problem. I've been looking for a solution all day. I have a proportional response (% cover) variable. I have 2 explanatory factors, both with 3 or more levels: quadrats (of which there are many) and year (of which there are...
  10. D

    Splitting a pairwise matrix in R

    I have a pairwise matrix as follows #### sample matrix DF <- read.table(text="gene_ids A-B A-C A-D A-E B-C B-D B-E C-D C-E **D-E** GENE1 0 0 1 1 1 0 1 0 1 1 GENE2 1 0 1 1 1 1 0 1 1 0 GENE3 1 0...
  11. O

    Troubles in installing R on Mac OS X Mountain lion

    I all, In my previous mac, which had leopard installed, R was working perfectly. Now I just bought a new mac with Mountain Lion and I`m trying to install R. I`ve already installed all the required libraries, included Xcode 4.6, Xcode tools 4.6 and gfortran 4.2. However, when I run...
  12. I

    Help with R an KsTest

    Hi, Some days ago i tried to do a KSTest on R, but i didn't get the answer that i needed. In Fact i didn't understand why this test gives me the same P-value for a True or False Hypotesis. I tried with an Normal distribution testing a normal distribution, and i tried a Uniform distribution...
  13. T

    problems with hierarchical partitioning using R statistics and the hier.part package

    Hello after struggling with using R for the last couple of days I was hoping someone could help me with a statistical analysis I am completing for an environmental science honours project. Using R statistics is not something we have been taught and I am worried that I may have bitten of more...