similar to: About stepwise regression problem

Displaying 20 results from an estimated 200 matches similar to: "About stepwise regression problem"

2011 Oct 13
3
Question about GAMs
hi! I hope all of you can help me this question for example GAMs: ozonea<-gam(newozone~ pressure+maxtemp+s(avetemp,bs="cr")+s(ratio,bs="cr"),family=gaussian (link=log),groupA,methods=REML) formula(ozonea) newozone ~ pressure + maxtemp + s(avetemp, bs = "cr") + s(ratio,bs = "cr") #formula of gams coef(ozonea) # extract the coefficient of GAMs
2011 Jan 10
2
How to save the output of "split" command as series of .csv files
Hello, I am looking for a way to quickly split a data frame containing daily temperature readings into a series of individual data frames, one for each year, in order to save them as individual .csv files which will be named according to Year. I would prefer not to use a series of "subset" commands given that there are a differing number of years for the various location. The data
2005 Jan 10
1
I have some problem about GLM function.
Dear R-Help I 'm using GLM function to Modelling. But when I used Gamma Family in GLM, then I can't run. It was error > glm(DamageRatio~MinTEMP+MaxTEMP+DayRain+Group1+Group2+Group3+Year,family=Gamma()) Error in eval(expr, envir, enclos) : Non-positive values not allowed for the gamma family Can Gamma Distribution use data begin 0 ? and then when I used GLM in S-Plus Program then
2008 Aug 21
4
Very confused with class
Hi all, I am very confused with class. I am looking at some weather data which I want to use as explanatory variables in an lm. R has treated these variables as factors (i.e. with different levels), whereas I want them treated as discretely measured continuous variables. So I need to reassign the class of these variables, right? Indeed, doing class(southwest$pressure) (pressure being air
2003 May 08
2
Forward Stepwise regression with stepAIC and step
Dear all, I cannot seem to get the R functions step or stepAIC to perform forward or stepwise regression as I expect. I have enclosed the example data in a dataframe at the end of this mail. Note rubbish is and rnorm(17) variable which I have deliberately added to the data to test the stepwise procedure. I have used wateruse.lm<-lm(waterusage~.,data=wateruse) # Fit full model
2011 Sep 05
3
function censReg in panel data setting
Hello all, I have a problem estimating Random Effects model using censReg function. small part of code: UpC <- censReg(Power ~ Windspeed, left = -Inf, right = 2000,data=PData_In,method="BHHH",nGHQ = 4) Error in maxNRCompute(fn = logLikAttr, fnOrig = fn, gradOrig = grad, hessOrig = hess, : NA in the initial gradient ...then I tried to set starting values myself and here is
2011 Sep 28
2
GAMs in R : How to put the new data into the model?
I have 5 GAMs ( model1, model2, model3, model4 and model5) Before I use some data X(predictor -January to June data) to form a equation and calculate the expected value of Y (predictand -January to June). After variable selection, GAMs (Model 1)were bulit up! R-square :0.40 NOW, I want to use new X'( predictor -July - December data) and put into Model 1, then get the expected value of Y'
2008 Aug 18
2
Using lag
Dear all, I am having difficulties using the seemingly-simple function lag. I have a dataframe with several weather variables (maxitemp, windspeed, rainfall etc), and the response variable (admissions). The dataset is fairly large (1530 observations). I simply want to model the response against a lag of a couple of the explanatory variables, say maxitemp and rainfall. I would like to look at
2012 Dec 10
1
Marginal effects of ZINB models
Dear all, I am modeling the incidence of recreational anglers along a stretch of coastline, and with a vary large proportion of zeros (>80%) have chosen to use a zero inflated negative binomial (ZINB) distribution. I am using the same variables for both parts of the model, can anyone help me with R code to compute overall marginal effects of each variable? My model is specified as follows:
2011 Sep 22
1
negative binomial GAMM with variance structures
Hello, I am having some difficulty converting my gam code to a correct gamm code, and I'm really hoping someone will be able to help me. I was previously using this script for my overdispersed gam data: M30 <-gam(efuscus~s(mic, k=7) +temp +s(date)+s(For3k, k=7) + pressure+ humidity, family=negbin(c(1,10)), data=efuscus) My gam.check gave me the attached result. In order to
2012 Feb 10
1
Need to aggregate large dataset by week...
Hi all, I have a large dataset with ~8600 observations that I want to compress to weekly means. There are 9 variables (columns), and I have already added a "week" column with 51 weeks. I have been looking at the functions: aggregate, tapply, apply, etc. and I am just not savvy enough with R to figure this out on my own, though I'm sure it's fairly easy. I also have the Dates
2017 Aug 28
3
Extracting subset from netCDF file using lat/lon and converting into .csv in R
I have a series of nertCDF files containing global data for a particular variable, e.g. tmin/tmax/precipiation/windspeed/relative humuidity/radiation etc. I get the following information when using *nc_open* function in R: datafile: https://www.dropbox.com/s/xpo7zklcmtm3g5r/gfdl_preci.nc?dl=0 File gfdl_preci.nc (NC_FORMAT_NETCDF4_CLASSIC): 1 variables (excluding dimension variables):
2012 Jun 01
4
Adding a column into the file
Dear all, I have a lot of problems on R-programming. for example my csv. file is .. Date wrfRH wrfsolar wrfwindspeed wrfrain wrftd wrfta 21/10/2010 92.97 22.11 53.27 0 1546.337861 61.00852664 22/10/2010 87.35 21.99 40.89 0 1300.408288 62.85352227 23/10/2010 88.38 21.71 28.04 0.01 1381.768284 54.80594493 24/10/2010 92.32 15.45 22.38 0.51 1113.90981 39.46573663 25/10/2010 93.42
2012 Jun 29
5
Insert row in specific location between data frames
Hi everyone! I have a simple question. my data is predict_SO2_a 1 39.793231 2 30.252578 3 32.467584 4 31.941509 5 27.908320 6 11.594137 7 9.368125 8 12.319093 9 11.558811 10 7.937192 11 11.211306 12 12.400342 13 12.393146 14 13.256160 15 10.709600 16 9.966334 17 28.850652 18 10.024405 I want
2011 Jun 15
0
Find values from one dataframe between certain values in another dataframe
Hi all, I have a 2 files, one with a series of beginning and end times of animal dives in (lets call it dives). The other file is readings from a time-depth recorder, there is a datetime reading for every second, a temperature and light level reading (lets call it tdr). Now I want to say from the file dives, using the start and end time of the dives, go to the tdr file and find me the
2011 Oct 12
4
plot probability density function (pdf)
I have 2 series of variables, I want to plot the probability density function of these 2 variabels (i.e. two curves in one graph), I just want to compare these two variable distribution. what should I do? can I use ggplot2 package? -- View this message in context: http://r.789695.n4.nabble.com/plot-probability-density-function-pdf-tp3897055p3897055.html Sent from the R help mailing list archive
2011 Jun 21
5
please help for mgcv package
i read a book from WOOD, there's an example which is talking about the pollutant. library(gamair) library(mgcv) y<-gam(death~s(time,bs="cr",k=200)+s(pm10median,bs="cr")+s(so2median,bs="cr")+s(o3median,bs="cr")+s(tmpd,bs="cr"),data=chicago,family=Possion) lag.sum<-function(a,10,11) {n<-length(a) b<-rep(0,n-11) for(i in 0:(11-10))
2003 Jun 19
1
lattice and Sweave
I'm having trouble using lattice and Sweave together. An example of the trouble is the chunk <<fig=true, eps=false>>= library(nlme) data(Orthodont) plot(Orthodont) @ This gives a warning Warning message: No Active Device, using default values in: trellis.par.get("add.text") and creates a pdf file with no pages. I think this is related to the fact that a figure
2017 Aug 28
0
Extracting subset from netCDF file using lat/lon and converting into .csv in R
Two questions: 1. Is the order of the dimensions shown what is shown if you look at str(ncin) - I mean shown at the end where it describes the variable and its dimensions? 2. Is you problem how to subset the netcdf file, how to write to the .csv file, or both? -Roy > On Aug 28, 2017, at 2:21 PM, Eeusha Nafi <eshad002 at gmail.com> wrote: > > I have a series of nertCDF files
2011 Jun 19
2
please help! what are the different using log-link function and log transformation?
I'm new R-programming user, I need to use gam function. y<-gam(a~s(b),family=gaussian(link=log),data) y<-gam(loga~s(b), family =gaussian (link=identity),data) why these two command results are different? I guess these two command results are same, but actally these two command results are different, Why? -- View this message in context: