Displaying 20 results from an estimated 1000 matches similar to: "texreg error while exporting regression table"
2012 Dec 23
1
Esttab error while exporting regression results
Dear listers,
I am trying to export a regression output to a latex document using the R
package eststo.
I have two variables:
an ordered factor:
group <- gl(3,5,20, labels=c("Ctl","Trt","prp"))
and a continuous variable:
weight <- runif(20)
I want to regress weight over group, therefore I run:
reg1 <- lm(weight ~ group)
I wish to include the output of my
2012 Dec 22
1
how to control the naming of factors in regression
Dear R listers,
I am regressing an ordered variable over an ordered independent variable
using polr.
The output lists every level of the ordered independent variable repeating
its name and adding a suffix. In my case my variable is called "o.particip"
and in my regression table I get the following:
o.particip.L
o.particip.Q
o.particip.C
o.particip^4
o.particip^5
o.particip^6
Is
2013 Jan 10
1
help with knit_hooks
Dear R-listers,
does anybody can suggest some manual where I can learn more about how the
hooks in knitr work?
I am trying to enclose the output of an R command in the Latex verbatim
environment.
I defined a hook as follows:
knit_hooks$set(fsverb = function(x, options) {
paste("\\begin(verbatim)\n", x, "\\end(verbatim)\n", sep = "")
}
then I set a chunk as
2012 Dec 10
3
equivalent of group command of the egen function in Stata
Dear R listers,
I am trying to create a new variable that uniquely identifies groups of
observations in a dataset. So far I couldn't figure out how to do this in
R. In Stata I would simply type:
egen newvar = group(dim1, dim2, dim3)
Please, find below a quick example to show what I am dealing with:
I have a dataset with 4 variables:
var <- runif(50) ## a variable that I want to group
2012 Dec 21
2
how to recode an ordered factor
Dear R helpers,
I'm trying to recode an ordered factor to reverse its scale, but I can't
figure out how to make it. I am using the Recode function provided by the
Car package.
I've created an ordered variable:
data$o.var1 <- ordered(data$var1, levels=c(1,2,3,4), labels =c("very
satisfied", "fairly satisfied", "not very satisfied", "not at all
2013 Jan 08
2
how to label two figures in the same chunk independently with knitr
Dear R helpers,
I am using knitr to run analysis with R and edit my document with Latex. I
am wondering whether there is a way to include 2 or more pictures per chunk
and being able to refer them in the text independently and eventually
whether it is possible to give them different captions. Let me give you an
example.Rnw:
\documentclass{article}
\title{Example}
\author{FS}
\begin{document}
2013 Jan 23
1
problems with coercing a factor to be numeric
Dear R listers,
I am trying to compute the mean of a dummy variable that is encoded as a
factor. However, even though the levels of my factor are 0 - 1, when I
compute the mean (after coercing the factor to be
numeric), R changes 0 into 1 and 1 into yes, thus altering my expected
result.
Please, consider the following working example:
pp <- rep(0:1, 10)
pp <- factor(pp, levels=(0:1),
2010 Feb 17
1
Ordered Logit in R
I'm trying to run an ordered logistic regression model. I've run the following code, but the output does not provide the p-values. Is there some command to include the p-values in the output.
reg2 <- polr(trade1 ~ age2 + education2 + personal2 + economy2 + partisan2 + employment2 + union2 + home2 + market2 + race2 + income2)
summary(reg2)
Re-fitting to get Hessian#
Call:
2018 Mar 20
0
Struggling to compute marginal effects !
In that case, I can't work out why the first model fails but not the
second. I would start looking at "Data" to see what it contains. if:
object2 <- polr(Inc ~ Training ,Data,Hess = T,method = "logistic" )
works, the problem may be with the "Adopt" variable.
Jim
On Tue, Mar 20, 2018 at 10:55 AM, Willy Byamungu
<wmulimbi at email.uark.edu> wrote:
>
2007 Nov 10
1
polr() error message wrt optim() and vmmin
Hi,
I'm getting an error message using polr():
Error in optim(start, fmin, gmin, method = "BFGS", hessian = Hess, ...) :
initial value in 'vmmin' is not finite
The outcome variable is ordinal and factored, and the independant variable
is continuous. I've checked the source code for both polr() and optim()
and can't find any variable called
2011 Feb 16
1
error in optim, within polr(): "initial value in 'vmmin' is not finite"
Hi all. I'm just starting to explore ordinal multinomial regression. My dataset is 300,000 rows, with an outcome (ordinal factor from 1 to 9) and five independent variables (all continuous). My first stab at it was this:
pomod <- polr(Npf ~ o_stddev + o_skewness + o_kurtosis + o_acl_1e + dispersal, rlc, Hess=TRUE)
And that worked; I got a good model fit. However, a variety of other
2008 Mar 15
1
again with polr
hello everybody
solved the problem with summary, now I have another one
eg I estimate
> try.op <- polr(
> as.ordered(sod.sit.ec.fam) ~
> log(y) +
> log(1 + nfiglimin) +
> log(1 + nfiglimagg) +
> log(ncomp - nfiglitot) +
> eta +
> I(eta^2) +
>
2007 May 10
1
Follow-up about ordinal logit with mixtures: how about 'continuation ratio' strategy?
This is a follow up to the message I posted 3 days ago about how to
estimate mixed ordinal logit models. I hope you don't mind that I am
just pasting in the code and comments from an R file for your
feedback. Actual estimates are at the end of the post.
### Subject: mixed ordinal logit via "augmented" data setup.
### I've been interested in estimating an ordinal logit model
2007 Aug 02
1
proportional odds model
Hi all!!
I am using a proportinal odds model to study some ordered categorical
data. I am trying to predict one ordered categorical variable taking
into account only another categorical variable.
I am using polr from the R MASS library. It seems to work ok, but I'm
still getting familiar and I don't know how to assess goodness of fit.
I have this output, when using response ~ independent
2007 Aug 02
1
proportional odds model in R
Hi all!!
I am using a proportinal odds model to study some ordered categorical
data. I am trying to predict one ordered categorical variable taking
into account only another categorical variable.
I am using polr from the R MASS library. It seems to work ok, but I'm
still getting familiar and I don't know how to assess goodness of fit.
I have this output, when using response ~ independent
2007 Jul 25
0
Function polr and discrete ordinal scale
Dear all,
To modelize the abundance of fish (4 classes) with a set of environmental variables, I used the polr and predict.polr functions. I would like to know how to bring the cumulated probabilities back to a discrete ordinal scale.
For the moment I used the predict.polr function with the argument "class". Is there an other way?
polrf <- polrf <- polr_mod(formula =
2005 Mar 22
1
error with polr()
Dear Sir,
I get an error message when I use polr() in MASS package.
My data is "ord.dat". I made "y" a factor.
y y1 y2 x lx
1 0 0 0 3.2e-02 -1.49485
2 0 0 0 3.2e-02 -1.49485
3 0 0 0 1.0e-01 -1.00000
4 0 0 0 1.0e-01 -1.00000
5 0 0 0 3.2e-01 -0.49485
6 0 0 0 3.2e-01 -0.49485
7 1 1 0 1.0e+00 0.00000
8 0 0 0 1.0e+00 0.00000
9 1 1 0
2011 Mar 10
0
confidence intervals when using polr()
Hello, I am running a model with four categories and want predicted
probabilities in each category. Now for this example I wont give a
counterfactual just the training data is fine but is there anyway to get a
confidence interval around the predicted probabilities in each group? I have
tried but it gives me probabilities and I have used interval="confidence",
level=.095 and then interval
2005 Sep 05
1
convergence for proportional odds model
Hey, everyone,
I am using proportional odds model for ordinal responses in dose-response experiments. For some samll data, SAS can successfully provide estimators of the parameters, but the built-in function polr() in R fails. Would you like to tell me how to make some change so I can use polr() to obtain the estimators? Or anyone can give me a hint about the conditions for the existance of MLE
2004 Oct 08
1
polr and optim question
Hello again
I am trying to fit an ordinal logistic model using the polr function
from MASS. When I run
model.loan.ordinal <- polr(loancat~age + sex + racgp + yrseduc +
needlchg + gallery + sniffball + smokeball + sniffher +
smokeher + nicocaine + inject + poly(year.of.int,3) + druginj +
inj.years)
I get an error
Error in optim(start, fmin, gmin, method = "BFGS", hessian =