Sidhu Sabeena (ROYAL SURREY COUNTY HOSPITAL NHS FOUNDATION TRUST)
2011-Aug-17 08:19 UTC
[R] Help with calc_sde
I cannot seem to get this to work? I have weighted data points that I want to
fit an sd-ellipse to, but the ellipse is not right? I have attached a .tiff of
what I get.
I'm wondering if it's not looking at my actual data, but taking the data
from the example? I ask this because I don't know where "Title"
comes from in the graph?
Also, I want to put calcentre=FALSE, but if I do this I get the following error:
Error in data.frame(..., check.names = FALSE) :
arguments imply differing number of rows: 10, 0
I want the weighted mean centre of the ellipse, not the mean centre.
Can you tell me what is going on and why it isn't calculating the proper
ellipse? I'm going to start crying soon.
Sabeena
library(xlsReadWrite)
Low <- read.xls('LowEB.xls')
attach(Low)
Lwts <- read.xls('LowWtsEB.xls')
attach(Lwts)
cE.add <- c(0.16,1.00,0.42,0.17,0.11,0.49,0.28,0.20,0.45,0.23)
library(aspace)
x11()
plot(x =Low[,1], y = Low[,2], type = 'p', pch = 16, col =
'darkgoldenrod1', cex = 2*cE.add,xlim=c(2,10),ylim=c(40,105))
calc_sde(id=4, filename="EBLOW_Output.txt", centre.xy=NULL,
calccentre=TRUE,
weighted=TRUE, weights=Lwts, points=Low, verbose=TRUE)
plot_sde(plotnew=FALSE, plotSDEaxes=FALSE,
plotcentre=FALSE,plotweightedpts=FALSE,plotpoints=FALSE,sde.col='darkgoldenrod1',sde.lwd=2)
********************************************************************************************************************
This message may contain confidential information. If you are not the intended
recipient please inform the
sender that you have received the message in error before deleting it.
Please do not disclose, copy or distribute information in this e-mail or take
any action in reliance on its contents:
to do so is strictly prohibited and may be unlawful.
Thank you for your co-operation.
NHSmail is the secure email and directory service available for all NHS staff in
England and Scotland
NHSmail is approved for exchanging patient data and other sensitive information
with NHSmail and GSi recipients
NHSmail provides an email address for your career in the NHS and can be accessed
anywhere
For more information and to find out how you can switch, visit
www.connectingforhealth.nhs.uk/nhsmail
********************************************************************************************************************
