Hello,
I used R a year ago. With the data I am working with now, I realized that I
need to go back to R. Unfortunately, my memory is not my friend if it comes
down to coding :-)
What I want to do is extract the length of a variable of a file with certain
conditions and then print this number in a
Hello everyone,
I have a dataset with 3 colums (Year, Month, MeanTemp). Now I would like to
calculate the average of the mean temperature for the summer months (Juli,
August, September) for each of the 20 years.
I'm sure it's somehow possible with a loop, but all I tried so far didn't
worked and
Thank you so much for your help Dennis, Pete and D Kelly!
In the meantime I tried to do a loop and came up with this:
l<-0
for (i in 0:((length(lakewil$Year)/12)-1)) {
l[i+1]<- mean(lakewil$MeanTemp[((i*12)+7):((i*12)+9)])
}
print(l)
This gives me the summer averages over the 3 months for each
Hello everyone,
I have the following problem, I have a dataframes that looks like this:
fire$Year fire$Size
1 19811738.0
2 19842228.1
3 1985 38963.3
4 19862223.4
5 19873594.6
6 19881520.0
...
What I would like to do is copy the values from t
nel series identifying the ID and TIME index
variables. Then use the time-series fill command.
I have searched the help and vignettes of both the "zoo" and "plm" packages
but cannot find the solution.
Can anyone help? Thanks,
Richard Saba
_
ervation per person, and the with family
information repeated for people in the same family.
Can anyone help?
Thanks,
Richard Saba
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://
",Names[i],",k=-1) +
lag(",Names[i],",k=-2)+ lag(",Names[1],",k=-1) +lag(",Names[1],",k=-2)"))
form2<-as.formula(paste(Names[1],"~fitted(reg1)"))
# reg1 <-dynlm(form1,data=Dnames[j])
# reg2 <-dynlm(form2,data=Dname
,538,000 153,449,000 154,767,000
140,129,000 140,028,000 139,882,000 14,409,000 13,421,000 14,885,000 9.3%
8.7% 9.6%
Thanks,
Richard Saba
--
View this message in context:
http://r.789695.n4.nabble.com/Read-variable-column-width-data-tp3744922p3744922.html
Sent from the R help mailing list a
Does anyone know if the bootstrap CI intervals generated by the irf()
function (impulse response function) in the " vars" package are bias corrected?
Thanks,
Richard Saba
[[alternative HTML version deleted]]
__
R-help@r-project.o
Sorry about first post. This is in plain text.
Does anyone know if the bootstrap CI intervals generated by the irf()
function (impulse response function) in the " vars" package are bias
corrected?
Thanks,
Richard Saba
__
R-help@r-p
le utilizing the "xreg" argument available in the other arima
functions .
Thanks,
Richard Saba
[EMAIL PROTECTED]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-p
be appreciated.
Thanks,
Richard Saba
Department of Economics
Auburn University
Email: [EMAIL PROTECTED]
Phone: 334 844-2922
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R
6 7717 7461 7767 7925 8623 8945 10078 9179 8037 8488 7874 8647
1977 7792 6957 7726 8106 8890 9299 10625 9302 8314 8850 8265 8796
1978 7836 6892 7791 8192 9115 9434 10484 9827 9110 9070 8633 9240
> dat1<-as.data.frame(USAccDeaths)
> summary(dat1)
x
mmy variables for each month.
If I had a variable which take values from 1 to 12 indicating the month I
could use the factor() function to model the series.
reg1<-lm(hstarts~ -1 + factor(months))
Is there a function that will extract the year and month from a ts data set?
Thanks,
Richar
jects? I found the Shumway "Time series analysis
and its applications with R Examples" website very helpful but many
practical questions involving manipulation of time series data still remain.
Any help will be appreciated.
Thanks,
Richard Saba
Department of Economics
Auburn University
Is anyone aware of an R procedure similar to STATA's "heckprob" procedure?
"Heckprob" fits maximum likelihood probit models correcting for sample
selection bias.
Thanks,
Richard Saba
Department of Economics
Auburn University
a, and why it
works as it does?
>Thanks!
--
>Tom
Richard Saba
Department of Economics
Auburn University
Auburn, AL 36849 USA
[EMAIL PROTECTED]
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
htt
tsdiag(model1)
stats::tsdiag(model1)
detach("package:TSA")
tsdiag(model1)
R Saba
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
without
success. For example I have attempted to replicate by hand the se.fit
calculation from a lm object calculated by a call to the predict function
and have not been able to reproduce the results.
Thanks,
Richard Saba
Department of Economics
Auburn University
Email: [EMAIL PROTECTED
Is anyone aware of a procedure to apply Newey-West corrections for
autocorrelation to a SUR regression model? The SANDWICH package seems to be
applicable only to LM or GLM models.
Thanks,
Richard Saba
Department of Economics
Auburn University
Email: [EMAIL PROTECTED
Is anyone aware of a procedure to apply Newey-West corrections for
autocorrelation to a SUR regression model? The SANDWICH package seems to be
applicable only to LM or GLM models.
Thanks,
Richard Saba
Department of Economics
Auburn University
Email: [EMAIL PROTECTED
uot;. Please see below as a sample:
>df
00100
NA0110
0100NA
What I want is:
00110
NA0111
0110NA
I shall be thankful for the reply.
Saba
l Stock 15, one after another.
c) As the the process will have to be repeated, therefore instead of
manual coding everytime, “For Loop” is required.
I shall bereally grateful for a detailed reply.
Thanks.
Regards
Saba Sehrish
[[alternative HTML versi
Hi
I will be grateful if someone please tell me the programming to run regression
on time series data through "For Loop".
Regards.
Saba
Sent from Yahoo Mail on Android
[[alternative HTML version deleted]]
__
R-help@r-project.o
1)B2<-matrix(NA,nrow,1)B3<-matrix(NA,nrow,1)B4<-matrix(NA,nrow,1)B5<-matrix(NA,nrow,1)B1[2:nrow,1]<-B[1:(nrow-1),1]B2[3:nrow,1]<-B[1:(nrow-2),1]B3[4:nrow,1]<-B[1:(nrow-3),1]B4[5:nrow,1]<-B[1:(nrow-4),1]B5[6:nrow,1]<-B[1:(nrow-5),1]
reg1<-lm(A~A1+A2+A3+A
(B~B1+B2+B3+B4+B5+A1+A2+A3+A4+A5)
Following error is occurring:
Error in lm.fit(x,y,offset = offset, singular.ok = singular.ok, ...) :
NA/NaN/lnf in 'y'In addition: Warning message:In model.response(mf,"numeric") :
NAs introduced by coercion
RegardsSaba
On Friday, 18 Decemb
<-nrow(B)
B1<-matrix(NA,nrow,1)
B2<-matrix(NA,nrow,1)
B3<-matrix(NA,nrow,1)
B4<-matrix(NA,nrow,1)
B5<-matrix(NA,nrow,1)
B1[2:nrow,1]<-B[1:(nrow-1),1]
B2[3:nrow,1]<-B[1:(nrow-2),1]
B3[4:nrow,1]<-B[1:(nrow-3),1]
B4[5:nrow,1]<-B[1:(nrow-4),1]
B5[6:nrow,1]<-B[1
Hi I am using NeweyWest standard errors to correct lm( ) output. For example:
lm(A~A1+A2+A3+A4+A5+B1+B2+B3+B4+B5)
vcovNW<-NeweyWest(lm(A~A1+A2+A3+A4+A5+B1+B2+B3+B4+B5))
I am using package(sandwich) for NeweyWest. Now when I run this command, it
gives following error:
Error in solve.default(diag(n
Thank you. The issue is resolved by scaling the data in millions.
Saba
On Saturday, 19 December 2015, 15:06, Achim Zeileis
wrote:
On Sat, 19 Dec 2015, Saba Sehrish via R-help wrote:
> Hi I am using NeweyWest standard errors to correct lm( ) output. For example:
> lm(A~A1+A2+A3
Hi
Thanks for the reminder.
Actually I want to analyse whether present value of variable A is Granger
caused by lag values of B and test linear hypothesis "B1,B2,B3,B4,B5=0".
Therefore, to get robust standard error NeweyWest estimates are applied.
Saba
On Saturday, 19 December 2
gives
values for one month of a particular year (e.g. March 31st, 2010). Right now R
gives descriptive results for each column, whereas I need it collectively for
all the years ( one mean, one sd, one min, one max and one median) for each
variable.
Kindly guide me in this regard.
Thanks.
Saba
HiI have a data frame with rows specifying companies (codes are assigned to
companies) and columns specify months (monthly data). The data is based on male
(M) and female (F) information for each month. Following is an example of how
data looks like:
01 02 03 04001 na M M M001 M M M F002 M F F
.
Thanks
Saba
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained
me in this regard.
Thanks
Saba
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self
Thanks a lot. Its really helpful
Regards
Saba
On Saturday, 23 April 2016, 6:50, Giorgio Garziano
wrote:
Since the aggregate S3 method for class formula already has got na.action =
na.omit,
## S3 method for class 'formula'
aggregate(formula, data, FUN, ...,
subset,
01
4 10
5 0.22 1
5 0.78NA
Kindly guide me in this regard.
Thanks
Saba
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the
40 1
41 0
50.22 1
50.78 NA
Kindly guide me in this regard.
Thanks
Saba
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
Hi
I need to insert a blank row after every row in R data frame. I have achieved
it through:
df[rep(1:nrow(df),1,each=2),]
But it inserts a row with name of previous row, while i want a complete blank
row without any name/title.
Please guide me
Regards
Saba
150 160
20040315 NA NA 180 190 200
20040331 NA 145 160 175 180
If it is possible, I would prefer to use "for loop" and "which" function to
achieve the result.
Please guide me in this regard.
Thanks
Saba
___
ge ‘GARPFRM’ had non-zero exit status
(b) library(GARPFRM)
It gives following error : Error in library(GARPFRM) : there is no package
called ‘GARPFRM’
Please help me in this regard.
Thanks
Saba
__
R-help@r-project.org mailing list -- To UNSUBSCRIB
Hi
If a package is not loading, it is a matter of concern. Therefore, I have asked
for the assistance or guidance in this regards.
Saba
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
Hi
I have a csv file of Names based on male and female managers. Is there some
code in R to identify the gender by names?
ThanksSaba
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https
42 matches
Mail list logo