[R] How to plot bootstrap distribution in rms package?

2014-12-07 Thread Eddie Smith
Hi guys, I am trying to familiar myself with bootstrapping using rms package and stuck on how to plot the bootstrap distribution. Would appreciate if somebody could help. Thanks in advance. From http://stats.stackexchange.com/questions/64788/interpreting-a-logistic-regression-model-with-multiple

[R] Imputation for space-time satellite data

2013-09-11 Thread Eddie Smith
Dear list, I am trying to do a space-time imputation for time series satellite imageries. Any recommendation for a good package to use. I am new to R. Thank you. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https:/

[R] Cross validation in R

2013-07-02 Thread Eddie Smith
Guys, I select 70% of my data and keep 30% of it for model validation. mydata <- read.csv(file.choose(), header=TRUE) select <- sample(nrow(mydata), nrow(mydata) * .7) data70 <- mydata[select,] # select data30 <- mydata[-select,] # testing temp.glm <- glm(Death~Temperature, data=data70, family=

Re: [R] Failed to open *.img in rgdal

2013-05-16 Thread Eddie Smith
32.9 1534778 > > Please provide results of sessionInfo(). > > Regards, > Pascal > > > > On 05/16/2013 07:02 PM, Eddie Smith wrote: > >> Hi guys, >> >> Anybody willing to help? >> >> SST1982003 <- readGDAL("daily_sst_1982003_*

[R] Failed to open *.img in rgdal

2013-05-16 Thread Eddie Smith
Hi guys, Anybody willing to help? > SST1982003 <- readGDAL("daily_sst_1982003_nighttime.img") Error in SST1982003 <- readGDAL("daily_sst_1982003_nighttime.img") : invalid (do_set) left-hand side to assignment The data can be downloaded from googledrive https://docs.google.com/file/d/0BzzExM8Z

Re: [R] How to subset my data and at the same time keep the balance?

2012-11-19 Thread Eddie Smith
Thanks a lot! I got some ideas from all the replies and here is the final one. newdata select <- sample(nrow(newdata), nrow(newdata) * .7) data70 <- newdata[select,] # select write.csv(data70, "data70.csv", row.names=FALSE) data30 <- newdata[-select,] # testing write.csv(data30, "data30.csv",

[R] How to subset my data and at the same time keep the balance?

2012-11-19 Thread Eddie Smith
Hi guys, I have 1000 rows of a dataset. In my analysis, I need 70% of the data, run my analysis and then use the remaining 30% to test my model. Could anybody kindly help me on this? Cheers __ R-help@r-project.org mailing list https://stat.ethz.ch/mai

[R] How to specify minimum and maximum x-axis value in logi.hist.plot?

2012-09-14 Thread eddie smith
Hi guys, How could I specify minimum and maximum x-axis values in logi.hist.plot? My code is something like this: plot(mydata$Temperature,mydata$Mortality, ,xlab="Temperature",ylab="Probability of mortality") curve(predict(temp.glm,data.frame(Temperature=x),type="resp"),add=TRUE, col="red") point

[R] need help in logistic regression

2012-05-28 Thread eddie smith
Hello everyone, I tried to understand the relationship between temperature and the death of an organism by using logistic regression. glm(formula = Death ~ Temperature, family = binomial(link = "logit"), data = mydata) Coefficients: Estimate Std. Error z value Pr(>|z|)

[R] Output result to a csv file

2012-05-10 Thread eddie smith
Hi guys, I am applying linear regression model using lm, generate the residual and then need to output the result to a csv file. Here is my script: maxtempstation1.lm = lm( Year ~ station1, data=opencsv) maxstation1.res = resid(maxstation1.lm); maxstation1.res write.csv(maxtempstation1.res, file="

Re: [R] for loop

2012-02-13 Thread eddie smith
uot; > > http://cran.r-project.org/doc/contrib/Paradis-rdebuts_en.pdf > > to hand while you learn R. It is very good about how the basics > work. The next step up would be the more systematic exposition > of how R works in "An Introduction to R": > > http://cran

[R] for loop

2012-02-13 Thread eddie smith
Hi guys, This is a very beginner question. Anybody willing to help? for(i in 1:1000) x=29.5 + i/500 y=2x plot(y,x) The idea is to produce 1000 values of x and y then plot them. Cheers, Eddie [[alternative HTML version deleted]] __ R-help@r-p

Re: [R] newbie: fourier series for time series data

2011-06-01 Thread eddie smith
.@gmail.com > CC: r-help@r-project.org > Subject: Re: [R] newbie: fourier series for time series data > > > On 5/31/2011 5:12 AM, eddie smith wrote: > > Hi Guys, > > > > I had a monthly time series's data of land temperature from 1980 to 2008. > > After plo

[R] newbie: fourier series for time series data

2011-05-31 Thread eddie smith
Hi Guys, I had a monthly time series's data of land temperature from 1980 to 2008. After plotting a scatter diagram, it seems that annually, there is a semi sinusoidal cycle. How do I run Fourier's series to the data so that I can fit model on it? I am really sorry for my question sound stupid, b