Re: [R] Fixed effect model: different estimation approaches with R return different results

2022-10-06 Thread Valerio Leone Sciabolazza
al issues are typically off topic Someone might > respond privately, though. > > Cheers, > Bert > > On Thu, Oct 6, 2022 at 4:24 AM Valerio Leone Sciabolazza > wrote: >> >> Good morning, >> I am trying to use R to estimate a fixed effects model (i.e., a pane

[R] Fixed effect model: different estimation approaches with R return different results

2022-10-06 Thread Valerio Leone Sciabolazza
Good morning, I am trying to use R to estimate a fixed effects model (i.e., a panel regression model controlling for unobserved time-invariant heterogeneities across agents) using different estimation approaches (e.g. replicating xtreg from Stata, see e.g.

Re: [R] Change how minpack.lm:::summary.nls.lm calculates degrees of freedom

2020-08-19 Thread Valerio Leone Sciabolazza
rsstrace: num [1:9] 1966.2 327.2 104.8 53.9 33.2 ... > $ deviance: num 1.06 > - attr(*, "class")= chr "nls.lm" > > Also > > nls.out$hessian > a b c > a 10.26361 43.17086 19.89616 > b 43.17086 382.17773 166.43747 > c 19.89616 1

[R] Change how minpack.lm:::summary.nls.lm calculates degrees of freedom

2020-08-19 Thread Valerio Leone Sciabolazza
Dear R users, I want to modify how the degrees of freedom are calculated from the summary function of the package minpack.lm My first thought was to replicate how minpack.lm:::summary.nls.lm works, and modify the line of the code that is relevant for my task. However, for some reason I am not

[R] Fixed effects regression constant (intercept) using lfe::felm

2020-07-09 Thread Valerio Leone Sciabolazza
ed this question on stackoverflow [2] but no one answered. [1] https://stackoverflow.com/questions/49351201/fixed-effects-regression-constant-intercept-using-lfe-felm-in-r [2] https://stackoverflow.com/questions/62497705/estimate-of-constant-term-using-r-felmlfe-package-and-differences-with-stats Valerio Le

[R] survival::clogit - how to construct data and use sampling weights

2020-01-20 Thread Valerio Leone Sciabolazza
this with survival::clogit. My questions are: i) am I properly constructing the dataset and using the field weights?, ii) is it necessary to include the variable "alt" in the formula? Can anyone provide any useful guidelines? Regards, Valerio Leone Sciabolazza, Ph.D. set.seed(123) # number of obse

[R] how to run a multinomial logistic regression with fixed effects

2019-01-27 Thread Valerio Leone Sciabolazza
cluded in my specification, hence I have no parameters to use in rpar. As a result, mlogit seems not the best choice in this context. On stackexchange, a possible solution was proposed few years ago https://stats.stackexchange.com/questions/51148/unable-to-provide-random-parameter-with-mlogit However, I don'