[R] Intercept and slope of GLS model

2011-03-29 Thread John Haart
Dear list - A simple question, i hope! With this truncated output from a GLS model the intercept is 0.004634487 but where is the slope? Coefficients: Value Std.Error t-valuep-value (Intercept) 0.004634487 0.0006773

Re: [R] Extract subset of rows

2010-12-17 Thread John Haart
17 Dec 2010, at 15:19, John Haart wrote: Hi, I have two matrices with a common field = species what i want to do is make a matrix that combines the data held in the other two based on the species name. I.e ( simple example) Matrix 1 - monocot SPECIES V1 A 2 B

[R] Extract subset of rows

2010-12-17 Thread John Haart
Hi, I have two matrices with a common field = species what i want to do is make a matrix that combines the data held in the other two based on the species name. I.e ( simple example) Matrix 1 - monocot SPECIES V1 A 2 B 3 C 4

[R] help getting data in correct format

2010-12-06 Thread John Haart
Dear All, I am having trouble getting my data into R as i need it! I am used to using read.delim("") to open .txt files to do work on. The function i am using requires a matrix like the one below. My data is from excel and then saved as a txt file. I have tried the usual read.delim("") approa

[R] Randomly shuffle an array multiple times

2010-10-18 Thread John Haart
Dear List, I have a table i have read into R: NameYes/No John0 Frank 1 Ann 0 James 1 Alex1 etc - 800 different times. What i want to do is shuffle yes/no and randomly re-assign them to the name. I have used sample() and permute(), however there is no way to do thi

Re: [R] Random assignment

2010-10-15 Thread John Haart
p = 0.0748). The variance on that expectation will be p * (1-p) * Fn. If you do your simulation that's the result you'll get. Perhaps to initial identify families with disproportionate observed extinction rates all you need is the dbinom function ? Michael On 15 October 2010 22:29, John

Re: [R] Random assignment

2010-10-15 Thread John Haart
ected to be at risk in EACH family under the random binomial distribution ( assuming every species has a 7.48% chance of being at risk. Thanks John On 15 Oct 2010, at 11:19, Dennis Murphy wrote: Hi: I don't believe you've provided quite enough information just yet... On Fri, Oc

[R] Random assignment

2010-10-15 Thread John Haart
Dear List, I am doing some simulation in R and need basic help! I have a list of animal families for which i know the number of species in each family. I am working under the assumption that a species has a 7.48% chance of being at risk. I want to simulate the number of species expected to

Re: [R] Interpreting the example given by Frank Harrell in the predict.lrm {Design} help

2010-10-04 Thread John Haart
Dear List and Frank, I have calculated the log-odds for my models but maybe i am not getting something but i am not understanding how for a categorical factor this helps? On all the examples i have see it relates to continuous factors where moving from one number to another shows either a incre

Re: [R] Interpreting the example given by Frank Harrell in the predict.lrm {Design} help

2010-10-03 Thread John Haart
Thanks Frank and Greg, This makes alot more sense to me now. I appreciate you are both very busy, but i was wondering if i could trouble you for one last piece of advice. As my data is a little complicated for a first effort at R let alone modelling! The response is on a range from 1-6, which

[R] Fwd: Interpreting the example given by Frank Harrell in the predict.lrm {Design} help

2010-10-01 Thread John Haart
Frank and list, The reason I am trying to assign them is because I have a data set where i have arrived at the most likely model that describes the data and now I have another dataset where I know the factors but not the response. Therefore, surely I need to assign the predicted values to a r

Re: [R] Interpreting the example given by Frank Harrell in the predict.lrm {Design} help

2010-10-01 Thread John Haart
Frank, Thats great thanks for the advice, i appreciate that brier score, AUC etc are a better method of validation and discrimination but when it comes to predictions of new data > d <- data.frame(x1=c(.1,.5),x2=c(.5,.15)) > predict(f, d, type="fitted.ind") > > y=good y=better

[R] Interpreting the example given by Frank Harrell in the predict.lrm {Design} help

2010-10-01 Thread John Haart
Dear list, I am relatively new to ordinal models and have been working through the example given by Frank Harrell in the predict.lrm {Design} help All of this makes sense to me, except for the responses, i,e how do i interpret them? i would be extremely grateful if someone could explain the re