How to find the size of the effect of an independent numeric variable on a dependent ordinal variable? I have a sample dataset like:
name<-c("Bob","JACK","Steve","Daniel","Ed")
ans1<-c("5","4","4","1","4")
hours<-c(200,100,150,10,500)
datat<-data.frame(name,ans1,hours)

As you can see in this dataset there are 5 students and their answers to a confidence test in a scale from 1 to 5 after having spent certain amount of hours preparing themselves. The question of this confidence test is: How ready do you feel for the exams (from 1 to 5) after having read certain amount of hours?" I am not sure what kind of analysis should I perform in R on this dataframe  What model would make sense? 1-WAY ANOVA seems the best fit to me as I want to find how the studying hours affect the answer of every student.Any advice?
 A: Because your outcome variable is ordinal, an ordinal logistic regression model would be appropriate.  There are several types of such models, so you would need to identify the one appropriate for your setting since each model has a different interpretation.  
See the article available at http://www.scielo.br/scielo.php?script=sci_arttext&pid=S0102-311X2008001600010 for a list of different types of ordinal logistic regression models, which includes: 


*

*Proportional odds model; 

*Partial proportional odds model.


Also, see https://stats.idre.ucla.edu/r/dae/ordinal-logistic-regression/ on how you can implement the proportional odds model in R.    
Are these 5 students the only students you have data for? I don't know whether you can fit an ordinal logistic regression model reliably when you have data from only 5 students.  If you can (i.e., if your model fit doesn't explode), expect to see large standard errors and wide confidence intervals coming out from your model, reflecting the limited amount of information available in the data from only 5 students.   
A one-way ANOVA model will not work since it would require your outcome variable to be continuous, which it is not.  An example of continuous variable is body weight (which can take any value - in principle - within a range of biologically plausible values).  Having said that, there are people out there who would treat the ordinal outcome variable "as if" it were continuous and analyze it using one-way ANOVA.     
Comment:
I thought you were going to treat the confidence score on a specific question as the outcome and the hours as the predictor? The students prepare first and then take the test. 
If you use the clm() function in the ordinal package to implement the proportional odds model (aka cumulative logit model) relating the outcome ans1 to the predictor hours, your model for the confidence score on the first question would be:
install.packages("ordinal")
require(ordinal)

model1 <- clm(ans1 ~ hours, data = datat) 

model1

summary(model1) 

For the above code to work, you would have to convert ans1 to an ordinal factor first.  Try something like this for the conversion:
datat$ans1 <- factor(datat$ans1, 
                     levels=c("1","2","3","4","5"),
                     ordinal=TRUE)

and then run the code suggested above. 
See Section 2 of the document ftp://ftp.stat.math.ethz.ch/R-CRAN/web/packages/ordinal/vignettes/clm_tutorial.pdf for details on how to interpret the resulting model). 
