Thank you all for answering such a newbie question. :) David thank you for
your example too.
Best wishes, I.S
On Nov 14, 2015 18:28, "David L Carlson" wrote:
> My original answer works fine as long as fin_hyp contains only one
> definition for the line, but if it contains more than one, R will us
Please always cc the list to assure a better chance of getting a good answer.
I dunno. I assume you could control scaling through xlim and/or ylim
arguments as "..." arguments. See ?plot.default and linked Help if you
don't know about graphical parameters. If you don't know what "..."
arguments ar
Thank you David,
My intention was if I change the status column to numeric
0= Lost and 1 Won, then I can use this numeric variables to calculate
the Percent game Won by each country.
how did you read the data first?
That was my problem. The actual data is in a file have to be read or laded.
It is always good to read the manual page for a function, but especially when
it is not working as you expected. In this case if you look at the arguments
for read.table(), you will find one called fill=TRUE that is useful in this
case.
Based on your ifelse(), you seem to be assuming that a bla
Is this an R question or an econometrics question? I'll assume that it
is an R question. If your weeks are coded sequentially (i.e.: weeks
since a particular date), then they'll be strictly determined by year.
If however you're interested in the effect of a particular week of the
year (week
I have weekly panel data for more than a hundred cities. The independent
variables are temperature and precipitation. The time dimensions are year
and week and likely have time invariant characteristics and are all
important for proper estimation.
Could I use the LFE (or plm) package to estimate s
Hi all,
I have the following raw data some records don't have the second variable.
test <- read.table(textConnection(" Country STATUS
USA
USAW
USAW
GER
GERW
GERw
GERW
UNKW
UNK
UNKW
FRA
FRA
FRAW
FRAW
FRAW
SPA
SPAW
SPA "),header = TRUE, sep= "
Yes. And see the "all.terms" parameter of plot.gam(), which by default
is FALSE, yielding the error message reported.
Cheers,
Bert
Bert Gunter
"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
-- Clifford Stoll
On Sat, Nov 14, 2015 at 2:16 PM, An
Your problem is that you've specified a parametric linear model. Your
output is a set of parametric coefficients. You can replace `gam` with
`lm` in your example, and you'll get identical results. If you wish to
specify one of the terms nonparametrically, you'd use s(chlag), for
example (assum
Is there a way in maxLik to fix/constraint a parameter to fall within a certain
range ? For example
I want sigma to be always between 1.98 and 2.02
library(maxLik)
loglik <- function(param) {
mu <- param[1]
sigma <- param[2]
ll <- -0.5*N*log(2*pi) - N*log(sigma) - sum(0.5*(x - mu)^2/sigma
> On 14 Nov 2015, at 17:02, Berend Hasselman wrote:
>
>>
>> On 14 Nov 2015, at 16:15, Lorenzo Isella wrote:
>>
>> Dear All,
>> I am using optim() for a relatively simple task: a linear model where
>> instead of minimizing the sum of the squared errors, I minimize the sum
>> of the squared rel
??
R has 2 built-in OO "class" systems: S3 and S4. S3, which is less an
OO system than a way of customizing methods (see e.g. methods(plot) or
methods(print)), is simpler. S4 is a more full-fledged OO system,
although those coming from languages like C++ and Java might find it
somewhat idiosyncrat
Dear all,
I have a doubt on a fixed-effects specification I am trying to run on my
large "balanced" panel data with approx 15,000 IDs (n), 33 years (t).
I have used R packages lfe and plm and am aware of methods in both packages
for following specifications:
(a) Individual FE (ID)
(b) Twoways FE
Hello, I've created a list of gams and for my last step I'd like to plot them
but I keep getting an error method. Here is an example of one of themI
appreciate your help
Gam1s=gam(E1~chlag +chla + waveMax + SST + IRR + site + day +chlag:site,
family=gaussian)
summary(Gam1s)
Family: gaussian
Hi, there
I'm trying to extend customized type (for example mylist) from a base type
"list" in R, which contains all functions and prototype of R base "list".
It should support below operators as "list":
a <- list(column1=c(1:5), column2=c(6:10))
aa <- mylist(column1=c(1:5), column2=c(6:10))
a$col
My original answer works fine as long as fin_hyp contains only one definition
for the line, but if it contains more than one, R will use a different line for
each test which is probably not what you want (e.g. the first point will be
tested against the first line and the second point against the
You definitely need to learn about the differences between R and the other
languages that you are familiar with. You've done some work since you mention
the apply() family, but those are just another way of programming a loop. In
many cases (including this one), a loop is not needed. Here's your
> On 14 Nov 2015, at 16:15, Lorenzo Isella wrote:
>
> Dear All,
> I am using optim() for a relatively simple task: a linear model where
> instead of minimizing the sum of the squared errors, I minimize the sum
> of the squared relative errors.
> However, I notice that the default algorithm is ve
I meant the parscale parameter.
On Sat, Nov 14, 2015 at 10:30 AM, Gabor Grothendieck
wrote:
> Tyipcally the parameters being optimized should be the same order of
> magnitude or else you can expect numerical problems. That is what the
> fnscale control parameter is for.
>
> On Sat, Nov 14, 2015
Tyipcally the parameters being optimized should be the same order of
magnitude or else you can expect numerical problems. That is what the
fnscale control parameter is for.
On Sat, Nov 14, 2015 at 10:15 AM, Lorenzo Isella
wrote:
> Dear All,
> I am using optim() for a relatively simple task: a li
Dear All,
I am using optim() for a relatively simple task: a linear model where
instead of minimizing the sum of the squared errors, I minimize the sum
of the squared relative errors.
However, I notice that the default algorithm is very sensitive to the
choice of the initial fit parameters, wherea
The process you are looking for is called "imputation" and the following link
has the advice you need:
http://rseek.org/?q=imputation
Other than that, please see here for some hints on how to ask questions
productively:
http://adv-r.had.co.nz/Reproducibility.html
http://stackoverflow.com/quest
22 matches
Mail list logo