Displaying 20 results from an estimated 10000 matches similar to: "First attempt to use R"
2010 Jun 08
2
type conversion with apply or not
Folks, i thought it should be straightforward but after a few hours poking around, I decided it's best to post my question on this list.
I have a data frame consisting of a (large) number of date columns, which are read in from a csv file as character string. I want to convert them to Date type. Following is an example, where the first column is of integer type, while the rest are type
2004 Jan 08
3
Strange parametrization in polr
In Venables \& Ripley 3rd edition (p. 231) the proportional odds model
is described as:
logit(p<=k) = zeta_k + eta
but polr apparently thinks there is a minus in front of eta,
as is apprent below.
Is this a bug og a feature I have overlooked?
Here is the naked code for reproduction, below the results.
------------------------------------------------------------------------
---
version
2010 Jun 27
2
Ways to work with R and Postgres
Hi,
I post this message to the general r-help list hoping anyone within a wider range have suggestions:
There are three ways to integration R and postgres, especially on 64bit Microsoft windows Platform,
1. via RODBC package, which has 32 bit and 64 bit version for windows
2. via RPostgres interface, which only has 32bit version currently
3. via plr for Greenplum, which only supports a
2007 Jun 04
2
How to obtain coefficient standard error from the result of polr?
Hi - I am using polr. I can get a result from polr fit by calling
result.plr <- polr(formula, data=mydata, method="probit");
However, from the 'result.plr', how can I access standard error of the estimated coefficients as well as the t statistics for each one of them?
What I would like to do ultimately is to see which coefficients are not significant and try to refit the
2011 Mar 01
1
How to understand output from R's polr function (ordered logistic regression)?
I am new to R, ordered logistic regression, and polr.
The "Examples" section at the bottom of the help page for
polr<http://stat.ethz.ch/R-manual/R-patched/library/MASS/html/polr.html>(that
fits a logistic or probit regression model to an ordered factor
response) shows
options(contrasts = c("contr.treatment", "contr.poly"))
house.plr <- polr(Sat ~ Infl +
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
2013 Oct 18
1
No P.values in polr summary
Hi everyone,
If I compute a "Ordered Logistic or Probit Regression" with the polr
function from MASS package. the summary give me : coefficients, Standard
error and Tvalue.. but not directly the p.value.
I can compute "manualy" the Pvalue, but Is there a way to directly obtain
the pa.value, and I wonder why the p.valeu is not directly calculated, is
there a reason?
exemple
2006 Apr 07
1
Compiling PL/R against R.dll in Win32/MinGW
Hello list,
I've been trying to get the PostgreSQL PL/R library to compile on
windows (http://www.joeconway.com/plr/). The author of this library
says the problem is likely because the distributed R.dll isn't compiled
as a shared dll. Is this the case? If so, is there any way to compile
it such that it is shared? If that's not the case, than maybe someone
on this list has a better
2005 Jun 10
1
problem with polr ?
I want to fit a multinomial model with logit link.
For example let this matrix to be analyzed:
male female aborted factor
10 12 1 1.2
14 14 4 1.3
15 12 3 1.4
(this is an example, not the true data which are far more complex...)
I suppose the correct function to analyze these data is polr from MASS library.
The data have been
2012 Apr 24
1
nobs.glm
Hi all,
The nobs method of (MASS:::polr class) takes into account of weight,
but nobs method of glm does not. I wonder what is the rationale of
such design behind nobs.glm. Thanks in advance. Best Regards.
> library(MASS)
> house.plr <- polr(Sat ~ Infl + Type + Cont, weights = Freq, data = housing)
> house.logit <- glm(I(Sat=='High') ~ Infl + Type + Cont, binomial,weights
2003 May 05
3
polr in MASS
Hi, I am trying to test the proportional-odds model using the "polr" function in the MASS library with the dataset of "housing" contained in the MASS book ("Sat" (factor: low, medium, high) is the dependent variable, "Infl" (low, medium, high), "Type" (tower, apartment, atrium, terrace) and "Cont" (low, high) are the predictor variables
2002 May 30
2
Systems of equations in glm?
I have a student that I'm encouraging to use R rather than SAS or Stata
and within just 2 weeks he has come up with a question that stumps me.
What does a person do about endogeneity in generalized linear models?
Suppose Y1 and Y2 are 5 category ordinal dependent variables. I see
that MASS has polr for estimation of models like that, as long as they
are independent. But what if the
2004 Dec 16
1
PL/R calls fail
Hi all,
I am currently trying to create a development environment
including PostgreSQL 8.0.0rc1, R 2.0.1 and PL/R on a system running Fedora
Cora 1.
So far, I have suceeded in setting up PostgreSQL and R as
a shared library - unfortunately I have not been able to link these
two spheres by adding the PostgreSQL add-on PL/R due to
some mysterious probs.
I thoroughly followed the setup
2008 Oct 06
2
stepplr
Hello everybody,
I am trying to install the library stepplr under windows (http://www.maths.bris.ac.uk/R/web/packages/stepPlr/index.html), in order to use the function plr, but I still have problem to find the right link for this purpose!
I am very thankful for your help!
Samor
2004 Dec 19
1
Can I calculate the area of a polygon?
Hello,
I'm verry new in R.
My Problem:
I have a PostgreSQL-Server with installed support for the R-Language.
And now I have a table with a Polygon like this:
test_db=# select * from geo where id=1;
id | koerper
----+---------------------------------
1 | ((0,0),(0,2),(2,2),(3,3),(5,0))
(1 row)
Now, I need to know the area of this object. Please, can you tell me, if
it
2009 Mar 31
2
How to generate natural cubic spline in R?
Suppose I have two var x and y,now I want to fits a natural cubic
spline in x to y,at the same time create new var containing the
smoothed values of y. How can I get it?
2004 Nov 10
2
cubic spline/smoother with nlme
Greetings, I would like to use a cubic spline
or smoother to model the fixed effects within
nlme. So far the only smoother I have been able
to get to run successfully in nlme is smooth().
I tried smooth.spline:
fixed=list(lKa~1,lCL~smooth.spline(BSA, df=3))
the error I got was the following.
Error in model.frame(formula, rownames, variables, varnames, extras,
extranames, : invalid
2013 Mar 06
1
Constrained cubic smoothing spline
Hello everone,
Anyone who knows how to force a cubic smoothing spline to pass through a particular point?
I found on website someone said that we can use "cobs package" to force the spline pass through certain points or impose shape constraints (increasing, decreasing). However, this package is using B-spline and can only do linear and quadratic
2013 Mar 11
1
Use pcls in "mgcv" package to achieve constrained cubic spline
Hello everyone,
Dr. wood told me that I can adapting his example to force cubic spline to pass through certain point.
I still have no idea how to achieve this. Suppose we want to force the cubic spline to pass (1,1), how can
I achieve this by adapting the following code?
# Penalized example: monotonic penalized regression spline .....
# Generate data from a monotonic truth.
2012 Dec 01
3
cubic spline
Hallo,
I'm facing a problem and I would really appreciate your support.
I have to translate some Matalb code in R that I don't know very well but I
would like to.
I have to interpolate 5 point with a cubic spline function and then I expect
my function returns the Y value as output a specific X value inside the
evaluation range. Let's suppose that:
1- *X = [-10, -5, 0, 5, 10]*
2